[Pkg-ofed-commits] [libibmad] 03/06: Imported Upstream version 1.3.9

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Tue Jul 1 07:18:05 UTC 2014


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

ana pushed a commit to branch master
in repository libibmad.

commit 8a512660c6b610199ee7121bcc022ab23f82fcca
Author: Ana Guerrero López <ana at ekaia.org>
Date:   Mon Jun 30 22:58:36 2014 +0200

    Imported Upstream version 1.3.9
---
 AUTHORS                         |    1 +
 COPYING                         |   12 +-
 ChangeLog                       | 2180 +++++++++--
 Makefile.am                     |   15 +-
 Makefile.in                     |  396 +-
 README                          |   25 +
 aclocal.m4                      | 8252 +--------------------------------------
 config.h.in                     |    3 -
 config/compile                  |  142 +
 config/config.guess             |  753 ++--
 config/config.sub               |  329 +-
 config/depcomp                  |   93 +-
 config/install-sh               |  514 +--
 aclocal.m4 => config/libtool.m4 | 1530 +-------
 config/ltmain.sh                |   75 +-
 config/ltoptions.m4             |  368 ++
 config/ltsugar.m4               |  123 +
 config/ltversion.m4             |   23 +
 config/lt~obsolete.m4           |   92 +
 config/missing                  |   61 +-
 configure                       |  761 ++--
 configure.in                    |    8 +-
 include/infiniband/mad.h        | 1319 +++++--
 include/infiniband/mad_osd.h    |   49 +
 libibmad.spec                   |    8 +-
 libibmad.spec.in                |    2 +-
 libibmad.ver                    |    2 +-
 src/{vendor.c => bm.c}          |   76 +-
 src/{smp.c => cc.c}             |  115 +-
 src/dump.c                      |  661 +++-
 src/fields.c                    | 1237 ++++--
 src/gs.c                        |  181 +-
 src/libibmad.map                |  100 +-
 src/mad.c                       |  136 +-
 src/mad_internal.h              |   50 +
 src/portid.c                    |   42 +-
 src/register.c                  |  158 +-
 src/resolve.c                   |  112 +-
 src/rpc.c                       |  309 +-
 src/sa.c                        |   53 +-
 src/serv.c                      |   80 +-
 src/smp.c                       |   92 +-
 src/vendor.c                    |   62 +-
 43 files changed, 7466 insertions(+), 13134 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index d09c13f..66f9be2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,4 @@
 Shahar Frank		<shahar at voltaire.com>
 Hal Rosenstock		<halr at voltaire.com>
 Sasha Khapyorsky	<sashak at voltaire.com>
+Ira Weiny			<weiny2 at llnl.gov>
diff --git a/COPYING b/COPYING
index 1b1ca1d..b004df0 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,6 @@
-This software with the exception of OpenSM is available to you
-under a choice of one of two licenses. You may chose to be
-licensed under the terms of the the OpenIB.org BSD license or
-the GNU General Public License (GPL) Version 2, both included
-below.
-
-OpenSM is licensed under either GNU General Public License (GPL)
-Version 2, or Intel BSD + Patent license. See OpenSM for the
-specific language for the latter licensing terms.
+This software is available to you under a choice of one of two licenses. You
+may chose to be licensed under the terms of the the OpenIB.org BSD license or
+the GNU General Public License (GPL) Version 2, both included below.
 
 
 Copyright (c) 2004-2008 Voltaire, Inc.  All rights reserved.
diff --git a/ChangeLog b/ChangeLog
index 860e614..5276bfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,1048 +1,2724 @@
 
+** Version: HEAD
+
+Thu May 31 16:14:32 2012 -0700 Ira Weiny
+0736b2857fd1f81d1ae23293610a425726f6ceee
+
+	* Update README for 1.3.9 release
+
+Fri May 25 15:33:01 2012 -0700 Jim Foraker
+27925f14149158062bd15fff0d943d1899020398
+
+	* libibmad/dump.c: clean up boundary conditions in dump routines
+
+Mon Apr 30 13:26:12 2012 -0400 Hal Rosenstock
+0b0ab0ee64f52d708ff8b23b3eb6e379aeb1465b
+
+	* libibmad/fields.c: Update counter offsets for PortExtendedSpeedsCounters
+
+Wed Apr 25 14:06:25 2012 -0700 Albert Chu
+95d4955e36e8737210ee2e4d36e85602d8704c74
+
+	* libibmad: fix misspelling
+
+Tue Mar 6 14:12:29 2012 -0800 Jim Foraker
+1506d7ac6401f154c377e4255fbcab957ff0c66e
+
+	* libibmad: Add MKey support to SMP requests via smp_mkey_get/set()
+
+Thu Dec 8 14:09:34 2011 -0800 Albert Chu
+115679cb548f1024cebb82ab2fbe8615b9b95a4c
+
+	* libibmad: Add support for congestion control config mads.
+
+Mon Nov 28 06:01:28 2011 -0800 Hal Rosenstock
+033143348b62bcdd6f2c4da02ee8794c9a3ffc24
+
+	* libibmad: Add support for SA NodeRecord
+
+Thu Nov 10 05:48:46 2011 -0800 Hal Rosenstock
+9fcdf151f722b3a0cd6eba69736201c0975461ca
+
+	* libibmad/rpc.c: On receive, add debug info for dumping incoming MAD address
+
+Thu Sep 29 11:26:48 2011 -0700 Ira Weiny
+ec98cd1bda422f04ca7b4fdf3ba0bafdf0d12fea
+
+	* Update version for next release
+
+Wed Sep 7 11:02:52 2011 -0700 Albert Chu
+9fd2087f6fedd8ceeb1949c2394bd89a243c6a8f
+
+	* Support classportinfo dump function
+
+Tue Aug 2 11:16:54 2011 -0700 Albert Chu
+ce716fc1644ecb7fbabb0e166219b49e0315fe32
+
+	* Add support for congestion control mads
+
+Mon Aug 15 10:32:40 2011 -0700 Ira Weiny
+fa8f6015537b55dfc14b1d93ee494f0dd8b12cce
+
+	* Update AUTHORS and add README with release notes
+
+Thu Aug 18 16:46:49 2011 +0000 shefty
+43eed2dba29f3998bebf09350b556253e7307f72
+
+	* libibmad: Fix build on win8
+
+Mon Aug 15 20:39:14 2011 +0000 Hal Rosenstock
+38e9ac42ad2d9fc53fadddb2db30963695cdb486
+
+	* libibmad: Add support for PortInfo CapabilityMask2
+
+Mon Aug 15 20:49:07 2011 +0000 Hal Rosenstock
+a872bcdb84beb0e44b82f5eec11c9b1d6a24983f
+
+	* libibmad/dump.c: Allow 0 (extended speed active) in mad_dump_linkspeed
+
+Mon Aug 15 20:23:12 2011 +0000 Hal Rosenstock
+37b344ecf169c1f0164bf843c6954ac76921ac1f
+
+	* libibmad/dump.c: Add IsOptionalIPDSupported into mad_dump_portcapmask
+
+Wed Aug 3 11:16:37 2011 -0700 Ira Weiny
+818fcb2260ea0308e09ad434acb76691d25ff95d
+
+	* libibmad: Make new feild names consistent
+
+Fri Jul 22 11:22:03 2011 +0000 Hal Rosenstock
+627185f6cace120abaa4ab9f10455050f9c49eab
+
+	* libibmad: Support for Mellanox vendor specific ExtendedPortInfo SM class MAD
+
+Thu Jul 14 15:03:38 2011 -0700 Albert L. Chu
+e4713b26e791de21792df0e3f03b73b3e8442f72
+
+	* Support optional performance counters, including congestion control performance counters.
+
+Wed Jul 20 11:52:47 2011 -0700 Albert L.Chu
+4805e14bedb78a28032920e9b1610ca54c5b59bd
+
+	* Fix offset in various < 32 bit field entries
+
+Thu Jul 7 17:40:18 2011 -0700 Ira Weiny
+db5e5526a58cb7209791eedcda49f5c7b97f6265
+
+	* libibmad: make IB_GUID_GUID0_F consistent with new GUIDInfo fields
+
+Mon Jul 11 12:08:23 2011 +0000 Hal Rosenstock
+4d1d186109f8acd083d7195902351249c991b831
+
+	* libibmad: Add PortExtendedSpeedsCounters support
+
+Thu Jul 7 09:50:03 2011 -0700 Hal Rosenstock
+0f25a224e71728efb31b89960f6c538e6f45214e
+
+	* libibmad: Add initial extended speed support
+
+Wed Jul 6 14:30:27 2011 -0700 Ira Weiny
+92d5ee1e3c23f17f06385f713768343eb399e49a
+
+	* libibmad: Remove reference to OpenSM in COPYING file
+
+Tue Jul 5 06:09:10 2011 -0700 Hal Rosenstock
+e6fb2846ea648afc7724a83e13bc806f7cd55de2
+
+	* libibmad: Fix backward compatibility
+
+Wed Jun 1 06:45:57 2011 -0700 Hal Rosenstock
+e48518d8cb832d70856808610592a97f3140d6f7
+
+	* libibmad/[register rpc].c: Fix some bounds checks
+
+Wed Apr 27 11:14:41 2011 +0000 Hal Rosenstock
+68b1e78523f65d2365462473f1c7087c5cd49665
+
+	* libibmad/vendor.c: In ib_vendor_call_via, set errno
+
+Wed Apr 27 11:14:36 2011 +0000 Hal Rosenstock
+32a4414e3b3a852b9fc7d41f5e88fd0d3992ddd6
+
+	* libibmad/gs.c: In pma_query_via/performance_reset_via, set errno
+
+Wed Apr 27 11:14:29 2011 +0000 Hal Rosenstock
+e1fdb508a1050e6760958505f74e592f5ab008db
+
+	* libibmad: Distinguish timed out from other errors
+
+Thu Apr 21 14:24:27 2011 -0700 Ira Weiny
+c6e974a83d2355bb60bde545abd0b3c8226ff323
+
+	* libibmad: Remove libibnetdisc specific define
+
+Tue Apr 5 19:23:44 2011 +0000 Hal Rosenstock
+243868f974a903512a0eb40a489c79e4e01aca89
+
+	* libibmad: Added smp_query/set _status_via functions
+
+Tue Apr 5 19:23:28 2011 +0000 Hal Rosenstock
+ceda34aab87794b4558ab9c2836da5ace46e02b9
+
+	* libibmad/smp.c: Fix to smp_query_via for attribute data
+
+Tue Apr 27 11:15:11 2010 -0400 Hal Rosenstock
+d271059b01ab00ed0284d4b2fde8406d7bc188c8
+
+	* libibmad: Add support for SA GUIDInfoRecord fields
+
+Mon Apr 26 14:24:40 2010 -0400 Hal Rosenstock
+bbe8d061233b3877f0afb0c35899ca03f1f48b50
+
+	* libibmad: Add remaining SM GUIDInfo attribute fields
+
+** Version: libibmad-1.3.7
+
+Mon Feb 14 12:28:24 2011 +0200 Alex Netes
+e857ca151775df5fabac556de49b8222ded2a562
+
+	* libibmad: package versions update
+
+Mon Feb 14 12:24:37 2011 +0200 Alex Netes
+2065091841e11d295028a514347e683e9354520e
+
+	* libibmad: update shared library versions
+
+Thu Feb 3 17:26:15 2011 +0200 Alex Netes
+ffc95ccb3bec0eda66344a2251e399c72c59c2d4
+
+	* Makefile: ChangeLog generation script path fix
+
+Tue Aug 3 10:40:56 2010 -0700 Ira Weiny
+823411b45a2cf9efa3ed0be46f42b677475488e0
+
+	* libibmad/fields.c: Change all PortCounter names to match the Specification
+
+Thu Oct 7 16:33:01 2010 -0600 Jason Gunthorpe
+c51a9cac9d96cc2327ab56da435c4d7ff0fc13e8
+
+	* Fix autotools to include the necessary M4 files
+
+** Version: libibmad-1.3.6
+
+Sat Sep 4 14:15:33 2010 +0300 Sasha Khapyorsky
+bac90fd26fb7788de12354ba4ba779a5986ddbfc
+
+	* management: packages versions update
+
+Sat Sep 4 14:13:06 2010 +0300 Sasha Khapyorsky
+c4471ded010208a72167e1ce1fb373fbcbb6bcd1
+
+	* management: update shared library versions
+
+Wed Jun 2 13:15:31 2010 -0700 Hefty, Sean
+85c88d446eed942d8f09f923647d13c64bccaf51
+
+	* ib/mgmt: fix build under windows stack
+
+** Version: libibmad-1.3.5
+
+Sat May 22 18:00:16 2010 +0300 Sasha Khapyorsky
+fe178903eecea98004382eba3633720592926c16
+
+	* management: packages versions update
+
+Sat May 22 17:52:50 2010 +0300 Sasha Khapyorsky
+da1c98be898fa6a5911f2af528ff6bd8dc086a34
+
+	* management: update shared library versions
+
+Fri May 7 01:23:01 2010 +0300 Sasha Khapyorsky
+ef5a9f7f5e5985fd2c764bd4cceb497c48215310
+
+	* libibmad/src/dump.c: fix compile warning
+
+Thu May 6 13:27:13 2010 -0500 Mike Heinz
+b83ee17e87029203c54ef2a91c311cef4a5abee1
+
+	* management: adding mad_dump_fields to libibmad
+
+Sat Apr 10 16:12:20 2010 +0300 Sasha Khapyorsky
+cd0d3a7770662a7a359ab3a8ce1476300f02b20e
+
+	* libibmad: add explicit extern for ibdebug prototype
+
+Thu Jan 14 09:11:56 2010 -0500 Hal Rosenstock
+1a02316eb65297de3b49de023dcaaf2c8b7c9d52
+
+	* libibmad: Add support for PortSamplesControl counter
+
+Thu Dec 31 11:57:34 2009 -0500 Hal Rosenstock
+46135fcba9b25a9e069703caa1228cfa18122e01
+
+	* libibmad: Add support for optional PortRcvErrorDetails counter
+
+** Version: libibmad-1.3.4
+
+Sun Dec 13 19:39:11 2009 +0200 Sasha Khapyorsky
+4c31ef70d0c23bf78787cc9799db1f941f2fca11
+
+	* management: package versions bump
+
+Sun Dec 13 19:36:19 2009 +0200 Sasha Khapyorsky
+4c93305a399e646f4100282a8344f52480482e3b
+
+	* management: update library versions
+
+Thu Nov 26 18:00:28 2009 +0200 Sasha Khapyorsky
+2b4d2f8ab737f8e57b16d5c20e8e85c6f48df7ad
+
+	* libibmad: remove repeated comment
+
+Mon Nov 23 12:04:19 2009 +0200 Doron Shoham
+563be0f774c5be6589277be3dcf5df25d09d853c
+
+	* Add different print macros
+
+Tue Nov 17 14:39:37 2009 -0800 Ira Weiny
+f295575c0ac29e7e31f3917895f0309948e51751
+
+	* libibmad: libibumad: Print warnings and errors to stderr not stdout
+
+Fri Nov 6 15:35:19 2009 -0500 Hal Rosenstock
+16803d75c27b64813c13fd1617a56ec725ba02e0
+
+	* libibmad: Add support for new PortInfo:McastPkeyTrapSuppressionEnabled field
+
+** Version: libibmad-1.3.3
+
+Sun Nov 1 21:55:47 2009 +0200 Sasha Khapyorsky
+1692f6cc96523ed63dc2018be87e02260ce8601d
+
+	* management: bump package versions
+
+Sun Nov 1 21:42:56 2009 +0200 Sasha Khapyorsky
+238f55c63e905f14abf90378779c936bed854cfc
+
+	* management: update libraries version information
+
+Mon Nov 2 02:09:14 2009 +0200 Sasha Khapyorsky
+c626c73a350c167f2ce64e04bf4756c3dc220c56
+
+	* management: update/add Voltaire copyright
+
+Wed Sep 23 08:57:41 2009 -0400 Hal Rosenstock
+73c18b71b0ea4b5930f2b655a8569403ee96ce16
+
+	* libibmad: Add support for PortXmitDiscardDetails
+
+Sat Oct 24 01:41:16 2009 +0200 Sasha Khapyorsky
+b123c8d1aa8d7ba923d2594ba0e14e2ca9aa886e
+
+	* libibmad: fix strinct-aliasing breakage warnings
+
+Wed Sep 30 16:22:26 2009 -0700 Sean Hefty
+150372bf1c6808c34c9deeab67c88cac9feeee82
+
+	* libibmad/resolve: add include to pick up inet_pton
+
+Wed Sep 30 16:21:38 2009 -0700 Sean Hefty
+c05c03997398b9a7e244df5c5705016cd0a44df8
+
+	* libibmad/rpc: fix build warning casting from uint32 to uint8
+
+Tue Sep 22 09:46:11 2009 -0400 Hal Rosenstock
+b14cb2879ad7e7f8ad5aeabcdf82f3aa3e49e7fc
+
+	* libibmad/dump.c: Fix typo
+
+Wed Sep 2 10:42:50 2009 -0400 Hal Rosenstock
+732fe50a0f5436285b97ea500ad1163d55fba387
+
+	* libibmad/mad.h: Add a couple of SM class attribute IDs
+
+Wed Sep 2 10:36:27 2009 -0400 Hal Rosenstock
+9b6fda7c9e69a37257916a848e81613adbb0d7b3
+
+	* libibmad/dump.c: In mad_dump_portcapmask, decode new capabilities
+
+Wed Aug 26 10:02:02 2009 -0400 Hal Rosenstock
+94c9dc1c02f01ab1117e7a3034cb8be15a88974f
+
+	* libibmad: Add support for MulticastFDBTop
+
+Sun Aug 16 11:37:08 2009 +0300 Sasha Khapyorsky
+a43444200709fbf68ca46392a44ff6b1145cd366
+
+	* libibmad: indentation fixes
+
+Sun Aug 16 11:24:55 2009 +0300 Sasha Khapyorsky
+53be4d0c1bf0af9978a21c033962b70326691a02
+
+	* libibmad: fix warnings
+
+Thu Aug 6 15:27:30 2009 -0700 Ira Weiny
+46b027be13c5ed0ba0610e7f0ffe4567ab483a32
+
+	* libibmad: make accessors function for retry values used in libibmad
+
+Thu Aug 6 16:01:06 2009 -0700 Ira Weiny
+f33bf86df8d1a9db14771d73096b5569d5327ccf
+
+	* libibmad: make accessors function for timeout values used in libibmad
+
+Tue Aug 11 10:04:28 2009 -0700 Ira Weiny
+c2882474ec59c35be81958fca3bd0ecff24e4215
+
+	* libibmad: clear packet buffer correctly before formating and sending
+
+Sun Jul 12 18:23:26 2009 +0300 Sasha Khapyorsky
+9c93b2d8b5bec2f9bd9fa0ff417b9959f6e0fb92
+
+	* libibmad: use NULL as null pointer
+
+Fri Jul 31 10:57:29 2009 -0400 Hal Rosenstock
+c7705994de478db7958532b11fc1ded3ea9bb1d1
+
+	* libibmad/mad.c: Validate DR hop count for SMPs and handle errors
+
+Tue Jul 21 15:50:00 2009 -0700 Ira Weiny
+5ea092e8764317507941bc02826a209007118624
+
+	* libibmad: Ensure the proper length is passed into umad_recv on each call
+
+Wed Apr 22 17:12:58 2009 -0700 Ira Weiny
+dd4e0d86431732630eccdc4497f69e543ca3c924
+
+	* Add ib_resolve_gid_via and make portid an out only parameter of ib_resolve_portid_str_via
+
+Tue Jul 7 16:20:19 2009 +0200 Joachim Fenkes
+9f58e2f29a2a52cf0558f2d84d89ed02371a12e5
+
+	* libibmad: Handle MAD redirection
+
+Wed Jul 8 16:52:09 2009 -0700 Ira Weiny
+9f2b76a0bfeaf45fa537c412f77a0c02cbef4048
+
+	* Fix error return code from mad_send_via
+
+Wed Jun 17 16:08:11 2009 -0400 Hal Rosenstock
+06613dc98f9d6f7ad174c449ad95fc0b1c263f51
+
+	* libibmad/resolve.c: Remove compile warning on x86_64 arch
+
+Fri May 29 11:35:15 2009 -0400 Hal Rosenstock
+74a7ad5670704053142e5787705de5553aa2f932
+
+	* libibmad/resolve.c: Determine SL properly
+
+Mon May 4 15:50:53 2009 -0700 Sean Hefty
+fbf4d3efd484b20e6f112047512d2b31824b8877
+
+	* ib-mgmt/libibmad: export ibdebug
+
+Thu Apr 30 11:19:26 2009 -0700 Ira Weiny
+ac76acf9edfddbf4d42de348653c7083b57bac61
+
+	* Fix reversal of DRSLID and DRDLID in MAD_FIELDS enum.
+
+Fri May 1 17:33:12 2009 -0400 Hal Rosenstock
+a97ef03b4b779b2aeda25227f1c65af671d7058a
+
+	* libibmad: Add support for SA PathRecord SL field
+
+Mon Apr 27 12:59:05 2009 +0200 Nicolas Morey-Chaisemartin
+5b763bbcfd7e346c88b63c97fe5f509c8b0964b6
+
+	* management: Fixed custom_release in SPEC files
+
+Thu Apr 23 10:57:10 2009 -0700 Ira Weiny
+5086d983034737cc9a07f911bad71489d518ea58
+
+	* Add mad_field_name function
+
+Tue Apr 21 12:05:21 2009 -0700 Sean Hefty
+553d852ae24dd074504226cefa697a76830e736a
+
+	* ib-mgmt/ibn3 branch: libibmad: remove ib_resolve_guid function prototype
+
+Tue Apr 21 12:04:08 2009 -0700 Sean Hefty
+16e357a75be9e0bc37af647af40d8d9191234872
+
+	* ib-mgmt/ibn3 branch: libibmad update for windows support
+
+** Version: libibmad-1.3.2
+
+Sun Apr 26 17:05:13 2009 +0300 Sasha Khapyorsky
+33e14dc593325401be99306ffe651c89d6b0ecac
+
+	* management: bump package versions
+
+Wed Mar 11 10:44:28 2009 -0700 Ira Weiny
+8f2425a167fd8c2bf1efca8e72e82d528b107a93
+
+	* libibmad: bump library interface version
+
+Tue Apr 14 09:54:19 2009 -0400 Hal Rosenstock
+2feac141840cefdda7befb2af80872aec9f5ee05
+
+	* libibmad: Add decode support for SwitchInfo OptimizedSLtoVLMappingProgramming
+
+Sat Apr 25 21:53:10 2009 +0300 Sasha Khapyorsky
+578bb5e0989e17da2214be00b0198cd5bd36961c
+
+	* libibmad: indentation fixes
+
+Sat Apr 25 21:48:13 2009 +0300 Sasha Khapyorsky
+ea989f139e121fe797b706f17b70a6605bd5b738
+
+	* infiniabnd-diags/bm.c: check mad_rpc() status
+
+Thu Mar 19 16:25:24 2009 +0200 Itai Baz
+eb47aaad7b92baac189af282d6d785eb71677b78
+
+	* libibmad: added support for handling of BM (Baseboard management) MADs - FIXED without rmpp
+
+Thu Apr 16 09:23:29 2009 -0700 Ira Weiny
+6f00c74e371ab5a34cfe4d3e8acb409652e8bf42
+
+	* change missed LID conversion functions from hex to uint
+
+Wed Mar 11 06:30:59 2009 -0500 Hal Rosenstock
+b5d9521d6af645ba7c10e8bc397aff3d545ba11a
+
+	* libibmad/rpc.c: wrap ERRS macro.
+
+Thu Mar 26 11:39:08 2009 -0500 Hal Rosenstock
+3bfaddbc4059f141a400b3ad5d6513de5d5a6350
+
+	* libibmad/fields.c: Display CounterSelect2 in hex rather than decimal
+
+Tue Mar 24 07:16:42 2009 -0500 Hal Rosenstock
+4b0ef651aaf8b335134f523a97ad92db4a4358bb
+
+	* libibmad/dump.c: Cosmetic formatting changes
+
+Fri Mar 20 18:11:01 2009 -0500 Hal Rosenstock
+06a9fc1fd1cd54a1653c0fca7e21df34a0b4b5ed
+
+	* libibmad: Add PortSelect and CounterSelect fields for PortXmit/RcvDataSL
+
+Sat Mar 21 07:08:40 2009 -0500 Hal Rosenstock
+399d02bc3e5319ed9dadf313239358616428ab0a
+
+	* libibmad/sa.c: Cosmetic formatting changes
+
+Fri Mar 20 08:37:21 2009 -0500 Hal Rosenstock
+ef1c6500ed880e5f38a2aa63be8d39ad4beb0a10
+
+	* libibmad/sa.c: No need to specify NumbPath field in Get request of SA PathRecord
+
+Tue Mar 17 16:17:56 2009 +0200 Itai Baz
+0e74ba5720e8c6e025bae8ce197af637b1b78425
+
+	* libibmad/serv.c: Fixed respond function to return proper result code
+
+Mon Mar 16 11:52:25 2009 -0500 Hal Rosenstock
+6264cea37d096acac87b956732cd23342e2a52dd
+
+	* libibmad/libibmad.map: Eliminate perf_classportinfo_query_via
+
+Tue Mar 10 17:51:14 2009 -0500 Hal Rosenstock
+fc1f96594474829b9080944d2f369ad33a71fa1e
+
+	* libibmad/mad.h: Cosmetic formatting changes
+
+Thu Mar 12 09:57:32 2009 -0500 Hal Rosenstock
+54ec44f0b71cfdcf2dd0fce01b842394738c8bd3
+
+	* libibmad/register.c: Cosmetic formatting change
+
+Thu Mar 12 15:24:47 2009 +0200 Sasha Khapyorsky
+8fc227d7c54251634ebd495a66d965e2053534e9
+
+	* libibmad/rpc: fix _do_madrpc() parameter value
+
+Wed Mar 11 12:28:03 2009 +0200 Sasha Khapyorsky
+d40c0b5ba31c2d3dc00ec034901a34f6c8871914
+
+	* libibmad: deprecate old API calls
+
+Wed Mar 11 12:43:47 2009 +0200 Sasha Khapyorsky
+667ecafc7158006c6a64823bd141d4aa562e3bd6
+
+	* libibmad: add mad_rpc_class_agent() call
+
+Wed Mar 11 12:15:54 2009 +0200 Sasha Khapyorsky
+8274786bf6441ecc6fdcf8f3da0a3c7a24d2a856
+
+	* libibmad: per port timeout and retires setup
+
+Thu Mar 12 13:55:44 2009 +0200 Sasha Khapyorsky
+ba5dde85b5085a41da42b923135998e2ab57735c
+
+	* libibmad/rpc: fix class registration bug
+
+Sat Mar 7 23:27:34 2009 +0200 Sasha Khapyorsky
+aaea56da467b1c640c8a0fe5bc77ac5dc79f7f5a
+
+	* libibmad: cleanup deprecated function use
+
+Thu Feb 19 17:53:30 2009 -0800 Ira Weiny
+45bb82cd10776719e11d01680a6c32cd2eb617a3
+
+	* infiniband-diags: Convert ibsendtrap to "new" ibmad interface
+
+Fri Mar 6 10:48:08 2009 -0800 Ira Weiny
+0aae0923e72a015862a1fa440e3834047497b69c
+
+	* infiniband-diags: Convert ibaddr to "new" ibmad interface
+
+Thu Mar 5 16:45:04 2009 +0200 Or Gerlitz
+ddab050d6bfb974a1d993028f1a2e2ef1b8061c3
+
+	* fix offset used for parsing of XmtDataSL & RcvDataSL
+
+Wed Feb 18 16:37:36 2009 -0800 Ira Weiny
+dc628e5cafa8a21eb06404c67d825337e20c73cb
+
+	* libibmad: Clean up "new" interface
+
+Sun Mar 1 14:40:32 2009 +0200 Or Gerlitz
+b4852b3f5b17b8757dce980ed31d90315261f3a0
+
+	* libimad implementation of PortXmtDataSL and PortRcvDataSL
+
+Sun Mar 1 14:39:48 2009 +0200 Or Gerlitz
+53f614cf35d31dd5c8c8537e19ee39fc30eb67ec
+
+	* generic libibmad perf query/reset api
+
+** Version: libibmad-1.3.1
+
+Sat Feb 28 18:50:54 2009 +0200 Sasha Khapyorsky
+bb7ee5d604e26bfda2211508bd62a688fedc0f9e
+
+	* management: bump all package versions
+
+Fri Feb 20 16:58:45 2009 -0500 Hal Rosenstock
+3db40d201665691d51c5d00ded95e819993e69a2
+
+	* libibmad/fields.c: Dump LIDs as unsigned decimal
+
+Thu Feb 12 23:31:31 2009 -0800 Stan Smith
+e09be6947c6722023d531daaa504d5eb889d876b
+
+	* libibmad: add MAD_EXPORT to exported calls
+
+Wed Feb 11 04:50:37 2009 +0200 Sasha Khapyorsky
+c52d26b507f7be7533fab3a5f71e4d3ed5ef3b63
+
+	* libibmad/fields.c: define SA SM_Key field details
+
+Wed Feb 11 04:49:58 2009 +0200 Sasha Khapyorsky
+0be7ccff15edefe2cf283d518b6e5f71ed9be5f5
+
+	* libibmad/mad.h: define more SA attributed
+
+Thu Feb 5 16:42:59 2009 -0700 Hal Rosenstock
+bd572aaae9c4a4c514bcba3dd25b9a8488d6a34a
+
+	* libibmad: lid print format changed to unsigned
+
+Thu Feb 5 10:03:31 2009 -0800 Ira Weiny
+9c563cf1484cf5f66934b05314aa6424b4bab5be
+
+	* libibmad: Use enum types for function parameters
+
+Wed Feb 4 10:00:05 2009 +0200 Eli Dorfman (Voltaire)
+c3e1c8b8d76677bd88780e58f59c37ac5a8dd007
+
+	* libibmad/src/dump.c fix dump functions for big endian machines
+
+Mon Feb 2 11:58:35 2009 -0700 Hal Rosenstock
+c5affc5408396dd8b406cc9fce8c4cfc4996b7ab
+
+	* libibmad/(mad.h fields.c): Add support for PerfMgt ClassPortInfo
+
+Thu Jan 22 03:07:47 2009 +0200 Sasha Khapyorsky
+a9a4867e3b488222bfdad906702cd12d7f844df7
+
+	* libibmad: use mad_set_field64() for mkey encoding
+
+Thu Jan 22 11:11:13 2009 +0200 Sasha Khapyorsky
+50b9b19151b894335d2107035eedada19222961c
+
+	* libibmad/fields.c: fix MAD MKey offset
+
+Thu Jan 22 03:04:00 2009 +0200 Sasha Khapyorsky
+a76413f70b033c4cd3d58b4417d5e408dbbb8d5c
+
+	* libibmad: indentation fixes
+
+Sat Jan 17 08:34:34 2009 -0800 Arlin Davis
+2ed723633c74490f2556d4075ff51eabf81b191e
+
+	* libibmad: minor changes to source to allow portability to WinOF.
+
+Sat Jan 17 08:32:41 2009 -0800 Arlin Davis
+569498b127de478c3993b1d7ca7c37a1585de006
+
+	* libibmad: remove c99 definitions within the ib_mad_f structure
+
+Fri Jan 16 09:15:04 2009 -0800 Arlin Davis
+454f9016bea72fb01daa25ff30683239927122b5
+
+	* libibmad: add os dependent definitions.
+
+Tue Jan 20 20:24:49 2009 +0200 Sasha Khapyorsky
+53f18b2f586d8ac51df3b28ea344b0416a5e02c0
+
+	* libibmad: cleanup mad.h include path
+
+Tue Jan 13 16:56:57 2009 +0200 Eli Dorfman (Voltaire)
+4038364013b989704abce097796242feb8d66568
+
+	* infiniband-diags support PortXmitWait get and set
+
+Tue Jan 13 16:31:42 2009 +0200 Eli Dorfman (Voltaire)
+79635485c31d3e2f048f9f6b93e33d283648f335
+
+	* libibmad add PortXmitWait and CounterSelect2 to fields.
+
+Fri Dec 26 16:47:06 2008 +0200 Sasha Khapyorsky
+f371708645f1a726eb3a5b5d29866f77223ca6c6
+
+	* libibmad: remove functions which use pthread
+
+Thu Dec 25 21:43:17 2008 +0200 Sasha Khapyorsky
+4db29c36603c49c87c9823e8a731508556e9d9f0
+
+	* libibmad: remove not needed header files inclusion
+
+Mon Dec 22 02:26:31 2008 +0200 Sasha Khapyorsky
+5efd5d7c44cccedeaadaa6a485d0e4b56fd12c90
+
+	* management: remove libibcommon dependencies
+
+Mon Dec 22 00:24:30 2008 +0200 Sasha Khapyorsky
+9c5dacf6d7f9059e1eef1a84cf37378917af7f5e
+
+	* management: move sysfs()_* function to libibumad
+
+Sun Dec 21 23:48:00 2008 +0200 Sasha Khapyorsky
+1c043f92133851a1cb99000e5f9c3b13a4e135c1
+
+	* libibmad: remove hidden _set/_get_field*() API
+
+** Version: libibmad-1.3.0
+
+Sat Dec 13 19:46:15 2008 +0200 Sasha Khapyorsky
+45f383d960c5dce20e7a413a2ff6c80a0c82e4b2
+
+	* management: bump all package versions
+
 ** Version: libibmad-1.2.3
 
 Tue Nov 18 06:20:46 2008 +0200 Sasha Khapyorsky
-dd5aa2cebc760f239b965c87388ffe9b0401c5d2
+ba36740ca7e7900ed616c92bb24875ac19276430
+
+	* management: update versions
+
+Fri Oct 24 22:12:58 2008 +0200 Sasha Khapyorsky
+c0d1f90e5b98fa6db0c9cec89d90662f26237d59
+
+	* libibmad/dump: print more PortInfo:CapabilityMask bits
+
+Fri Oct 24 21:14:15 2008 +0200 Sasha Khapyorsky
+08fa37bff2f919a1e5978b00ec8dfbe9a753acc0
+
+	* libibmad/src/mad.c: indentation fix
+
+** Version: libibmad-1.2.2
+
+Sun Oct 19 20:53:23 2008 +0200 Sasha Khapyorsky
+3a199de1edadbb5f5dc371116912aacabd177e18
+
+	* management/*/configure.in: bump all versions
+
+Wed Oct 8 12:28:44 2008 +0200 Sasha Khapyorsky
+5cca38069839e37a86b632dacd15061d5c181f7d
+
+	* management: update Voltaire copyright
+
+Wed Oct 8 12:27:12 2008 +0200 Sasha Khapyorsky
+f5999be595a05fdd3b0068ec7e56308b69e9af44
+
+	* management/*/COPYING: update Voltaire copyright years
+
+Wed Sep 24 16:59:19 2008 +0300 Jack Morgenstein
+9a789c27897daf97a312a946e9eb94d30ff51185
+
+	* libibmad: eliminate compiler warnings on x86_64
+
+Fri Jul 25 09:27:47 2008 -0400 Hal Rosenstock
+96d5c2fd5fc85803844663afd2a1b176d10327b2
+
+	* libibmad/ChangeLog: Fix typo
+
+Tue Jul 8 22:09:55 2008 +0300 Sasha Khapyorsky
+6b531e167c9a8124a3811d353973e1484f35e951
+
+	* libibmad: Bump a library version
+
+** Version: libibmad-1.2.1
+
+Tue Jul 8 07:22:02 2008 +0300 Sasha Khapyorsky
+b6398b8651df12989f752be1227b9f1b765d3989
+
+	* management: bump management versions
+
+Mon Jul 7 14:10:25 2008 -0700 Hal Rosenstock
+7d7ee95e8cd3055451512e916ab4b2679147b80a
+
+	* libibmad: Initial changes for congestion management class
+
+Mon Jul 7 14:07:31 2008 -0700 Hal Rosenstock
+188d51337b0d5d7505ccc97c621f0ed4e5cb407a
+
+	* libibmad/src/rpc.c: Eliminate compiler warning
+
+Sun Jul 6 23:07:38 2008 +0300 Sasha Khapyorsky
+fc9d40791d2a845f86ab3640d84b6bf0838c65cc
+
+	* management: revert configure.in update configure.in on 'make dist'
+
+Sun Jun 29 19:05:01 2008 +0300 Sasha Khapyorsky
+a93c8cb8b26d863a6997fd87980b13386183da13
+
+	* libibmad: fix snprintf() usage
+
+Fri Jun 27 18:08:26 2008 +0300 Sasha Khapyorsky
+4cc83834358270ba25f6a08d713892dc1a3c8583
+
+	* libibmad: remove intermediate buffer in portid2str()
+
+Wed Jun 25 15:08:13 2008 -0700 Ira K. Weiny
+c50b2e292d9e080b91288d3171a5846c4a20ba5b
+
+	* libibmad: update portid2str to use inet_ntop and drpath2str functions for gid
+
+Tue Jun 24 14:43:24 2008 -0700 Ira K. Weiny
+816da769f7b9018d4b00dd5cb0eeb25fa3192e01
+
+	* libibmad: print warning containing destination port when _do_madrpc fails
+
+Tue Jun 24 16:45:57 2008 -0700 Ira Weiny
+aa6fd764f7db917fbea6e2cd614085fcedeab44c
+
+	* libibmad: add a drpath2str function for easier printing of DR Paths.
+
+Tue Jun 24 22:16:08 2008 +1000 Max Matveev
+7d4cc4e9c57f1296f66667de3cab3a70bc88969c
+
+	* libibmad: allow explicit HCA selection by functions from libibmad
+
+Thu Jun 19 11:04:29 2008 -0700 Hal Rosenstock
+08d91095024bc6087498a75b2da28c0948a33572
+
+	* libibmad/rpc.c: Better error message in madrpc_init
+
+Thu Jun 5 11:14:38 2008 -0700 Hal Rosenstock
+b1e6dd71c32a111f0249b0fc9acc2f76a1a1003d
+
+	* libibmad/fields.c: _set_field64 sets field in network rather than host order
+
+Sun Jun 1 18:54:35 2008 +0000 Ron Livne
+1107325cfc41cabafd9f9d28212f6f33c3ea5ec5
+
+	* libibmad: fix for umad unaligned access of ia64.
+
+** Version: 1.3.9
+
+Thu May 31 16:14:32 2012 -0700 Ira Weiny
+0736b2857fd1f81d1ae23293610a425726f6ceee
+
+	* Update README for 1.3.9 release
+
+Fri May 25 15:33:01 2012 -0700 Jim Foraker
+27925f14149158062bd15fff0d943d1899020398
+
+	* libibmad/dump.c: clean up boundary conditions in dump routines
+
+Mon Apr 30 13:26:12 2012 -0400 Hal Rosenstock
+0b0ab0ee64f52d708ff8b23b3eb6e379aeb1465b
+
+	* libibmad/fields.c: Update counter offsets for PortExtendedSpeedsCounters
+
+Wed Apr 25 14:06:25 2012 -0700 Albert Chu
+95d4955e36e8737210ee2e4d36e85602d8704c74
+
+	* libibmad: fix misspelling
+
+Tue Mar 6 14:12:29 2012 -0800 Jim Foraker
+1506d7ac6401f154c377e4255fbcab957ff0c66e
+
+	* libibmad: Add MKey support to SMP requests via smp_mkey_get/set()
+
+Thu Dec 8 14:09:34 2011 -0800 Albert Chu
+115679cb548f1024cebb82ab2fbe8615b9b95a4c
+
+	* libibmad: Add support for congestion control config mads.
+
+Mon Nov 28 06:01:28 2011 -0800 Hal Rosenstock
+033143348b62bcdd6f2c4da02ee8794c9a3ffc24
+
+	* libibmad: Add support for SA NodeRecord
+
+Thu Nov 10 05:48:46 2011 -0800 Hal Rosenstock
+9fcdf151f722b3a0cd6eba69736201c0975461ca
+
+	* libibmad/rpc.c: On receive, add debug info for dumping incoming MAD address
+
+Thu Sep 29 11:26:48 2011 -0700 Ira Weiny
+ec98cd1bda422f04ca7b4fdf3ba0bafdf0d12fea
+
+	* Update version for next release
+
+Wed Sep 7 11:02:52 2011 -0700 Albert Chu
+9fd2087f6fedd8ceeb1949c2394bd89a243c6a8f
+
+	* Support classportinfo dump function
+
+Tue Aug 2 11:16:54 2011 -0700 Albert Chu
+ce716fc1644ecb7fbabb0e166219b49e0315fe32
+
+	* Add support for congestion control mads
+
+Mon Aug 15 10:32:40 2011 -0700 Ira Weiny
+fa8f6015537b55dfc14b1d93ee494f0dd8b12cce
+
+	* Update AUTHORS and add README with release notes
+
+** Version: 1.3.8-1chaos
+
+Thu Sep 22 14:26:27 2011 -0700 Ira Weiny
+037c5fde64efd51b321b001b7613424185ec5e3f
+
+	* Tag it
+
+Wed Sep 7 11:02:52 2011 -0700 Albert Chu
+2a6b41dd96a19464cbbc1176116a943e8391452d
+
+	* Support classportinfo dump function
+
+Tue Aug 2 11:16:54 2011 -0700 Albert Chu
+071c8055f37b67f73fcf7624f8d1497aa1a341d2
+
+	* Add support for congestion control mads
+
+Mon Aug 15 10:32:40 2011 -0700 Ira Weiny
+ff30ed1eeeefb70e393971f29fc0730449504d75
+
+	* Update AUTHORS and add README with release notes
+
+Tue Aug 23 16:49:49 2011 -0700 Ira Weiny
+d3f60dba2094f47f817ca1b42dbb12b412126c39
+
+	* tag: 1.3.7-2chaos
+
+Thu Feb 24 14:57:25 2011 -0800 Ira Weiny
+0f1ffe6d7318389fa0d2c432e9b55300b73a8abd
+
+	* Add this file for Chaos build bot
+
+** Version: 1.3.8
+
+Mon Aug 15 10:32:40 2011 -0700 Ira Weiny
+fa8f6015537b55dfc14b1d93ee494f0dd8b12cce
+
+	* Update AUTHORS and add README with release notes
+
+Thu Aug 18 16:46:49 2011 +0000 shefty
+43eed2dba29f3998bebf09350b556253e7307f72
+
+	* libibmad: Fix build on win8
+
+Mon Aug 15 20:39:14 2011 +0000 Hal Rosenstock
+38e9ac42ad2d9fc53fadddb2db30963695cdb486
+
+	* libibmad: Add support for PortInfo CapabilityMask2
+
+Mon Aug 15 20:49:07 2011 +0000 Hal Rosenstock
+a872bcdb84beb0e44b82f5eec11c9b1d6a24983f
+
+	* libibmad/dump.c: Allow 0 (extended speed active) in mad_dump_linkspeed
+
+Mon Aug 15 20:23:12 2011 +0000 Hal Rosenstock
+37b344ecf169c1f0164bf843c6954ac76921ac1f
+
+	* libibmad/dump.c: Add IsOptionalIPDSupported into mad_dump_portcapmask
+
+Wed Aug 3 11:16:37 2011 -0700 Ira Weiny
+818fcb2260ea0308e09ad434acb76691d25ff95d
+
+	* libibmad: Make new feild names consistent
+
+Fri Jul 22 11:22:03 2011 +0000 Hal Rosenstock
+627185f6cace120abaa4ab9f10455050f9c49eab
+
+	* libibmad: Support for Mellanox vendor specific ExtendedPortInfo SM class MAD
+
+Thu Jul 14 15:03:38 2011 -0700 Albert L. Chu
+e4713b26e791de21792df0e3f03b73b3e8442f72
+
+	* Support optional performance counters, including congestion control performance counters.
+
+Wed Jul 20 11:52:47 2011 -0700 Albert L.Chu
+4805e14bedb78a28032920e9b1610ca54c5b59bd
+
+	* Fix offset in various < 32 bit field entries
+
+Thu Jul 7 17:40:18 2011 -0700 Ira Weiny
+db5e5526a58cb7209791eedcda49f5c7b97f6265
+
+	* libibmad: make IB_GUID_GUID0_F consistent with new GUIDInfo fields
+
+Mon Jul 11 12:08:23 2011 +0000 Hal Rosenstock
+4d1d186109f8acd083d7195902351249c991b831
+
+	* libibmad: Add PortExtendedSpeedsCounters support
+
+Thu Jul 7 09:50:03 2011 -0700 Hal Rosenstock
+0f25a224e71728efb31b89960f6c538e6f45214e
+
+	* libibmad: Add initial extended speed support
+
+Wed Jul 6 14:30:27 2011 -0700 Ira Weiny
+92d5ee1e3c23f17f06385f713768343eb399e49a
+
+	* libibmad: Remove reference to OpenSM in COPYING file
+
+Tue Jul 5 06:09:10 2011 -0700 Hal Rosenstock
+e6fb2846ea648afc7724a83e13bc806f7cd55de2
+
+	* libibmad: Fix backward compatibility
+
+Wed Jun 1 06:45:57 2011 -0700 Hal Rosenstock
+e48518d8cb832d70856808610592a97f3140d6f7
+
+	* libibmad/[register rpc].c: Fix some bounds checks
+
+Wed Apr 27 11:14:41 2011 +0000 Hal Rosenstock
+68b1e78523f65d2365462473f1c7087c5cd49665
+
+	* libibmad/vendor.c: In ib_vendor_call_via, set errno
+
+Wed Apr 27 11:14:36 2011 +0000 Hal Rosenstock
+32a4414e3b3a852b9fc7d41f5e88fd0d3992ddd6
+
+	* libibmad/gs.c: In pma_query_via/performance_reset_via, set errno
+
+Wed Apr 27 11:14:29 2011 +0000 Hal Rosenstock
+e1fdb508a1050e6760958505f74e592f5ab008db
+
+	* libibmad: Distinguish timed out from other errors
+
+Thu Apr 21 14:24:27 2011 -0700 Ira Weiny
+c6e974a83d2355bb60bde545abd0b3c8226ff323
+
+	* libibmad: Remove libibnetdisc specific define
+
+Tue Apr 5 19:23:44 2011 +0000 Hal Rosenstock
+243868f974a903512a0eb40a489c79e4e01aca89
+
+	* libibmad: Added smp_query/set _status_via functions
+
+Tue Apr 5 19:23:28 2011 +0000 Hal Rosenstock
+ceda34aab87794b4558ab9c2836da5ace46e02b9
+
+	* libibmad/smp.c: Fix to smp_query_via for attribute data
+
+Tue Apr 27 11:15:11 2010 -0400 Hal Rosenstock
+d271059b01ab00ed0284d4b2fde8406d7bc188c8
+
+	* libibmad: Add support for SA GUIDInfoRecord fields
+
+Mon Apr 26 14:24:40 2010 -0400 Hal Rosenstock
+bbe8d061233b3877f0afb0c35899ca03f1f48b50
+
+	* libibmad: Add remaining SM GUIDInfo attribute fields
+
+** Version: 1.3.7-chaos1
+
+Thu Feb 24 14:57:25 2011 -0800 Ira Weiny
+186a02b4e7052503b8bd43db3e2e0637da0db38b
+
+	* Add this file for Chaos build bot
+
+** Version: 1.3.7-2chaos
+
+Tue Aug 23 16:49:49 2011 -0700 Ira Weiny
+d3f60dba2094f47f817ca1b42dbb12b412126c39
+
+	* tag: 1.3.7-2chaos
+
+Thu Feb 24 14:57:25 2011 -0800 Ira Weiny
+0f1ffe6d7318389fa0d2c432e9b55300b73a8abd
+
+	* Add this file for Chaos build bot
+
+Thu Aug 18 16:46:49 2011 +0000 shefty
+43eed2dba29f3998bebf09350b556253e7307f72
+
+	* libibmad: Fix build on win8
+
+Mon Aug 15 20:39:14 2011 +0000 Hal Rosenstock
+38e9ac42ad2d9fc53fadddb2db30963695cdb486
+
+	* libibmad: Add support for PortInfo CapabilityMask2
+
+Mon Aug 15 20:49:07 2011 +0000 Hal Rosenstock
+a872bcdb84beb0e44b82f5eec11c9b1d6a24983f
+
+	* libibmad/dump.c: Allow 0 (extended speed active) in mad_dump_linkspeed
+
+Mon Aug 15 20:23:12 2011 +0000 Hal Rosenstock
+37b344ecf169c1f0164bf843c6954ac76921ac1f
+
+	* libibmad/dump.c: Add IsOptionalIPDSupported into mad_dump_portcapmask
+
+Wed Aug 3 11:16:37 2011 -0700 Ira Weiny
+818fcb2260ea0308e09ad434acb76691d25ff95d
+
+	* libibmad: Make new feild names consistent
+
+Fri Jul 22 11:22:03 2011 +0000 Hal Rosenstock
+627185f6cace120abaa4ab9f10455050f9c49eab
+
+	* libibmad: Support for Mellanox vendor specific ExtendedPortInfo SM class MAD
+
+Thu Jul 14 15:03:38 2011 -0700 Albert L. Chu
+e4713b26e791de21792df0e3f03b73b3e8442f72
+
+	* Support optional performance counters, including congestion control performance counters.
+
+Wed Jul 20 11:52:47 2011 -0700 Albert L.Chu
+4805e14bedb78a28032920e9b1610ca54c5b59bd
+
+	* Fix offset in various < 32 bit field entries
+
+Thu Jul 7 17:40:18 2011 -0700 Ira Weiny
+db5e5526a58cb7209791eedcda49f5c7b97f6265
+
+	* libibmad: make IB_GUID_GUID0_F consistent with new GUIDInfo fields
+
+Mon Jul 11 12:08:23 2011 +0000 Hal Rosenstock
+4d1d186109f8acd083d7195902351249c991b831
+
+	* libibmad: Add PortExtendedSpeedsCounters support
+
+Thu Jul 7 09:50:03 2011 -0700 Hal Rosenstock
+0f25a224e71728efb31b89960f6c538e6f45214e
+
+	* libibmad: Add initial extended speed support
+
+Wed Jul 6 14:30:27 2011 -0700 Ira Weiny
+92d5ee1e3c23f17f06385f713768343eb399e49a
+
+	* libibmad: Remove reference to OpenSM in COPYING file
+
+Tue Jul 5 06:09:10 2011 -0700 Hal Rosenstock
+e6fb2846ea648afc7724a83e13bc806f7cd55de2
+
+	* libibmad: Fix backward compatibility
+
+Wed Jun 1 06:45:57 2011 -0700 Hal Rosenstock
+e48518d8cb832d70856808610592a97f3140d6f7
+
+	* libibmad/[register rpc].c: Fix some bounds checks
+
+Wed Apr 27 11:14:41 2011 +0000 Hal Rosenstock
+68b1e78523f65d2365462473f1c7087c5cd49665
+
+	* libibmad/vendor.c: In ib_vendor_call_via, set errno
+
+Wed Apr 27 11:14:36 2011 +0000 Hal Rosenstock
+32a4414e3b3a852b9fc7d41f5e88fd0d3992ddd6
+
+	* libibmad/gs.c: In pma_query_via/performance_reset_via, set errno
+
+Wed Apr 27 11:14:29 2011 +0000 Hal Rosenstock
+e1fdb508a1050e6760958505f74e592f5ab008db
+
+	* libibmad: Distinguish timed out from other errors
+
+Thu Apr 21 14:24:27 2011 -0700 Ira Weiny
+c6e974a83d2355bb60bde545abd0b3c8226ff323
+
+	* libibmad: Remove libibnetdisc specific define
+
+Tue Apr 5 19:23:44 2011 +0000 Hal Rosenstock
+243868f974a903512a0eb40a489c79e4e01aca89
+
+	* libibmad: Added smp_query/set _status_via functions
+
+Tue Apr 5 19:23:28 2011 +0000 Hal Rosenstock
+ceda34aab87794b4558ab9c2836da5ace46e02b9
+
+	* libibmad/smp.c: Fix to smp_query_via for attribute data
+
+Tue Apr 27 11:15:11 2010 -0400 Hal Rosenstock
+d271059b01ab00ed0284d4b2fde8406d7bc188c8
+
+	* libibmad: Add support for SA GUIDInfoRecord fields
+
+Mon Apr 26 14:24:40 2010 -0400 Hal Rosenstock
+bbe8d061233b3877f0afb0c35899ca03f1f48b50
+
+	* libibmad: Add remaining SM GUIDInfo attribute fields
+
+Mon Feb 14 12:28:24 2011 +0200 Alex Netes
+e857ca151775df5fabac556de49b8222ded2a562
+
+	* libibmad: package versions update
+
+Mon Feb 14 12:24:37 2011 +0200 Alex Netes
+2065091841e11d295028a514347e683e9354520e
+
+	* libibmad: update shared library versions
+
+Thu Feb 3 17:26:15 2011 +0200 Alex Netes
+ffc95ccb3bec0eda66344a2251e399c72c59c2d4
+
+	* Makefile: ChangeLog generation script path fix
+
+Tue Aug 3 10:40:56 2010 -0700 Ira Weiny
+823411b45a2cf9efa3ed0be46f42b677475488e0
+
+	* libibmad/fields.c: Change all PortCounter names to match the Specification
+
+Thu Oct 7 16:33:01 2010 -0600 Jason Gunthorpe
+c51a9cac9d96cc2327ab56da435c4d7ff0fc13e8
+
+	* Fix autotools to include the necessary M4 files
+
+Sat Sep 4 14:15:33 2010 +0300 Sasha Khapyorsky
+bac90fd26fb7788de12354ba4ba779a5986ddbfc
+
+	* management: packages versions update
+
+Sat Sep 4 14:13:06 2010 +0300 Sasha Khapyorsky
+c4471ded010208a72167e1ce1fb373fbcbb6bcd1
+
+	* management: update shared library versions
+
+Wed Jun 2 13:15:31 2010 -0700 Hefty, Sean
+85c88d446eed942d8f09f923647d13c64bccaf51
+
+	* ib/mgmt: fix build under windows stack
+
+Sat May 22 18:00:16 2010 +0300 Sasha Khapyorsky
+fe178903eecea98004382eba3633720592926c16
+
+	* management: packages versions update
+
+Sat May 22 17:52:50 2010 +0300 Sasha Khapyorsky
+da1c98be898fa6a5911f2af528ff6bd8dc086a34
+
+	* management: update shared library versions
+
+Fri May 7 01:23:01 2010 +0300 Sasha Khapyorsky
+ef5a9f7f5e5985fd2c764bd4cceb497c48215310
+
+	* libibmad/src/dump.c: fix compile warning
+
+Thu May 6 13:27:13 2010 -0500 Mike Heinz
+b83ee17e87029203c54ef2a91c311cef4a5abee1
+
+	* management: adding mad_dump_fields to libibmad
+
+Sat Apr 10 16:12:20 2010 +0300 Sasha Khapyorsky
+cd0d3a7770662a7a359ab3a8ce1476300f02b20e
+
+	* libibmad: add explicit extern for ibdebug prototype
+
+Thu Jan 14 09:11:56 2010 -0500 Hal Rosenstock
+1a02316eb65297de3b49de023dcaaf2c8b7c9d52
+
+	* libibmad: Add support for PortSamplesControl counter
+
+Thu Dec 31 11:57:34 2009 -0500 Hal Rosenstock
+46135fcba9b25a9e069703caa1228cfa18122e01
+
+	* libibmad: Add support for optional PortRcvErrorDetails counter
+
+Sun Dec 13 19:39:11 2009 +0200 Sasha Khapyorsky
+4c31ef70d0c23bf78787cc9799db1f941f2fca11
+
+	* management: package versions bump
+
+Sun Dec 13 19:36:19 2009 +0200 Sasha Khapyorsky
+4c93305a399e646f4100282a8344f52480482e3b
+
+	* management: update library versions
+
+Thu Nov 26 18:00:28 2009 +0200 Sasha Khapyorsky
+2b4d2f8ab737f8e57b16d5c20e8e85c6f48df7ad
+
+	* libibmad: remove repeated comment
+
+Mon Nov 23 12:04:19 2009 +0200 Doron Shoham
+563be0f774c5be6589277be3dcf5df25d09d853c
+
+	* Add different print macros
+
+Tue Nov 17 14:39:37 2009 -0800 Ira Weiny
+f295575c0ac29e7e31f3917895f0309948e51751
+
+	* libibmad: libibumad: Print warnings and errors to stderr not stdout
+
+Fri Nov 6 15:35:19 2009 -0500 Hal Rosenstock
+16803d75c27b64813c13fd1617a56ec725ba02e0
+
+	* libibmad: Add support for new PortInfo:McastPkeyTrapSuppressionEnabled field
+
+Sun Nov 1 21:55:47 2009 +0200 Sasha Khapyorsky
+1692f6cc96523ed63dc2018be87e02260ce8601d
+
+	* management: bump package versions
+
+Sun Nov 1 21:42:56 2009 +0200 Sasha Khapyorsky
+238f55c63e905f14abf90378779c936bed854cfc
+
+	* management: update libraries version information
+
+Mon Nov 2 02:09:14 2009 +0200 Sasha Khapyorsky
+c626c73a350c167f2ce64e04bf4756c3dc220c56
+
+	* management: update/add Voltaire copyright
+
+Wed Sep 23 08:57:41 2009 -0400 Hal Rosenstock
+73c18b71b0ea4b5930f2b655a8569403ee96ce16
+
+	* libibmad: Add support for PortXmitDiscardDetails
+
+Sat Oct 24 01:41:16 2009 +0200 Sasha Khapyorsky
+b123c8d1aa8d7ba923d2594ba0e14e2ca9aa886e
+
+	* libibmad: fix strinct-aliasing breakage warnings
+
+Wed Sep 30 16:22:26 2009 -0700 Sean Hefty
+150372bf1c6808c34c9deeab67c88cac9feeee82
+
+	* libibmad/resolve: add include to pick up inet_pton
+
+Wed Sep 30 16:21:38 2009 -0700 Sean Hefty
+c05c03997398b9a7e244df5c5705016cd0a44df8
+
+	* libibmad/rpc: fix build warning casting from uint32 to uint8
+
+Tue Sep 22 09:46:11 2009 -0400 Hal Rosenstock
+b14cb2879ad7e7f8ad5aeabcdf82f3aa3e49e7fc
+
+	* libibmad/dump.c: Fix typo
+
+Wed Sep 2 10:42:50 2009 -0400 Hal Rosenstock
+732fe50a0f5436285b97ea500ad1163d55fba387
+
+	* libibmad/mad.h: Add a couple of SM class attribute IDs
+
+Wed Sep 2 10:36:27 2009 -0400 Hal Rosenstock
+9b6fda7c9e69a37257916a848e81613adbb0d7b3
+
+	* libibmad/dump.c: In mad_dump_portcapmask, decode new capabilities
+
+Wed Aug 26 10:02:02 2009 -0400 Hal Rosenstock
+94c9dc1c02f01ab1117e7a3034cb8be15a88974f
+
+	* libibmad: Add support for MulticastFDBTop
+
+Sun Aug 16 11:37:08 2009 +0300 Sasha Khapyorsky
+a43444200709fbf68ca46392a44ff6b1145cd366
+
+	* libibmad: indentation fixes
+
+Sun Aug 16 11:24:55 2009 +0300 Sasha Khapyorsky
+53be4d0c1bf0af9978a21c033962b70326691a02
+
+	* libibmad: fix warnings
+
+Thu Aug 6 15:27:30 2009 -0700 Ira Weiny
+46b027be13c5ed0ba0610e7f0ffe4567ab483a32
+
+	* libibmad: make accessors function for retry values used in libibmad
+
+Thu Aug 6 16:01:06 2009 -0700 Ira Weiny
+f33bf86df8d1a9db14771d73096b5569d5327ccf
+
+	* libibmad: make accessors function for timeout values used in libibmad
+
+Tue Aug 11 10:04:28 2009 -0700 Ira Weiny
+c2882474ec59c35be81958fca3bd0ecff24e4215
+
+	* libibmad: clear packet buffer correctly before formating and sending
+
+Sun Jul 12 18:23:26 2009 +0300 Sasha Khapyorsky
+9c93b2d8b5bec2f9bd9fa0ff417b9959f6e0fb92
+
+	* libibmad: use NULL as null pointer
+
+Fri Jul 31 10:57:29 2009 -0400 Hal Rosenstock
+c7705994de478db7958532b11fc1ded3ea9bb1d1
+
+	* libibmad/mad.c: Validate DR hop count for SMPs and handle errors
+
+Tue Jul 21 15:50:00 2009 -0700 Ira Weiny
+5ea092e8764317507941bc02826a209007118624
+
+	* libibmad: Ensure the proper length is passed into umad_recv on each call
+
+Wed Apr 22 17:12:58 2009 -0700 Ira Weiny
+dd4e0d86431732630eccdc4497f69e543ca3c924
+
+	* Add ib_resolve_gid_via and make portid an out only parameter of ib_resolve_portid_str_via
+
+Tue Jul 7 16:20:19 2009 +0200 Joachim Fenkes
+9f58e2f29a2a52cf0558f2d84d89ed02371a12e5
+
+	* libibmad: Handle MAD redirection
+
+Wed Jul 8 16:52:09 2009 -0700 Ira Weiny
+9f2b76a0bfeaf45fa537c412f77a0c02cbef4048
+
+	* Fix error return code from mad_send_via
+
+Wed Jun 17 16:08:11 2009 -0400 Hal Rosenstock
+06613dc98f9d6f7ad174c449ad95fc0b1c263f51
+
+	* libibmad/resolve.c: Remove compile warning on x86_64 arch
+
+Fri May 29 11:35:15 2009 -0400 Hal Rosenstock
+74a7ad5670704053142e5787705de5553aa2f932
+
+	* libibmad/resolve.c: Determine SL properly
+
+Mon May 4 15:50:53 2009 -0700 Sean Hefty
+fbf4d3efd484b20e6f112047512d2b31824b8877
+
+	* ib-mgmt/libibmad: export ibdebug
+
+Thu Apr 30 11:19:26 2009 -0700 Ira Weiny
+ac76acf9edfddbf4d42de348653c7083b57bac61
+
+	* Fix reversal of DRSLID and DRDLID in MAD_FIELDS enum.
+
+Fri May 1 17:33:12 2009 -0400 Hal Rosenstock
+a97ef03b4b779b2aeda25227f1c65af671d7058a
+
+	* libibmad: Add support for SA PathRecord SL field
+
+Mon Apr 27 12:59:05 2009 +0200 Nicolas Morey-Chaisemartin
+5b763bbcfd7e346c88b63c97fe5f509c8b0964b6
+
+	* management: Fixed custom_release in SPEC files
+
+Sun Apr 26 17:05:13 2009 +0300 Sasha Khapyorsky
+33e14dc593325401be99306ffe651c89d6b0ecac
+
+	* management: bump package versions
+
+Wed Mar 11 10:44:28 2009 -0700 Ira Weiny
+8f2425a167fd8c2bf1efca8e72e82d528b107a93
+
+	* libibmad: bump library interface version
+
+Tue Apr 14 09:54:19 2009 -0400 Hal Rosenstock
+2feac141840cefdda7befb2af80872aec9f5ee05
+
+	* libibmad: Add decode support for SwitchInfo OptimizedSLtoVLMappingProgramming
+
+Sat Apr 25 21:53:10 2009 +0300 Sasha Khapyorsky
+578bb5e0989e17da2214be00b0198cd5bd36961c
+
+	* libibmad: indentation fixes
+
+Sat Apr 25 21:48:13 2009 +0300 Sasha Khapyorsky
+ea989f139e121fe797b706f17b70a6605bd5b738
+
+	* infiniabnd-diags/bm.c: check mad_rpc() status
+
+Thu Mar 19 16:25:24 2009 +0200 Itai Baz
+eb47aaad7b92baac189af282d6d785eb71677b78
+
+	* libibmad: added support for handling of BM (Baseboard management) MADs - FIXED without rmpp
+
+Thu Apr 23 10:57:10 2009 -0700 Ira Weiny
+5086d983034737cc9a07f911bad71489d518ea58
+
+	* Add mad_field_name function
+
+Tue Apr 21 12:05:21 2009 -0700 Sean Hefty
+553d852ae24dd074504226cefa697a76830e736a
+
+	* ib-mgmt/ibn3 branch: libibmad: remove ib_resolve_guid function prototype
+
+Tue Apr 21 12:04:08 2009 -0700 Sean Hefty
+16e357a75be9e0bc37af647af40d8d9191234872
+
+	* ib-mgmt/ibn3 branch: libibmad update for windows support
+
+Thu Apr 16 09:23:29 2009 -0700 Ira Weiny
+6f00c74e371ab5a34cfe4d3e8acb409652e8bf42
+
+	* change missed LID conversion functions from hex to uint
+
+Wed Mar 11 06:30:59 2009 -0500 Hal Rosenstock
+b5d9521d6af645ba7c10e8bc397aff3d545ba11a
+
+	* libibmad/rpc.c: wrap ERRS macro.
+
+Thu Mar 26 11:39:08 2009 -0500 Hal Rosenstock
+3bfaddbc4059f141a400b3ad5d6513de5d5a6350
+
+	* libibmad/fields.c: Display CounterSelect2 in hex rather than decimal
+
+Tue Mar 24 07:16:42 2009 -0500 Hal Rosenstock
+4b0ef651aaf8b335134f523a97ad92db4a4358bb
+
+	* libibmad/dump.c: Cosmetic formatting changes
+
+Fri Mar 20 18:11:01 2009 -0500 Hal Rosenstock
+06a9fc1fd1cd54a1653c0fca7e21df34a0b4b5ed
+
+	* libibmad: Add PortSelect and CounterSelect fields for PortXmit/RcvDataSL
+
+Sat Mar 21 07:08:40 2009 -0500 Hal Rosenstock
+399d02bc3e5319ed9dadf313239358616428ab0a
+
+	* libibmad/sa.c: Cosmetic formatting changes
+
+Fri Mar 20 08:37:21 2009 -0500 Hal Rosenstock
+ef1c6500ed880e5f38a2aa63be8d39ad4beb0a10
+
+	* libibmad/sa.c: No need to specify NumbPath field in Get request of SA PathRecord
+
+Tue Mar 17 16:17:56 2009 +0200 Itai Baz
+0e74ba5720e8c6e025bae8ce197af637b1b78425
+
+	* libibmad/serv.c: Fixed respond function to return proper result code
+
+Mon Mar 16 11:52:25 2009 -0500 Hal Rosenstock
+6264cea37d096acac87b956732cd23342e2a52dd
+
+	* libibmad/libibmad.map: Eliminate perf_classportinfo_query_via
+
+Tue Mar 10 17:51:14 2009 -0500 Hal Rosenstock
+fc1f96594474829b9080944d2f369ad33a71fa1e
+
+	* libibmad/mad.h: Cosmetic formatting changes
+
+Thu Mar 12 09:57:32 2009 -0500 Hal Rosenstock
+54ec44f0b71cfdcf2dd0fce01b842394738c8bd3
+
+	* libibmad/register.c: Cosmetic formatting change
+
+Thu Mar 12 15:24:47 2009 +0200 Sasha Khapyorsky
+8fc227d7c54251634ebd495a66d965e2053534e9
+
+	* libibmad/rpc: fix _do_madrpc() parameter value
+
+Wed Mar 11 12:28:03 2009 +0200 Sasha Khapyorsky
+d40c0b5ba31c2d3dc00ec034901a34f6c8871914
+
+	* libibmad: deprecate old API calls
+
+Wed Mar 11 12:43:47 2009 +0200 Sasha Khapyorsky
+667ecafc7158006c6a64823bd141d4aa562e3bd6
+
+	* libibmad: add mad_rpc_class_agent() call
+
+Wed Mar 11 12:15:54 2009 +0200 Sasha Khapyorsky
+8274786bf6441ecc6fdcf8f3da0a3c7a24d2a856
+
+	* libibmad: per port timeout and retires setup
+
+Thu Mar 12 13:55:44 2009 +0200 Sasha Khapyorsky
+ba5dde85b5085a41da42b923135998e2ab57735c
+
+	* libibmad/rpc: fix class registration bug
+
+Sat Mar 7 23:27:34 2009 +0200 Sasha Khapyorsky
+aaea56da467b1c640c8a0fe5bc77ac5dc79f7f5a
+
+	* libibmad: cleanup deprecated function use
+
+Thu Feb 19 17:53:30 2009 -0800 Ira Weiny
+45bb82cd10776719e11d01680a6c32cd2eb617a3
+
+	* infiniband-diags: Convert ibsendtrap to "new" ibmad interface
+
+Fri Mar 6 10:48:08 2009 -0800 Ira Weiny
+0aae0923e72a015862a1fa440e3834047497b69c
+
+	* infiniband-diags: Convert ibaddr to "new" ibmad interface
+
+Thu Mar 5 16:45:04 2009 +0200 Or Gerlitz
+ddab050d6bfb974a1d993028f1a2e2ef1b8061c3
+
+	* fix offset used for parsing of XmtDataSL & RcvDataSL
+
+Wed Feb 18 16:37:36 2009 -0800 Ira Weiny
+dc628e5cafa8a21eb06404c67d825337e20c73cb
+
+	* libibmad: Clean up "new" interface
+
+Sun Mar 1 14:40:32 2009 +0200 Or Gerlitz
+b4852b3f5b17b8757dce980ed31d90315261f3a0
+
+	* libimad implementation of PortXmtDataSL and PortRcvDataSL
+
+Sun Mar 1 14:39:48 2009 +0200 Or Gerlitz
+53f614cf35d31dd5c8c8537e19ee39fc30eb67ec
+
+	* generic libibmad perf query/reset api
+
+Sat Feb 28 18:50:54 2009 +0200 Sasha Khapyorsky
+bb7ee5d604e26bfda2211508bd62a688fedc0f9e
+
+	* management: bump all package versions
+
+Fri Feb 20 16:58:45 2009 -0500 Hal Rosenstock
+3db40d201665691d51c5d00ded95e819993e69a2
+
+	* libibmad/fields.c: Dump LIDs as unsigned decimal
+
+Thu Feb 12 23:31:31 2009 -0800 Stan Smith
+e09be6947c6722023d531daaa504d5eb889d876b
+
+	* libibmad: add MAD_EXPORT to exported calls
+
+Wed Feb 11 04:50:37 2009 +0200 Sasha Khapyorsky
+c52d26b507f7be7533fab3a5f71e4d3ed5ef3b63
+
+	* libibmad/fields.c: define SA SM_Key field details
+
+Wed Feb 11 04:49:58 2009 +0200 Sasha Khapyorsky
+0be7ccff15edefe2cf283d518b6e5f71ed9be5f5
+
+	* libibmad/mad.h: define more SA attributed
+
+Thu Feb 5 16:42:59 2009 -0700 Hal Rosenstock
+bd572aaae9c4a4c514bcba3dd25b9a8488d6a34a
+
+	* libibmad: lid print format changed to unsigned
+
+Thu Feb 5 10:03:31 2009 -0800 Ira Weiny
+9c563cf1484cf5f66934b05314aa6424b4bab5be
+
+	* libibmad: Use enum types for function parameters
+
+Wed Feb 4 10:00:05 2009 +0200 Eli Dorfman (Voltaire)
+c3e1c8b8d76677bd88780e58f59c37ac5a8dd007
+
+	* libibmad/src/dump.c fix dump functions for big endian machines
+
+Mon Feb 2 11:58:35 2009 -0700 Hal Rosenstock
+c5affc5408396dd8b406cc9fce8c4cfc4996b7ab
+
+	* libibmad/(mad.h fields.c): Add support for PerfMgt ClassPortInfo
+
+Thu Jan 22 03:07:47 2009 +0200 Sasha Khapyorsky
+a9a4867e3b488222bfdad906702cd12d7f844df7
+
+	* libibmad: use mad_set_field64() for mkey encoding
+
+Thu Jan 22 11:11:13 2009 +0200 Sasha Khapyorsky
+50b9b19151b894335d2107035eedada19222961c
+
+	* libibmad/fields.c: fix MAD MKey offset
+
+Thu Jan 22 03:04:00 2009 +0200 Sasha Khapyorsky
+a76413f70b033c4cd3d58b4417d5e408dbbb8d5c
+
+	* libibmad: indentation fixes
+
+Sat Jan 17 08:34:34 2009 -0800 Arlin Davis
+2ed723633c74490f2556d4075ff51eabf81b191e
+
+	* libibmad: minor changes to source to allow portability to WinOF.
+
+Sat Jan 17 08:32:41 2009 -0800 Arlin Davis
+569498b127de478c3993b1d7ca7c37a1585de006
+
+	* libibmad: remove c99 definitions within the ib_mad_f structure
+
+Fri Jan 16 09:15:04 2009 -0800 Arlin Davis
+454f9016bea72fb01daa25ff30683239927122b5
+
+	* libibmad: add os dependent definitions.
+
+Tue Jan 20 20:24:49 2009 +0200 Sasha Khapyorsky
+53f18b2f586d8ac51df3b28ea344b0416a5e02c0
+
+	* libibmad: cleanup mad.h include path
+
+Tue Jan 13 16:56:57 2009 +0200 Eli Dorfman (Voltaire)
+4038364013b989704abce097796242feb8d66568
+
+	* infiniband-diags support PortXmitWait get and set
+
+Tue Jan 13 16:31:42 2009 +0200 Eli Dorfman (Voltaire)
+79635485c31d3e2f048f9f6b93e33d283648f335
+
+	* libibmad add PortXmitWait and CounterSelect2 to fields.
+
+Fri Dec 26 16:47:06 2008 +0200 Sasha Khapyorsky
+f371708645f1a726eb3a5b5d29866f77223ca6c6
+
+	* libibmad: remove functions which use pthread
+
+Thu Dec 25 21:43:17 2008 +0200 Sasha Khapyorsky
+4db29c36603c49c87c9823e8a731508556e9d9f0
+
+	* libibmad: remove not needed header files inclusion
+
+Mon Dec 22 02:26:31 2008 +0200 Sasha Khapyorsky
+5efd5d7c44cccedeaadaa6a485d0e4b56fd12c90
+
+	* management: remove libibcommon dependencies
+
+Mon Dec 22 00:24:30 2008 +0200 Sasha Khapyorsky
+9c5dacf6d7f9059e1eef1a84cf37378917af7f5e
+
+	* management: move sysfs()_* function to libibumad
+
+Sun Dec 21 23:48:00 2008 +0200 Sasha Khapyorsky
+1c043f92133851a1cb99000e5f9c3b13a4e135c1
+
+	* libibmad: remove hidden _set/_get_field*() API
+
+Sat Dec 13 19:46:15 2008 +0200 Sasha Khapyorsky
+45f383d960c5dce20e7a413a2ff6c80a0c82e4b2
+
+	* management: bump all package versions
+
+Tue Nov 18 06:20:46 2008 +0200 Sasha Khapyorsky
+ba36740ca7e7900ed616c92bb24875ac19276430
 
 	* management: update versions
 
 Fri Oct 24 22:12:58 2008 +0200 Sasha Khapyorsky
-c906a9686db531cd94f27d13ccc8cc8bcb4c2586
+c0d1f90e5b98fa6db0c9cec89d90662f26237d59
 
 	* libibmad/dump: print more PortInfo:CapabilityMask bits
 
 Fri Oct 24 21:14:15 2008 +0200 Sasha Khapyorsky
-51963ceb86bf37048427d5f313917471edfcf14a
+08fa37bff2f919a1e5978b00ec8dfbe9a753acc0
 
 	* libibmad/src/mad.c: indentation fix
 
-** Version: libibmad-1.2.2
-
 Sun Oct 19 20:53:23 2008 +0200 Sasha Khapyorsky
-6556babd612d54e0cb2a7428099cc7d18d58ae16
+3a199de1edadbb5f5dc371116912aacabd177e18
 
 	* management/*/configure.in: bump all versions
 
 Wed Oct 8 12:28:44 2008 +0200 Sasha Khapyorsky
-307665fd72c00e1f404d8d921b47c2ec7fe04214
+5cca38069839e37a86b632dacd15061d5c181f7d
 
 	* management: update Voltaire copyright
 
 Wed Oct 8 12:27:12 2008 +0200 Sasha Khapyorsky
-40d3a48f646e1c52d37f72ba396016f18964da1d
+f5999be595a05fdd3b0068ec7e56308b69e9af44
 
 	* management/*/COPYING: update Voltaire copyright years
 
 Wed Sep 24 16:59:19 2008 +0300 Jack Morgenstein
-9fbb434b662b0c07e8733644be96423d3af356a6
+9a789c27897daf97a312a946e9eb94d30ff51185
 
 	* libibmad: eliminate compiler warnings on x86_64
 
 Fri Jul 25 09:27:47 2008 -0400 Hal Rosenstock
-51e18eca519e15a57e74f16dbdc299abfe49b14f
+96d5c2fd5fc85803844663afd2a1b176d10327b2
 
 	* libibmad/ChangeLog: Fix typo
 
 Tue Jul 8 22:09:55 2008 +0300 Sasha Khapyorsky
-b2e84c479aa9b80a6cf232a4c1a952775dd0d092
+6b531e167c9a8124a3811d353973e1484f35e951
 
 	* libibmad: Bump a library version
 
-** Version: libibmad-1.2.1
-
 Tue Jul 8 07:22:02 2008 +0300 Sasha Khapyorsky
-2f3df5655164d7cca3b8fefdaca40da6c1b47d9e
+b6398b8651df12989f752be1227b9f1b765d3989
 
 	* management: bump management versions
 
 Mon Jul 7 14:10:25 2008 -0700 Hal Rosenstock
-0e5e5b41cb4295967eed2e6a4ded0e1a69d751b5
+7d7ee95e8cd3055451512e916ab4b2679147b80a
 
 	* libibmad: Initial changes for congestion management class
 
 Mon Jul 7 14:07:31 2008 -0700 Hal Rosenstock
-5705f21e2eecadb959b936e8f64ed022635d63b6
+188d51337b0d5d7505ccc97c621f0ed4e5cb407a
 
 	* libibmad/src/rpc.c: Eliminate compiler warning
 
 Sun Jul 6 23:07:38 2008 +0300 Sasha Khapyorsky
-54de7d74303519cf2bca3089cbeca366ccbfc542
+fc9d40791d2a845f86ab3640d84b6bf0838c65cc
 
 	* management: revert configure.in update configure.in on 'make dist'
 
 Sun Jun 29 19:05:01 2008 +0300 Sasha Khapyorsky
-340dbba4759651c6475a912cf157e412a5d2eff7
+a93c8cb8b26d863a6997fd87980b13386183da13
 
 	* libibmad: fix snprintf() usage
 
 Fri Jun 27 18:08:26 2008 +0300 Sasha Khapyorsky
-80fdc793e727bfdedf88561fa83ffc689db7ad2e
+4cc83834358270ba25f6a08d713892dc1a3c8583
 
 	* libibmad: remove intermediate buffer in portid2str()
 
 Wed Jun 25 15:08:13 2008 -0700 Ira K. Weiny
-006f85346c17f5d23bd22a9301ce30db47d8419b
+c50b2e292d9e080b91288d3171a5846c4a20ba5b
 
 	* libibmad: update portid2str to use inet_ntop and drpath2str functions for gid
 
 Tue Jun 24 14:43:24 2008 -0700 Ira K. Weiny
-41460115969f1baebad2941a90f8674a609b0c45
+816da769f7b9018d4b00dd5cb0eeb25fa3192e01
 
 	* libibmad: print warning containing destination port when _do_madrpc fails
 
 Tue Jun 24 16:45:57 2008 -0700 Ira Weiny
-45c94c9a5147a16b92fed9f032be386a4e63d09c
+aa6fd764f7db917fbea6e2cd614085fcedeab44c
 
 	* libibmad: add a drpath2str function for easier printing of DR Paths.
 
 Tue Jun 24 22:16:08 2008 +1000 Max Matveev
-2f654d9c314b43be21d040d044c6522d9b104c57
+7d4cc4e9c57f1296f66667de3cab3a70bc88969c
 
 	* libibmad: allow explicit HCA selection by functions from libibmad
 
 Thu Jun 19 11:04:29 2008 -0700 Hal Rosenstock
-35f9a3d9d7fe59495677629b155b2888de0ac677
+08d91095024bc6087498a75b2da28c0948a33572
 
 	* libibmad/rpc.c: Better error message in madrpc_init
 
 Thu Jun 5 11:14:38 2008 -0700 Hal Rosenstock
-59cc134e1fdd88b7eda92f463f0c0ca147a3fc89
+b1e6dd71c32a111f0249b0fc9acc2f76a1a1003d
 
 	* libibmad/fields.c: _set_field64 sets field in network rather than host order
 
 Sun Jun 1 18:54:35 2008 +0000 Ron Livne
-608cddb34fda942b37d0f2bb2e7889e22ac046f8
+1107325cfc41cabafd9f9d28212f6f33c3ea5ec5
 
 	* libibmad: fix for umad unaligned access of ia64.
 
-** Version: libibmad-1.2.0
-
 Thu Apr 3 20:07:55 2008 +0300 Sasha Khapyorsky
-6fe887c1561bea3d62d54ec7b13259de07bf3e8a
+560f6640972605cc9e7afe042848767ba77e8e16
 
 	* management: bump all versions
 
 Sat Mar 29 14:47:27 2008 +0300 Sasha Khapyorsky
-a3e40ca16296eeae743ea2b6f2f4494f9228b530
+c8cfec939641bf21866342bf28b78a7f5b6827e2
 
 	* libibmad/dump: support VLArb table size, fix printing
 
 Tue Mar 25 13:54:48 2008 +0200 Dotan Barak
-b78f726d9a91bcfad80841e94c2f1e8214a54afe
+261d7c04c78c86af19a17f23df18ea8a3aab7648
 
 	* management: Remove extraneous semicolon from several files
 
 Thu Mar 6 18:30:37 2008 -0800 Ira Weiny
-05829e73b4cb34ffee22a93123fe7cba102a18a9
+af12b529247c6a4ed20e4c37fe1c420502a71bb4
 
 	* Rename ib_gid_t in mad.h to mad_gid_t to prevent name collision with ib_types.h
 
 Mon Feb 11 20:17:54 2008 +0200 Sasha Khapyorsky
-124ab2fefb1dcdfc009ce89634a8f4f489c3a791
+1395b237d223e5db02599e3f6b4fc90212b6e08a
 
 	* management: bump versions in master branch
 
 Sun Jan 27 08:01:40 2008 -0800 Hal Rosenstock
-976fb99a31b97aee5cea16ecce6b1bafba137950
+f26d73be9fdf9d716eb197d4e9bfb7b97976bc32
 
 	* management: Update License: field in management spec files
 
 Sat Jan 26 22:37:43 2008 +0200 Sasha Khapyorsky
-bcbe8abc9032637089c7ab1080999ec28c9c21e0
+e493ddb27e8bbdca9c0e9e2a2e6d6263148b2d14
 
 	* management/libib*: remove trailing whitespaces
 
 Mon Jan 7 01:40:19 2008 +0200 Sasha Khapyorsky
-c374d319d67bbc77eb885131f5136446dcc51865
+6d9fa5f2f58dc00b54406d4deb8d7877f3ebe047
 
 	* management/*/Makefile.am: update configure.in version on 'make dist'
 
 Sun Jan 6 21:33:44 2008 +0200 Sasha Khapyorsky
-5a03b648b03235ff3ab311d61e93766d8d6bd924
+973471b35d30d92122bff51343086523b2ef2e95
 
 	* management/*/Makefile.am: fix ChangeLog generation rule
 
-** Version: libibmad-1.1.5
-
 Thu Jan 3 09:44:46 2008 +0200 Sasha Khapyorsky
-97d199fc80d87dcc57865cbc06755baf9c8265a4
+b99a74f8dfa0bfad4a896919662baf0b82a89c74
 
 	* management: bump versions
 
 Fri Dec 21 18:32:28 2007 +0200 Sasha Khapyorsky
-0e72223889cf34ad6808792e95d4e660b472a86f
+b062a92f4194ff3ccdfc536df26448d4abd98ebc
 
 	* manangement: kill __WORDSIZE macro checks
 
 Fri Dec 21 18:59:44 2007 +0200 Sasha Khapyorsky
-fc55f55b9e77fab4f74abb92ec273c8a7384035a
+739b68a249d95d50e437829678f6f46d606325ee
 
 	* libibmad: initialize sm portid in ib_resolve_smlid()
 
 Sun Dec 2 04:48:41 2007 -0800 Hal Rosenstock
-daf7e42293470466c4ff0da682a146a449324afc
+2eb8faa6b4c6dbc4dff8bb2e3c05aa6a38b98a2e
 
 	* libibmad/dump.c: Use bit mask approach to decoding LinkWidth/Speed Enabled/Supported
 
-** Version: libibmad-1.1.4
-
 Tue Nov 20 00:02:05 2007 +0200 Sasha Khapyorsky
-d4e3b332ec2e58fbb1a5a2ffac20623a4599cfd0
+75c8f2455fab63d09fc7d733ac5bd2db6c1fe955
 
 	* libbmad: version 1.1.4
 
 Tue Nov 13 07:38:43 2007 -0800 Hal Rosenstock
-d22a193f25767d97596ac9a2e590ea0349e20b54
+6aaf02541184cf2e0f69a92d695e2681d5bf5cec
 
 	* libibmad/dump.c: Support link speed and width vendor extensions
 
-** Version: libibmad-1.1.3
-
 Tue Nov 6 19:07:58 2007 +0200 Sasha Khapyorsky
-47c419b0cf2073112dfac550daceabff3671b0de
+873f426a8aa17ef4018f6427f74cf622cb1ae34b
 
 	* libibmad: version 1.1.3
 
 Mon Oct 15 20:41:33 2007 +0200 Sasha Khapyorsky
-66d2372924098a67c201ba56b8ed555dd8b6d580
+d560a26fc936c156910e2b2b16a27a2f6ab01da5
 
 	* management: changed method_mask type in user_mad interface
 
 Mon Oct 1 22:01:37 2007 +0200 Sasha Khapyorsky
-0e884de6004763169a1fef9bf0257855e85f573f
+e0760c67caf6af37e613494b0a742d2b6ad55c39
 
 	* management/Makefile: remove obsolete .orig Makefile stuff
 
-** Version: libibmad-1.1.2
-
 Thu Sep 20 19:39:21 2007 +0200 Sasha Khapyorsky
-8536b6310af12dd672cbc1bb124d1c44747367a0
+afd2c26f244b8fe04efaea9eeeda9c88ada82ede
 
 	* libibmad: update vesrion to 1.1.2
 
 Thu Sep 20 18:04:12 2007 +0200 Sasha Khapyorsky
-eda4ed05438c494e4e529441458b46e1c87dbcd3
+3dd9ea4a732799ceb649aa9ad7638721ceb19fc9
 
 	* management/*/*.spec.in: change Source field to OFA paths
 
 Thu Sep 20 17:48:55 2007 +0200 Jeff Becker
-4ba6a49c9c2b95ef35e795f4ce660de63e6b3a94
+4b8a154a0c2dcd0c4a194e4b8c194a74a592750a
 
 	* libibmad: add support for IB_DEVICE_MGMT_CLASS
 
 Wed Sep 19 03:37:03 2007 +0200 Sasha Khapyorsky
-a0364d5bf62bcda019ef3c1c74cd51583fda632d
+0ba8b1e4373e77d1d34cd9514db6995f536e8d89
 
 	* management/*/configure: RELEASE and TARBALL for spec files
 
 Wed Sep 19 03:42:52 2007 +0200 Sasha Khapyorsky
-5abefe48a7553251238b1f8cb123a2a200b4d147
+772f4602f53f6ff93e6a4a135110616652d1f203
 
 	* management/*/Makefile.am: generate ChangeLog files when distributed
 
 Wed Sep 19 03:28:43 2007 +0200 Sasha Khapyorsky
-08b7f02ea643b45e42534c61f58fae5b3348bb06
+fa14a7e97219fe65bea857599a8fc19bb92fe32f
 
 	* management/*/Makefile.am: clean dist-hook target
 
 Wed Sep 19 02:00:08 2007 +0200 Sasha Khapyorsky
-07b65d1277d2d4a6ac6240ba5c7c3c691292001c
+71772e4331c1319081a8e4986771d92d5bb0a696
 
 	* management/*/*.spec.in: don't run autogen.sh
 
 Wed Sep 19 12:39:44 2007 +0200 Sasha Khapyorsky
-61db22fe367266955af97c3cdb402a5ce3fc4c55
+d6f1042ef2c3ad1e980953d6d1527f133f750ba9
 
 	* management/*/Makefile.am: fix include paths
 
 Wed Sep 19 06:36:00 2007 +0200 Sasha Khapyorsky
-ce8ff1a1b269be80bba9badd7b2cdd9dc51e78ab
+f5dfb18a925fd4c5873ab2b093cdf482215e6483
 
 	* libibmad,infiniband-diags: fix include paths
 
 Wed Sep 19 02:05:57 2007 +0200 Sasha Khapyorsky
-063ff2ecb12fe0c94e472fad27b8c40371904113
+2933ce57b01c63ff9eaaa96f720db4537b4b8f8a
 
 	* management/*/Makefile.am: add autogen.sh script to 'make dist'
 
 Mon Sep 17 20:53:30 2007 +0200 Sasha Khapyorsky
-5a307143f9e6c0a6170d4be76e6d0513fe9d3622
+deec857bf9bb03f771c7086180296225bfac49d6
 
 	* opensm and all: fix Source field in spec.in files.
 
 Thu Aug 2 16:10:19 2007 +0300 Yevgeny Kliteynik
-6d9161ec35df7b517b511322a2827e680f9f5187
+b7bb9898d402439f1abaf928db9af6247bdbdcee
 
 	* osm: cosmetics - removing trailing blanks
 
 Tue Jul 24 14:32:14 2007 +0300 Dotan Barak
-70aa3802d83c43b95ddf4a7580709e9d28806935
+2f4fc4fa2388c081755a98cea04e5ae5c90232c2
 
 	* libibmad: Fixed a name of a field in SwitchInfo to the right name
 
-** Version: libibmad-1.1.1
-
 Tue Jul 10 17:10:37 2007 -0400 Hal Rosenstock
-25f96f83bbaad958a3d9a3f328b399b4392d6a27
+6e557e600dc56aa0cc3476c4e8700bb7e931fe53
 
 	* libibmad: Updated to version 1.1.1
 
 Tue Jun 26 17:35:35 2007 -0400 Hal Rosenstock
-d9812ebfb0ec3143daec75acdf71b0fefb22c56d
+0b08da32751205098f50a2c0086311fb864b2894
 
 	* libibmad/src/rpc.c: Change uint to unsigned for strict ANSI
 
 Tue Jun 26 16:58:08 2007 -0400 Hal Rosenstock
-6c0bdc2e4308fb16d80c7d4318cc124479eb1035
+c7dc9de2e6c3c9122c7c733f22995a601eb35a41
 
 	* libibmad/src: Change uint to unsigned for strict ANSI
 
 Tue Jun 26 16:12:13 2007 -0400 Hal Rosenstock
-c4e646af4a5927a49de4fd6f0dbe5e40dd5f7a7e
+cc8c6efcd99a01d34ea0be05625a43548b9172ca
 
-	* management libraries/ChangeLog: Add log entry for MST change for replacing
+	* management libraries/ChangeLog: Add log entry for MST change for replacing uint with unsigned for strict ANSI
 
 Tue Jun 26 16:06:46 2007 -0400 Michael S. Tsirkin
-bdc562d54e9ef3c58e3d31e23f0279089a218b1b
+41a47cba764c63e6244205ab624ae5d7f9c13527
 
 	* management libs: uint -> unsigned replacement
 
 Mon Jun 18 10:02:09 2007 -0400 Hal Rosenstock
-16b57584cb4bfef21654ee5be81d9099f0863733
+2be7e1a902d61b1b0a49943046b8ad57c4e808fb
 
 	* libibmad: Change IB_PORT_MTRU_CAP_F to IB_PORT_MTU_CAP_F
 
 Tue Jun 5 20:24:42 2007 -0400 Hal Rosenstock
-d44eceda75226eca1cf812379db15ecb1673f772
+f5fd0bb294be784989e51116b9557c8fec845302
 
-	* libibmad/ChangeLog: Add log entries for Sasha's change to add
+	* libibmad/ChangeLog: Add log entries for Sasha's change to add some Notice DataDetails fields for DataDetails and trap 144 LID and CapabilityMask
 
 Tue Jun 5 20:21:47 2007 -0400 Sasha Khapyorsky
-22a96eefdc996b590fa957c50869390e5cb50388
+f807e25ecfb9ecb72a351255dbbf45bea3a5b946
 
 	* libibmad: Add some Notice DataDetails fields
 
 Mon Jun 4 08:08:03 2007 -0400 Hal Rosenstock
-2ad2af9f61ef08332b99b6359d98b5b9bf138cad
+cfcb9bc9004836ad5ab47b69700dae98efd084a6
 
 	* libibmad/src: Cosmetic formatting changes
 
 Thu May 31 12:33:39 2007 -0400 Hal Rosenstock
-7e1de26737a976d8caed4cc8a777cb8912281e89
+6bb7d4e0491ba195cdb74ed8e5018ddafde7d38c
 
-	* management/*.spec: Remove *.spec files from management git repo
+	* management/*.spec: Remove *.spec files from management git repo as committed files. They are generated files.
 
 Thu May 31 11:41:16 2007 -0400 Hal Rosenstock
-f95d24b405eb9da8d9c32b088107aec1fd94acf7
+6ee962b348d4bc58681c0b0becb3d28bf87d6538
 
-	* management/*.spec: Latest daily versions of .spec files
+	* management/*.spec: Latest daily versions of .spec files (prior to removing these due to build changes)
 
 Wed May 30 08:29:58 2007 -0400 Hal Rosenstock
-dc282ce5b5fb64de52e10e5c54e3eb8186d221f2
+9e253a821ed99253c7602b48cdc9a7e61bfd36ce
 
 	* libibmad/include/infiniband/mad.h: Comment change
 
 Mon May 21 19:28:25 2007 -0400 Hal Rosenstock
-895197d4356a36a4959e15e565e5df02fc5aef0b
+b56800c70580f83e4b897aa439f8444df9969a7e
 
 	* libibmad/src/fields.c: Changed PortMulticastPkts to PortMulticastRcvPkts
 
 Mon May 14 13:31:05 2007 -0400 Hal Rosenstock
-03e1e509d8fc8cf7667ca04b0c67a11eb35fbad3
+b124f8db00e0374d46ed58ef6d059ba9c0cba23f
 
 	* spec summary changes
 
 Thu Apr 12 16:52:49 2007 -0400 Hal Rosenstock
-f6fd8b0390f5cd16c04fbbeb65d1cdb5e082aa86
+ec53c8e63f5b67e2ead716a144f7502a0faea315
 
-	* Diags: Renamed openib-diags to infiniband-diags
+	* Diags: Renamed openib-diags to infiniband-diags Also, some other changes based on this (openib-diags.spec.in moved to infiniband-diags.spec.in, openib-diags.spec moved to infiniband-diags.spec, and Makefile.am changed for this)
 
 Tue Apr 3 16:47:44 2007 -0400 Doug Ledford
-f0e71cefaac4951bce91878a49e76b9b9ef808ef
+79f02d0b3965dead0369ed74d0d289dea47aa765
 
 	* Version change in spec files
 
 Tue Apr 3 15:12:07 2007 -0400 Doug Ledford
-8c07faef605bd856d3e6fff77d77b5f1069d0d22
+7b12cc37c2bdc9a5a3c7732d769394ad6395cf57
 
 	* More mailing list updates
 
 Tue Apr 3 13:47:15 2007 -0400 Doug Ledford
-dd0453fc5bb2c60edb4282bcb959a8452bcd1261
+523a5cc84cdd18b4551511d6efcdcba1b6b68c63
 
 	* Automatic check-in of target spec files after version processing
 
 Mon Apr 2 18:43:08 2007 -0400 Doug Ledford
-71387fce8d7cfbac9b0dc16ee372601cadc2dcdd
+d55669ce392f6626638db931f626349eaa905f2f
 
-	* Update all the various spec files
+	* Update all the various spec files Make spec files work with new make.dist script Add make dist script to ease the process of releasing tarballs
 
 Thu Mar 29 12:41:02 2007 -0500 Hal Rosenstock
-0b9a6460f3391640d46509d6764e80bbc3d2529b
+ebf032c6df671c4f48a56a9912d92bd5a9525198
 
 	* libibmad/ChangeLog: Cosmetic change
 
 Thu Mar 29 12:31:09 2007 -0500 Hal Rosenstock
-d053357827c98a2420b7f24a67b10708919cfc1f
+db5d418a796ad03659913159c602b869273124e4
 
 	* libibmad/fields.c: Changed Xmt/RcvBytes to Xmt/RcvData
 
 Thu Mar 29 09:32:43 2007 -0500 Hal Rosenstock
-12d5498501046d5460f0d76f595c142ea366b244
+bf5c10c479e4659c8e22f95421ed281047ebf74d
 
 	* libibmad: Updated to version 1.1.0
 
 Fri Mar 23 09:14:36 2007 -0500 Hal Rosenstock
-2d5dcd4f35e9aee4ce1c43e62ba5591338824927
+f83b40c86831794ec7bb9ac234ba41fe8c40c4e6
 
 	* libibmad/mad.c: Implement GRH support in mad_build_pkt
 
 Fri Mar 23 07:29:09 2007 -0500 Hal Rosenstock
-cd1f692f609d5281ab8972d5eafafc2d3d693329
+a6ef73512f10518fa344d0fb812718dd6c7e4d06
 
 	* libibmad: In ib_portid_t, change grh to grh_present
 
 Fri Mar 23 07:01:52 2007 -0500 Hal Rosenstock
-b3f8668e7d91b3d6fd808fd26662a51950c6f9ab
+35275152da611cb47b0dc1924d88a4179f73586a
 
 	* libibmad/include/infiniband/mad.h: In ib_portid_set, ensure grh is 0
 
 Fri Mar 23 06:59:34 2007 -0500 Hal Rosenstock
-70513d3660e43b9f0444d02ba77480116a4f6dda
+b78ddb2136838680b075cc476656a0f54d07efb5
 
 	* libibmad: portid.c: In portid2str, fix endian of dispay of GID
 
 Fri Mar 23 06:55:21 2007 -0500 Hal Rosenstock
-f621e2c534e648c85182ec01028bffd5522c579a
+25e325f491b10c8201ca2224d16920ce2e7ef802
 
 	* libibmad/fields.c: Cosmetic changes
 
 Wed Mar 14 14:10:51 2007 -0500 Hal Rosenstock
-a46ed61786f991232bf535d40fee1f3a69e97ee4
+6c57f900906eff01fc13cf71bed86ef135fbcaf4
 
 	* libibmad: Add encode/decode support for GUID0 in SM GUIDInfo attribute
 
 Wed Mar 14 09:14:18 2007 -0500 Hal Rosenstock
-a2a9b53ebf15a270eafd1153c898b6fbb27b49da
+288370d0a5421e9d27def198e3f65a436e8f70fb
 
 	* libibmad/ChangeLog: Add log entry for adding GUIDInfo as SM attribute ID
 
 Wed Mar 14 09:12:56 2007 -0500 Dotan Barak
-cf292acb4fc485e934f45e1ed592864f47611cff
+6fc8bcb8262fa52752e04c4a81b7f47087ff2c81
 
 	* libibmad/include/infiniband/mad.h: Add GUIDInfo attribute ID to SM attributes
 
 Thu Feb 8 07:12:02 2007 -0500 Hal Rosenstock
-9858758af061fc72f2d26c29b835d6f35ab18fab
+f05dfdd749ca18ca786f879241b6a70003df5ec4
 
 	* libibmad/ChangeLog: Updated for previous portid.c change for DR path output
 
 Thu Feb 8 07:08:41 2007 -0500 Ira Weiny
-2c1572244e5bdbfc0ad9e544d8a19520d5ab046e
+bcfc8109fb6ceee6aa66d13aef250d9f339c765e
 
-	* libibmad/src/portid.c: Change DR path output to be comma separated
+	* libibmad/src/portid.c: Change DR path output to be comma separated decimal values
 
 Mon Jan 29 10:06:23 2007 -0500 Hal Rosenstock
-1f5e506bf0552b628267a1710418644e34d419e6
+ea24ae8f2f4b2b6ea67dbc52b40eae8aa0a7fb80
 
 	* management/libibmad: Release 1.0.2
 
 Wed Jan 24 09:36:37 2007 -0500 Hal Rosenstock
-cdb712476d99b3d41abcb5746f436499a1bef34d
+5a8540af0a69363d04feba96a2d48490421c9793
 
 	* libibmad/libibmad.spec.in: Add doc files
 
 Wed Jan 24 09:19:30 2007 -0500 Hal Rosenstock
-1f08a74b5eda592b137b394c62dc96a435068d09
+899a8b8f5598fdca84786558e60c951ec4322210
 
-	* Management libraries: Added AUTHORS and COPYING to libibcommon, libibumad,
+	* Management libraries: Added AUTHORS and COPYING to libibcommon, libibumad, and libibmad
 
 Fri Dec 15 16:36:22 2006 -0500 Hal Rosenstock
-c5400e062c251dcb6c7116ed830a383a7fdd2085
+c5a3797c62cf56f7ac3884ab0d49cc503d381d8e
 
 	* libibmad/mad.h: Commentary change for consistency
 
 Tue Dec 12 09:07:04 2006 -0500 Hal Rosenstock
-cd3af162dd329f3c694ecad33f88ca73f3ccc4e0
+91f7347076545d9ab4a48d19d0df82f5892f8ad0
 
-	* Diags/libibmad: Change some debug/warning messages to use hex
+	* Diags/libibmad: Change some debug/warning messages to use hex rather than decimal
 
 Mon Dec 4 11:55:20 2006 -0500 Hal Rosenstock
-34c6f23a0b2eba00bba445a11eb7b23bc804ef0c
+ccb9166089d4fb7727e358d57522ae5dd1f59c51
 
 	* Remove unneeded $Id$ from the rest of management
 
 Mon Nov 20 12:07:25 2006 +0000 Sasha Khapyorsky
-66ce88e6eed1bdb49c63dbbcb6657c4873bbb3c9
+c9534ef40db4bda19ac940c03109edbc2a18541b
 
 	* r10124: libibumad/libibmad/diags: fix printf style uses
 
 Thu Nov 2 22:26:03 2006 +0000 Sasha Khapyorsky
-66438eb26becfdf433021addd198d82248470506
+bf9688dded7bbaa8bf23804b2e3eea7d2a5d08f9
 
 	* r10050: management/libib*: Strip trailing whitespace
 
 Mon Oct 23 09:35:50 2006 +0000 Hal Rosenstock
-ba598a46c5a147dbf90ab633327358ec9c728d68
+7c43fd3d0a1b0cea08a6e698b5de34ba0a08b184
 
 	* r9943: Diags/libibmad: Support optional PortExtendedCounters
 
 Fri Oct 20 12:46:02 2006 +0000 Hal Rosenstock
-ee206bacccaa371c36e4e6729a4fc57989b2d3fd
+aa48c445546af8197c0124ecfd75939de94c4384
 
 	* r9933: libibmad/ChangeLog: Cosmetic change
 
 Fri Oct 20 11:16:37 2006 +0000 Hal Rosenstock
-080d6d76867f5d173cd45798e013904ac2e40e9c
+d636d0598a182ef7ddc9975090a69b57b0a6e629
 
 	* r9925: libibmad/ChangeLog: Add another change which was previously omitted
 
 Fri Oct 20 10:49:18 2006 +0000 Hal Rosenstock
-7cf408f740bccb8ceaf167627464743adb508d57
+b8a85f381f5df2c285e7d2d5bca9f165cd0398b3
 
 	* r9921: libibmad: Add support for DrSLID
 
 Mon Oct 16 13:49:19 2006 +0000 Hal Rosenstock
-19c4ee2418bfbc2c54a80cf40459fc6297f4a6ca
+362b1fd74fa3c89de2a45fe1599942975b525567
 
-	* r9827: management libraries: Added library versioning support (similar to OpenSM
+	* r9827: management libraries: Added library versioning support (similar to OpenSM and it's libraries)
 
 Mon Oct 9 09:50:43 2006 +0000 Hal Rosenstock
-7484fe2fb6e234dee8c6b514e0138be0c85d83f0
+e7a198cffc8107a7b40b8bea9a5834847a05567b
 
-	* r9741: libibmad/src/resolve.c: In ib_resolve_portid_str, use strtoull rather than
+	* r9741: libibmad/src/resolve.c: In ib_resolve_portid_str, use strtoull rather than strtoll for IB_DEST_GUID
 
 Tue Oct 3 16:40:28 2006 +0000 Hal Rosenstock
-74b8561bd05287762e9ff3c823704acec5f79302
+7ced5a06fd5e8e91320307ab71a85962dbc600da
 
 	* r9689: libibmad/include/infiniband/mad.h: Commentary change
 
 Wed Sep 13 11:55:13 2006 +0000 Hal Rosenstock
-cadb81e024a5a9df3c5b5fd4e430f1a5ab0a7010
+43ecf179722d39dde7385b704fc4f371cfd414b2
 
 	* r9448: libibmad: Add sa_rpc_call API
 
 Fri Sep 1 14:28:30 2006 +0000 Hal Rosenstock
-3aadd6d3844de800c841dd475d3f8699ff1c2079
+f318a450ec5650ea8aff0ceed807ce058cd942a6
 
 	* r9214: libibmad/portid.c: Change display of Lid from hex to decimal for consistency with other OpenIB diags
 
 Wed Aug 30 23:26:56 2006 +0000 Hal Rosenstock
-8bf35a1cc078fe4793f4478601d75199cf5fc416
+3ba97020c154a26074a8dee60ec23386ca3216a7
 
 	* r9196: libibmad/src/rpc.c: Validate num_classes
 
 Wed Aug 30 16:20:41 2006 +0000 Sasha Khapyorsky
-59b20eac9acee479f587d029f157cb2dcdd3a95c
+d985b3ec63c10d0a464170e78d25e57baffbf1c9
 
 	* r9192: libibmad: rpc API which supports more than one port
 
 Mon Aug 14 19:45:14 2006 +0000 Hal Rosenstock
-e27ec16e55f7330f8b205f4ea5175f14a537b969
+7c4f60f5d0b155ac1a858c4b4e69eba6e096bf91
 
 	* r8935: libibmad/mad.h: Cosmetic change
 
 Thu Aug 10 15:52:37 2006 +0000 Hal Rosenstock
-7a5bd7d69183f3e4c29c9773118b36e42ac40ba0
+daec5542eefcbdab5e4d6e47b5ef302fa0fd1b04
 
 	* r8868: libibmad/rpc.c: Cosmetic change
 
 Sat Jul 22 10:41:25 2006 +0000 Hal Rosenstock
-f7edf0276a756530da47a2e21ce96f341358737e
+92144a85f6a761e08fe790f66d9ccab9ccad8dd4
 
 	* r8630: libibmad: Remove recently added TRAP_NUM_ID enum
 
 Tue Jul 11 10:17:32 2006 +0000 Hal Rosenstock
-733fd8b9bbc683b33a3a8d5759465e1ee0365eaf
+d7da1a31f3f1f5369d2ca386a8535bc9e39273fa
 
 	* r8488: Cosmetic change to libibmad/include/infiniband/mad.h
 
 Mon Jul 10 23:13:53 2006 +0000 Hal Rosenstock
-5b4663546d3e05ad4f1dd9a19170db658f0186b5
+600623c1553f651f376e820564be2a2845a317de
 
 	* r8484: libibmad: Cosmetic changes to src/(fields dump).c
 
 Mon Jul 10 21:40:07 2006 +0000 Sasha Khapyorsky
-c62c7b4a90b5fefa9e07c290da4f9bb9a792c707
+c83fff225985a24626ea6e02edb05d76822da267
 
 	* r8482: libibmad: Support MFT and Notice/Trap fields
 
 Wed Jul 5 10:14:28 2006 +0000 Hal Rosenstock
-27cbe31837c53c7f794c4b124801e095f5529ac8
+3c5c5dadc6783269e8400ac01fa6d88cba8e4881
 
 	* r8361: diags/libibmad: Decode support for PortInfo:OperVLs
 
 Mon Jun 26 18:03:01 2006 +0000 Sasha Khapyorsky
-239eb5e97c6a868be4b0530b39a33eaca37a7cd3
+01443c56aab1b301dda42d095846eb32471f358a
 
 	* r8208: libibmad/rpc.c: Match MAD TransactionID
 
 Mon Jun 19 20:25:27 2006 +0000 Sasha Khapyorsky
-2c74f3b1002d4468fa92ff3fe11725418667bc38
+b1627ae36029785a56340e349b013e5977ce0a10
 
 	* r8114: libibmad/rpc.c: In _do_madrpc, fix umad retry counter display
 
 Fri May 19 12:40:35 2006 +0000 Hal Rosenstock
-c76d4a1933d41734cf63c3f72cad8661f46ba96b
+c864f5d6f1886510f69d1756843c1754fd3a42b4
 
 	* r7350: Change to libibmad and diags/ibstat.c to support iWARP RNIC node type
 
 Wed May 3 21:38:17 2006 +0000 Ralph Campbell
-dd75f7c7c7d389334b2ed9126a633304872615ce
+35562161f49a6ca1e99021b4cc25d2566f4dbe15
 
 	* r6893: bibmad/src/rpc.c: Fix madrpc_init() to use correct rmpp version
 
 Wed Apr 26 10:53:04 2006 +0000 Jan Daley 
-451c67ca4752a6742292548333bb38871633506b
+884de27907940aca9df08aaaaac9833cd3595c9f
 
 	* r6644: libibmad/fields.c: Fix bit field access of RMPP header
 
 Mon Mar 20 16:21:20 2006 +0000 Hal Rosenstock
-fb9ec02e633e8ec32083c923ead04bc3f2f21a75
+70896464b54c351f4afef9c4afed7c6695d8408d
 
 	* r5904: libibmad/fields.c: Cosmetic change to VLCap display
 
 Mon Mar 20 16:06:03 2006 +0000 Sasha Khapyorsky
-240a8561d052c69b233f4201d5145e6f310b500d
+7ee5f0e51cc3637d331b044336db6f296556376a
 
 	* r5899: libibmad: mad_dump_sltovl() output simplification
 
 Wed Mar 8 14:10:56 2006 +0000 Hal Rosenstock
-edbde601ec0e501fc5779a76a057c1d66fa7c379
+b2249250177b92f0a3d64198e6c7fda487a8d8d4
 
 	* r5683: Merge management packaging changes from 1.0 back to trunk
 
 Mon Feb 27 13:31:21 2006 +0000 Hal Rosenstock
-f20d5213a399c484dc14829293d5b1af3a1b66c1
+0ce3a1d3199d10b6bf20fe441e5ce8d75cccf278
 
 	* r5508: Updated version identifiers for release candidate
 
 Fri Feb 10 15:58:06 2006 +0000 Sasha Khapyorsky
-26eabf1736b65caa3a231cb7a854315500c88eff
+b04dbfbdfc9798c15e4cb613f33f3dceb1093fb4
 
 	* r5358: management/*/autogen.sh: config dir test and creation
 
 Fri Feb 10 14:15:56 2006 +0000 Hal Rosenstock
-5c7ced08c212beafc7ad74e7508734d064b6c80f
+43e90a0e6b0e8643becb6c953cb112eac777b09e
 
-	* r5357: In libibmad, in rpc.c, cosmetic change to format of 
+	* r5357: In libibmad, in rpc.c, cosmetic change to format of a couple of error messages
 
 Mon Jan 30 14:56:23 2006 +0000 Hal Rosenstock
-42bcb53fe408baabcb98f8431deb4d59bed1d9e5
+4df2bfb7c2754ae1dd21ced63710c454d2a7c35a
 
 	* r5208: Cosmetic change to libibmad and diags to change HCA to CA
 
 Thu Jan 26 14:35:47 2006 +0000 Hal Rosenstock
-14ce30e8b138fd23cd029061d7faea7c6e17c731
+7dcc31762b229d977e0381f5d65e2aa6e5715b58
 
 	* r5188: In diags, use enum for node types rather than hard coded constants
 
 Fri Jan 20 19:34:36 2006 +0000 Hal Rosenstock
-bcd436b33164534f303abc6811f4c0411a0e00e7
+813b5fcdc528c9353d7b92c8498004b556d9ed0b
 
-	* r5114: Added perf_classportinfo_query and port_samples_result_query routines
+	* r5114: Added perf_classportinfo_query and port_samples_result_query routines to libibmad
 
 Mon Jan 9 22:40:05 2006 +0000 Hal Rosenstock
-033f0c110f136c0634eae548e929459a70aec263
+ce199752a4d1a302f14838b886cc037dd16352de
 
 	* r4863: Fix some typos in mad.h and fields.c in libibmad
 
 Wed Dec 21 15:55:57 2005 +0000 Hal Rosenstock
-444d688abbe3b1dbda0b5412ab6db6110f2b38fb
+2e48b86e62c2d9809c3be298d7483edc67b78cb5
 
 	* r4577: Created common pma_query routine
 
 Wed Dec 21 15:43:00 2005 +0000 Hal Rosenstock
-c52b749220af4c16314ebc0101c5e183d6827644
+3f27a6140c33fa6926301feebd5c6bfedeaf866a
 
-	* r4576: Start adding support for PortSamplesControl and PortSamplesResults 
+	* r4576: Start adding support for PortSamplesControl and PortSamplesResults PMA attributes. Add port_samples_control_query API.
 
 Fri Dec 16 18:31:58 2005 +0000 Hal Rosenstock
-936c911f53c62cd01fc6a70f9afc74fbc377b066
+50e8bc3bc16d55270ad8f95aa871c52f2c42a7b4
 
-	* r4507: In libibmad and libibumad, eliminate compile warnings with gcc version4.0.0
+	* r4507: In libibmad and libibumad, eliminate compile warnings with gcc version4.0.0 20050519 (Red Hat 4.0.0-8)
 
 Mon Dec 12 20:58:18 2005 +0000 Hal Rosenstock
-71d83efe6b79fabec86c296e505e21de2d23ca68
+85c31942ec2aae87d6be94ba138057c8cf704ac0
 
 	* r4412: In libibmad (fields.c), change Type to NodeType when displaying
 
 Mon Dec 12 19:58:28 2005 +0000 Hal Rosenstock
-6cd9b903f839ee1ce2977cf3b71e70c02ec7632e
+16a3b6bba4dada2454739809c00bb25d797d73b2
 
 	* r4406: Add mad_dump_portstates (for PortState and PortPhysicalState)
 
 Fri Dec 9 18:30:41 2005 +0000 Hal Rosenstock
-b2b4c2df213e7ff6c040a7fcef8927c3f70ed6ce
+9e4b9ef0833c6e5f002d6a5e062a9522f4399d0f
 
 	* r4361: In libibmad (fields.c), change Vl to VL
 
 Tue Dec 6 21:03:52 2005 +0000 Hal Rosenstock
-276121583676dacdd9f54f3e4401697e4232f4e3
+3262ba94d427711a8e11362a932c5e726c3f32ee
 
-	* r4334: Move struct ib_user_mad into umad.h (from umad.c)i (libibumad)
+	* r4334: Move struct ib_user_mad into umad.h (from umad.c)i (libibumad) Save and restore ib_user_mad header in rpc.c::_do_madrpc (libibmad) so retries sent to proper DLID and DQPN
 
 Tue Dec 6 20:59:09 2005 +0000 Hal Rosenstock
-01e6526ae737065fb234e446e24df6987a635f4f
+3715ca174970f6849fc8df17fca2ca655a7feb96
 
 	* r4333: Cosmetic changes
 
 Tue Dec 6 16:18:38 2005 +0000 Hal Rosenstock
-7b53ecf36ae7cd06403deaf7ee2a694e5e76cba3
+07f289c8b837855dca295c0807ab27780b9b1233
 
 	* r4331: Cosmetic change to a couple of error messages
 
 Sun Dec 4 23:10:08 2005 +0000 Hal Rosenstock
-d2160b32779236cab6138356f59c641ee886660f
+131a15e9f84e8ce41b45e4f6312ea9077b2398c4
 
 	* r4292: Fix previous checkin for make dist change for libibmad & libibumad
 
 Sun Dec 4 23:04:47 2005 +0000 Hal Rosenstock
-63fb6478bace9aa74ea48ace5aaae270e0dc1e68
+7a456c09e918f4c6ac703f713e37dfcee1f51854
 
 	* r4291: fixed make dist for libibmad & libibumad
 
 Mon Nov 28 19:08:07 2005 +0000 Hal Rosenstock
-472c485772c7d48145ab65181e2023e122efc487
+132678016dada0500cb5e1799a7b060472687acf
 
 	* r4179: Cosmetic changes
 
 Mon Nov 28 17:46:41 2005 +0000 Hal Rosenstock
-2b95ab888e5e3cd0bf0d6e52fb927091583a481a
+907df93f387603bb38faf2c25040f0e0a5a76467
 
 	* r4178: Add define for IB_GSI_PORT_COUNTERS_EXT
 
 Wed Nov 2 19:53:09 2005 +0000 Hal Rosenstock
-64d693777900c3974729e4a50b8ce787ae9c07a9
+201074d3b2f32211c0493f8744f48d7b1ca79194
 
-	* r3950: In rpc.c::_do_madrpc, also use timeout on umad_recv just in
+	* r3950: In rpc.c::_do_madrpc, also use timeout on umad_recv just in case packet sent is lost somewhere
 
 Sat Oct 22 11:52:26 2005 +0000 Hal Rosenstock
-c86084ae533419ddf6f8c753bea2291961b08213
+63b76d8ce08d7ce8b06f7477e49cb4952a6bbeda
 
 	* r3834: Fix PortInfo CapabilityMask dumping (used by smpquery)
 
 Mon Oct 10 13:13:03 2005 +0000 Hal Rosenstock
-5f1f5baa3d4038af996c287e9b05a1b20e86d415
+1cf2a2523d659eac52727884b411fc95ed728c78
 
-	* r3705: Change NodeInfo component name display from 
+	* r3705: Change NodeInfo component name display from PortsNum to NumPorts
 
 Mon Sep 26 13:03:50 2005 +0000 Hal Rosenstock
-35c556ed02f7079e18d6151ab72c5e0e43fa8fef
+62e99fc1e8f226093c3f6d703c84ee6df7d44256
 
-	* r3540: Minor changes to diags and management libraries
+	* r3540: Minor changes to diags and management libraries to eliminate possible naming conflicts warn becomes ibwarn, panic becomes ibpanic (also associated macros changed)
 
 Wed Sep 14 14:21:10 2005 +0000 Michael S. Tsirkin
-25d0cb61208c93e0a2084156c64796d23973d989
+dbd24f5a0fefed3f33997a4ffb926822a40ec1d3
 
-	* r3426: mad.h pulls in common.h which it does not actually depend on.
+	* r3426: mad.h pulls in common.h which it does not actually depend on. The user should include it if he wants to. This approach reduces global namespace pollution.
 
 Mon Aug 15 18:27:40 2005 +0000 Hal Rosenstock
-0b0426ab005df3eec9b541cee20cc9a938608fec
+7586c030b716c34a6ba9279220f670dbe308be78
 
 	* r3097: Remove a couple more instances of /usr/local/ib
 
 Mon Aug 15 17:16:13 2005 +0000 Hal Rosenstock
-82493518d7dfcc1859e65477658d2584f4a6abd1
+e205db57b00c6629b726028a1fe218be1c34efdf
 
 	* r3091: Remove special libdir to be in sync with OpenSM build change
 
 Mon Aug 8 18:03:31 2005 +0000 Hal Rosenstock
-fd72a800f383545d6269edee4fdd45f77e592d59
+ee0e481872be1e69992f3272535b242fe3f4f84a
 
 	* r3020: Fix typo pointed out by Bernhard Fischer <rep.nop at aon.at>
 
 Mon Aug 8 15:44:05 2005 +0000 Michael S. Tsirkin
-a5cd524c6c16db603ccc6c0f3f209d47c6f4781f
+bcc1059a659ea4e6120f0ad9412656e2af946386
 
 	* r3017: Add option to skip library test
 
 Mon Aug 8 13:46:42 2005 +0000 Michael S. Tsirkin
-e70dc1b3446b62c64ee23a99deb1ac6631b7e0d1
+5ca57f3ecfb6d4c08f5ca62ccefcdd003ed343d2
 
 	* r3014: libibmad: dont assume that all headers are in the same directory.
 
 Wed Jul 6 19:15:24 2005 +0000 Hal Rosenstock
-eed72a56fc2c9bde4a93c2af6ea6f18f9b70d62d
+a0ad9e29cf43f88daf87bb88da71e7538e7c7d30
 
-	* r2815: Initial changes for receive side RMPP
+	* r2815: Initial changes for receive side RMPP Also, some minor bug fixes and changed a couple of messages
 
 Wed Jul 6 19:05:13 2005 +0000 Hal Rosenstock
-118831d14161c0fc1e66fca2e6ea78fa313cee98
+0f43c44161e0d349116f30eba992dd1d490e1396
 
 	* r2813: Add in a few more SA attributes
 
 Tue Jul 5 12:45:47 2005 +0000 Bernhard Fischer
-0609af13f1c0b257db2404bee574ffadf8c55ac3
+9a261a586a0e456f95c3d8b15bdbb24560d0e432
 
 	* r2792: Commentary typos
 
 Wed Jun 29 13:41:16 2005 +0000 Hal Rosenstock
-962f398f49bfdc5a49f3cc4a2e2da11e63e2aebd
+a1f08e5c64421611d14d3e1d860caf4d7aaf15f4
 
-	* r2748: Make length output as well as input parameter to umad_recv
+	* r2748: Make length output as well as input parameter to umad_recv in order to get ready for receive side RMPP
 
 Tue Jun 28 15:28:47 2005 +0000 Hal Rosenstock
-5882957f31c33eab26921017e330624055d5fed9
+f1b147ed77d353f04b925b59b2af61f90a754b9b
 
 	* r2727: Add length parameter to umad_recv in preparation for receive side RMPP support
 
 Thu Jun 9 20:45:32 2005 +0000 Hal Rosenstock
-1357c5f8e09533cce2ea9fb907b6fac52550a29d
+d604aaaf29cda842aa0ba8e5fd0cda035b1c0920
 
 	* r2579: Cosmetic changes
 
 Tue Jun 7 11:21:44 2005 +0000 Hal Rosenstock
-ea99d74e3f9dcbc5d085afd78e24263de11ea71a
+1875e70f2febce5fcfeeb4b13e41ef907067da2e
 
-	* r2566: Add retries to umad_send
+	* r2566: Add retries to umad_send ABI_VERSION is now 4
 
 Fri Jun 3 20:25:17 2005 +0000 Hal Rosenstock
-d070dbccc1e315ed10fa1b88c89a5510e5db304f
+57f55635fc7fad5d187a51c39481c5535a89ba32
 
-	* r2542: Changed RcvBytes to RcvPkts for PortCounters component which
+	* r2542: Changed RcvBytes to RcvPkts for PortCounters component which was mislabeled. Pointed out by Troy Benjegerdes <hozer at hozed.org>
 
 Thu Jun 2 18:49:59 2005 +0000 Hal Rosenstock
-2f2efcb385bc28fdb7aef94a325cad6cf15e37a6
+4ecdb65b0cee91ca9c5fd0add9412f0d24caa220
 
 	* r2528: Add umad_get_fd routine to libibumad
 
 Thu May 26 15:31:22 2005 +0000 Hal Rosenstock
-9ada9f1fb71639c8471442fa0acc86931423f8db
+db1b6309047a179b13457fb5666a975cb9ab769c
 
 	* r2494: Change another C++ style comment to C style
 
 Thu May 26 14:17:31 2005 +0000 Hal Rosenstock
-b27074af93787830343d4ed056450a8fbd56533d
+aa696d70b16c62027a956654a12670755f94a8ba
 
 	* r2492: Minor formatting changes
 
 Wed May 25 12:41:39 2005 +0000 Hal Rosenstock
-d38693813e862cd38f0c8b90c882bbaf545eaf08
+2b8cdf2cb1a96148d529af95b393312c42fccfbe
 
 	* r2478: Added preference component mask bit for path record
 
 Tue May 24 12:59:47 2005 +0000 Hal Rosenstock
-49c65172c578ad71a8cec5dd50c95dd61924317e
+244c37fc5518b0705d0d2d6982a81cb3f9dddb9c
 
 	* r2466: Remove config.h.in files which should be generated but not part of tree
 
 Mon May 23 16:33:46 2005 +0000 Hal Rosenstock
-8e4b18f8017727cc837d0e75f2415eed5eb679a7
+6d6096f721a2976b4591120dd04c9fa44486178b
 
-	* r2456: Changes to support send side RMPP
+	* r2456: Changes to support send side RMPP (needs change to linux-kernel/infiniband/core/user_mad.c) ABI_VERSION is now 3 RMPP is enabled in build SA GetTable is now supported properly (within current RMPP limitations)
 
 Sun May 22 15:41:36 2005 +0000 Hal Rosenstock
-98e070741d99b3e18ec4da925c955368bde96a68
+b1a5ab6d1341449406c1e302e3d52d5021c611ae
 
-	* r2440: Another conversion to use standard type
+	* r2440: Another conversion to use standard type Also, minor formatting changes
 
 Fri May 20 16:22:19 2005 +0000 Hal Rosenstock
-74aef684710968bf9509478531dbaf8d42591ac7
+4a0e49496608d98552612c735a3f2f65cdb9e635
 
 	* r2424: Completing conversion to standard types
 
 Thu May 19 20:32:07 2005 +0000 Hal Rosenstock
-029d201d28e59c73eeee61ad44c45c8f2b974c4b
+d4e2e8922c2506240c935d64ea31aca43b426ba3
 
 	* r2418: Modified VL15Dropped counter name
 
 Wed May 18 21:09:26 2005 +0000 Hal Rosenstock
-504eae2fd5c7d74b350e7d521be960f4f00de489
+f3883c80ca609c48c3d71df2654f992e25471f83
 
 	* r2396: Start converting to standard types
 
 Wed May 18 20:13:37 2005 +0000 Hal Rosenstock
-0d80c5dc235dd9a3f7d306e61932b06bce988f85
+76dc537a534b9592e8e9bd6242664046b42e7cd7
 
 	* r2395: Eliminate already included include file
 
 Wed May 18 19:26:47 2005 +0000 Hal Rosenstock
-8677acc720e2e56ba6417da581358fdadc147b98
+80c58c9f8d5f01d00b9c2735274539b7a732625e
 
 	* r2388: Add some SA methods and attributes
 
 Wed May 18 18:30:20 2005 +0000 Hal Rosenstock
-f500df5dc132b33c3acf29eabc655f037350b651
+27bd8aaa250cf26108a50a0c792085f3e88d3ca5
 
 	* r2386: Minor formatting change
 
 Wed May 18 18:26:48 2005 +0000 Hal Rosenstock
-19d31c1e79f72d06d467d3260c5d540ef9431036
+36261f48d2567cf660809808f42cc1d4e2b8a268
 
 	* r2385: Cosmetic changes to some field names
 
 Wed May 18 18:14:44 2005 +0000 Hal Rosenstock
-1db0c4ba3240cb1ad9369ab3e74246048bde1c40
+cdb3b5eb6c3af664923aad9ebec6647e8b61bd2f
 
 	* r2384: Fix typo in #define
 
 Fri May 13 15:19:15 2005 +0000 Hal Rosenstock
-a9b5ffa07295b254778422b4cb6172731655fda3
+dcd570b726d17bcab7dce8838845b0b1759b6e72
 
 	* r2334: Change C++ to C style comment
 
 Thu Apr 28 17:07:47 2005 +0000 Hal Rosenstock
-30d7d3f2839a67c5044bc664b638fa72466a6ad7
+1ebee6e6aad2c0f11e7d1a8e6caeb6bc5535007e
 
 	* r2225: Cosmetic changes
 
 Mon Mar 28 08:57:49 2005 +0000 Shahar Frank
-819c4281148fa688abe99e1d2ab89992cb0323f4
+303edbb2c3a13c6a88dc2d16c4eb7d363cc1e9e1
 
 	* r2051: cleanup
 
 Tue Mar 22 17:12:42 2005 +0000 Shahar Frank
-e8b6590af7844c1e56dad3ec3a24ae2c4811dbf6
+04364aab3eba34901e68f0df88ef0d7d78d4e275
 
 	* r2034: change umad_recv and mad_receive semantics - timeout 0 mean do not block
 
 Thu Mar 17 14:03:15 2005 +0000 Hal Rosenstock
-6d41cef9573c306a6c55717d7a8da6a677975e36
+0eab1a1595a205647aa53e1426ef5cba7f1734f9
 
 	* r2015: Change IB_OPENIB_OUI to official IEEE assignment
 
 Thu Mar 3 16:00:58 2005 +0000 Shahar Frank
-4bda3b54f5e16b72f5e8b9e9279f34eaa12f8ebc
+4cde26c8ce5729519ad8799d33d644269dcc0759
 
 	* r1950: add vendor classes
 
 Thu Mar 3 15:42:23 2005 +0000 Shahar Frank
-2a5cd860cc90ae9066b818d6167b9e4e9caea3ae
+640726d5fbec802791446dc4a8a63e188a3a1df2
 
 	* r1948: update
 
 Thu Mar 3 11:27:26 2005 +0000 Hal Rosenstock
-624ec7b0fe6a2bb207e2d7014a8e3afb71c27f6a
+697f18835f5a59f957bc25bf8a773b5f13ce0ddf
 
-	* r1945: Add include to eliminate some implicit function declaration 
+	* r1945: Add include to eliminate some implicit function declaration compile warnings
 
 Thu Mar 3 10:07:32 2005 +0000 Shahar Frank
-082003a7aa7f6ab393a19322f2d60cadd7f07624
+6ac9adf151fe2848399767e363e32b501ab562cd
 
 	* r1944: add vendor and server side support
 
 Sun Feb 20 15:55:52 2005 +0000 Hal Rosenstock
-4b3c0999d61648e7092f66f267e096ef103682ec
+802b065dcd472bd9cd1bc1ecc69365eb1f27c08c
 
 	* r1843: Cosmetic changes
 
 Sun Feb 20 12:52:04 2005 +0000 Shahar Frank
-bbe99e6275db09135b9294c62d585a4220eaa962
+7d3650290fd60cf26e240c5524a264257ae14cd9
 
 	* r1840: use _get|set_array in mad_set|get_array
 
 Sun Feb 20 12:50:55 2005 +0000 Shahar Frank
-6c682d98d8663a943e04497a4c51b912ff0a38c5
+09a7fabe31e1c46a1444f929090c87609c4afec7
 
 	* r1839: minor cleanup
 
 Sun Feb 20 12:49:45 2005 +0000 Shahar Frank
-21d5b96feb58ecbd391bcf1b4f31c0e7a194d3c3
+6060c9b259b375e43cc4327bc078fcb49deca574
 
 	* r1838: buf fixes and temporary debug instrumentations
 
 Sun Feb 20 12:48:10 2005 +0000 Shahar Frank
-1d36d6802ee479fbc0f4f9fd46a029fb67a809c1
+773e5a815f5ef931038049fb757f10733d0b0267
 
 	* r1837: fix set|get array bug handling non word aligned sizes/off
 
 Mon Feb 14 17:46:01 2005 +0000 Shahar Frank
-535dced0f21393265a9f9a35d28a0e9a7c01a20d
+a17e6ec8017d641eba7d6df90bdc2b88530a016e
 
 	* r1786: add vendor mads support
 
 Thu Feb 10 14:12:25 2005 +0000 Shahar Frank
-ae62502c139176aa9fd250991d893f3c960720b5
+8fe13040816f2d5f3178affc0f67169c87169dd9
 
 	* r1764: rename encode_MAD to mad_encode, oui
 
 Thu Feb 10 11:41:23 2005 +0000 Shahar Frank
-3d1da4dfeb8515261bac406d833c2e8f11a2d0bf
+b228075efe91f23d6aa7b8fe69909447f24939c8
 
 	* r1760: bug fixes: tr order, buffer memset
 
 Mon Feb 7 17:17:56 2005 +0000 Shahar Frank
-e3bec2b52d8f15b0d4891ef35998b528e146e8ef
+5cd996e36d863ae2ccbc7935f24a8b99c2004611
 
 	* r1756: add mad_dump_rhex - no 0x prefix
 
 Mon Feb 7 15:17:16 2005 +0000 Shahar Frank
-9145f0071aeeec05f0bc6b885456151da0ff64ee
+658006fd92b72b1269fbc2e0d62ef5a11fa02720
 
 	* r1752: add gs.c symbols
 
 Mon Feb 7 14:15:49 2005 +0000 Shahar Frank
-e9baa88fbbecc0e950f53aa05c785a322e7b7778
+afb3930ff001d27b0e3505bf6ce6da5b97571cb1
 
 	* r1749: add gs.c: port counters support
 
 Thu Feb 3 17:17:17 2005 +0000 Shahar Frank
-b30ba9362a5de86c8ed968143c56b02ccbdc6ae6
+682f4ab08820f05858fc3cbf4f86ce49d5754ceb
 
 	* r1727: fix bug in ib_resolve_self
 
 Wed Feb 2 18:19:39 2005 +0000 Hal Rosenstock
-7124633a11e258fb59a2c70e7b6bd930d6f45643
+a08488a9c69a407ea9cd5df88ca4b4cb24f6fba3
 
 	* r1719: Changes so ibroute will build when libraries are using autotools
 
 Wed Feb 2 17:41:28 2005 +0000 Shahar Frank
-4998c9ad08114ebee72a6473c588f0757ba44517
+d3741f99a755449a9316c6abe215e6cc807ca0e6
 
 	* r1718: resolve changes
 
 Sat Jan 29 18:36:29 2005 +0000 Hal Rosenstock
-576dee77724ca4944f472185585ac422a211fc78
+05a18565536858f834267b1035ab9f8be0378519
 
-	* r1699: Initial cutover to autotools for diags including 
+	* r1699: Initial cutover to autotools for diags including update of README directions
 
 Sat Jan 29 18:01:07 2005 +0000 Hal Rosenstock
-b359ec8f10dcf32736f60d72fd68e6f191023283
+6cf0e37356a75b21c327e9b7d19d6c1c2cd101a5
 
 	* r1698: Add IB header and library dependencies in for autotools
 
 Fri Jan 28 20:49:06 2005 +0000 Hal Rosenstock
-083597947096f25b912da93a0b9c7bd308afd132
+3fdce1cda09d22ef4fc94489264465fe6f734067
 
-	* r1693: Final preparations for autotools switchover for 
+	* r1693: Final preparations for autotools switchover for management libraries and diagnostics (but not OpenSM and its libraries as yet)
 
 Thu Jan 27 19:16:47 2005 +0000 Hal Rosenstock
-6a062c334e72613a4ca9293225b086d9dcf61466
+53c3a19b5a20ce71dac34da3e48951a9d788fdbd
 
 	* r1681: Fix typos in names of new linkspeed routines
 
 Thu Jan 27 16:31:46 2005 +0000 Hal Rosenstock
-36bba3730ca2b83b2185d2a6db05eaa25d04c6de
+aa64ced84f241a98ce550b547f0ae78e84342837
 
 	* r1677: More IBA 1.2 changes for smpquery
 
 Thu Jan 27 14:02:42 2005 +0000 Hal Rosenstock
-ba9991a9cb3c8cbdb23b0d57a36d01651f9024f3
+5d6b6d5ea393375b1d7c174495b82208c25a6f3e
 
 	* r1675: Added support for new IBA 1.2 link widths
 
 Thu Jan 27 13:52:02 2005 +0000 Hal Rosenstock
-9d6b679bbd0be53dcff32deab23bf20af051e9f2
+9c34445e42888476670c7eb320e7168386a2be46
 
-	* r1674: Decode PortInfo:LinkDownDefaultState and add PhyTest to decoded
+	* r1674: Decode PortInfo:LinkDownDefaultState and add PhyTest to decoded values of PortInfo:PortPhysicalState
 
 Wed Jan 26 15:41:41 2005 +0000 Hal Rosenstock
-ae04d826780e606f1992f23e47cea0aa3f6de6af
+845888a49c39febbcc80cef672f7678fe828b293
 
 	* r1655: Cosmetic changes to catch up with latest changes
 
 Tue Jan 25 23:31:32 2005 +0000 Hal Rosenstock
-aa2365cfde0d1a058bddb106ad24426abe8d04f3
+c5e20fe96d5c970eae8a99a8d19127661479d75b
 
 	* r1652: Cleanup undeleted files which were previously moved to src subdirectories
 
 Tue Jan 25 23:17:25 2005 +0000 Hal Rosenstock
-98493c5d16d7a6ecae7e816732d0042cf5dc2b1d
+4a40021daa71f23938f125aa6e951b11962cda84
 
 	* r1651: Install public headers in /usr/local/include/infiniband
 
 Tue Jan 25 22:19:06 2005 +0000 Hal Rosenstock
-67598bec2595d4e4e6d57cff5be88980c856bf19
+70534333d9d1cebcc0595e9bcd0ded44e8a8f69a
 
 	* r1649: More changes to ready management directory for autotools switchover
diff --git a/Makefile.am b/Makefile.am
index beae1a4..b96657e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
-
+ACLOCAL_AMFLAGS = -I config
 SUBDIRS = .
 
-INCLUDES = -I$(srcdir)/include/infiniband -I$(includedir)
+INCLUDES = -I$(srcdir)/include -I$(includedir)
 
 lib_LTLIBRARIES = libibmad.la
 
@@ -15,7 +15,8 @@ endif
 
 libibmad_la_SOURCES = src/dump.c src/fields.c src/mad.c src/portid.c \
 		      src/resolve.c src/rpc.c src/sa.c src/smp.c src/gs.c \
-		      src/serv.c src/register.c src/vendor.c
+		      src/serv.c src/register.c src/vendor.c src/bm.c \
+		      src/mad_internal.h src/cc.c
 
 libibmad_la_LDFLAGS = -version-info $(ibmad_api_version) \
     -export-dynamic $(libibmad_version_script)
@@ -23,12 +24,12 @@ libibmad_la_DEPENDENCIES = $(srcdir)/src/libibmad.map
 
 libibmadincludedir = $(includedir)/infiniband
 
-libibmadinclude_HEADERS = $(srcdir)/include/infiniband/mad.h
+libibmadinclude_HEADERS = $(srcdir)/include/infiniband/mad.h $(srcdir)/include/infiniband/mad_osd.h
 
-EXTRA_DIST = $(srcdir)/include/infiniband/mad.h libibmad.spec.in libibmad.spec \
+EXTRA_DIST = libibmad.spec.in libibmad.spec \
 	$(srcdir)/src/libibmad.map libibmad.ver autogen.sh
 
 dist-hook:
-	if [ -x $(top_srcdir)/../gen_chlog.sh ] ; then \
-		$(top_srcdir)/../gen_chlog.sh $(PACKAGE) > $(distdir)/ChangeLog ; \
+	if [ -x $(top_srcdir)/gen_chlog.sh ] ; then \
+		$(top_srcdir)/gen_chlog.sh > $(distdir)/ChangeLog ; \
 	fi
diff --git a/Makefile.in b/Makefile.in
index 8329f08..58e6c80 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,8 +18,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -34,14 +36,19 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = $(am__configure_deps) $(libibmadinclude_HEADERS) \
+DIST_COMMON = README $(am__configure_deps) $(libibmadinclude_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(srcdir)/config.h.in $(srcdir)/libibmad.spec.in \
 	$(top_srcdir)/configure AUTHORS COPYING ChangeLog \
-	config/config.guess config/config.sub config/depcomp \
-	config/install-sh config/ltmain.sh config/missing
+	config/compile config/config.guess config/config.sub \
+	config/depcomp config/install-sh config/ltmain.sh \
+	config/missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
+	$(top_srcdir)/config/ltoptions.m4 \
+	$(top_srcdir)/config/ltsugar.m4 \
+	$(top_srcdir)/config/ltversion.m4 \
+	$(top_srcdir)/config/lt~obsolete.m4 $(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 \
@@ -49,22 +56,38 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = libibmad.spec
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(libdir)" \
 	"$(DESTDIR)$(libibmadincludedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libibmad_la_LIBADD =
 am_libibmad_la_OBJECTS = libibmad_la-dump.lo libibmad_la-fields.lo \
 	libibmad_la-mad.lo libibmad_la-portid.lo \
 	libibmad_la-resolve.lo libibmad_la-rpc.lo libibmad_la-sa.lo \
 	libibmad_la-smp.lo libibmad_la-gs.lo libibmad_la-serv.lo \
-	libibmad_la-register.lo libibmad_la-vendor.lo
+	libibmad_la-register.lo libibmad_la-vendor.lo \
+	libibmad_la-bm.lo libibmad_la-cc.lo
 libibmad_la_OBJECTS = $(am_libibmad_la_OBJECTS)
 libibmad_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libibmad_la_CFLAGS) \
@@ -72,6 +95,7 @@ libibmad_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 DEFAULT_INCLUDES = -I. at am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -90,10 +114,12 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
-libibmadincludeHEADERS_INSTALL = $(INSTALL_HEADER)
 HEADERS = $(libibmadinclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -101,9 +127,34 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -221,23 +272,25 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I config
 SUBDIRS = .
-INCLUDES = -I$(srcdir)/include/infiniband -I$(includedir)
+INCLUDES = -I$(srcdir)/include -I$(includedir)
 lib_LTLIBRARIES = libibmad.la
 libibmad_la_CFLAGS = -Wall
 @HAVE_LD_VERSION_SCRIPT_FALSE at libibmad_version_script = 
 @HAVE_LD_VERSION_SCRIPT_TRUE at libibmad_version_script = -Wl,--version-script=$(srcdir)/src/libibmad.map
 libibmad_la_SOURCES = src/dump.c src/fields.c src/mad.c src/portid.c \
 		      src/resolve.c src/rpc.c src/sa.c src/smp.c src/gs.c \
-		      src/serv.c src/register.c src/vendor.c
+		      src/serv.c src/register.c src/vendor.c src/bm.c \
+		      src/mad_internal.h src/cc.c
 
 libibmad_la_LDFLAGS = -version-info $(ibmad_api_version) \
     -export-dynamic $(libibmad_version_script)
 
 libibmad_la_DEPENDENCIES = $(srcdir)/src/libibmad.map
 libibmadincludedir = $(includedir)/infiniband
-libibmadinclude_HEADERS = $(srcdir)/include/infiniband/mad.h
-EXTRA_DIST = $(srcdir)/include/infiniband/mad.h libibmad.spec.in libibmad.spec \
+libibmadinclude_HEADERS = $(srcdir)/include/infiniband/mad.h $(srcdir)/include/infiniband/mad_osd.h
+EXTRA_DIST = libibmad.spec.in libibmad.spec \
 	$(srcdir)/src/libibmad.map libibmad.ver autogen.sh
 
 all: config.h
@@ -251,15 +304,15 @@ $(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  \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -275,9 +328,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
 	$(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(srcdir) && $(AUTOCONF)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
 	@if test ! -f $@; then \
@@ -289,7 +343,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in:  $(am__configure_deps) 
-	cd $(top_srcdir) && $(AUTOHEADER)
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 	rm -f stamp-h1
 	touch $@
 
@@ -300,20 +354,24 @@ libibmad.spec: $(top_builddir)/config.status $(srcdir)/libibmad.spec.in
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
 	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
 	  if test -f $$p; then \
-	    f=$(am__strip_dir) \
-	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	    list2="$$list2 $$p"; \
 	  else :; fi; \
-	done
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
 
 uninstall-libLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  p=$(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
 	done
 
 clean-libLTLIBRARIES:
@@ -333,6 +391,8 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libibmad_la-bm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libibmad_la-cc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libibmad_la-dump.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libibmad_la-fields.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libibmad_la-gs.Plo at am__quote@
@@ -348,108 +408,122 @@ distclean-compile:
 
 .c.o:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
 libibmad_la-dump.lo: src/dump.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-dump.lo -MD -MP -MF $(DEPDIR)/libibmad_la-dump.Tpo -c -o libibmad_la-dump.lo `test -f 'src/dump.c' || echo '$(srcdir)/'`src/dump.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-dump.Tpo $(DEPDIR)/libibmad_la-dump.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-dump.lo -MD -MP -MF $(DEPDIR)/libibmad_la-dump.Tpo -c -o libibmad_la-dump.lo `test -f 'src/dump.c' || echo '$(srcdir)/'`src/dump.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-dump.Tpo $(DEPDIR)/libibmad_la-dump.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/dump.c' object='libibmad_la-dump.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-dump.lo `test -f 'src/dump.c' || echo '$(srcdir)/'`src/dump.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-dump.lo `test -f 'src/dump.c' || echo '$(srcdir)/'`src/dump.c
 
 libibmad_la-fields.lo: src/fields.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-fields.lo -MD -MP -MF $(DEPDIR)/libibmad_la-fields.Tpo -c -o libibmad_la-fields.lo `test -f 'src/fields.c' || echo '$(srcdir)/'`src/fields.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-fields.Tpo $(DEPDIR)/libibmad_la-fields.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-fields.lo -MD -MP -MF $(DEPDIR)/libibmad_la-fields.Tpo -c -o libibmad_la-fields.lo `test -f 'src/fields.c' || echo '$(srcdir)/'`src/fields.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-fields.Tpo $(DEPDIR)/libibmad_la-fields.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/fields.c' object='libibmad_la-fields.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-fields.lo `test -f 'src/fields.c' || echo '$(srcdir)/'`src/fields.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-fields.lo `test -f 'src/fields.c' || echo '$(srcdir)/'`src/fields.c
 
 libibmad_la-mad.lo: src/mad.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-mad.lo -MD -MP -MF $(DEPDIR)/libibmad_la-mad.Tpo -c -o libibmad_la-mad.lo `test -f 'src/mad.c' || echo '$(srcdir)/'`src/mad.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-mad.Tpo $(DEPDIR)/libibmad_la-mad.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-mad.lo -MD -MP -MF $(DEPDIR)/libibmad_la-mad.Tpo -c -o libibmad_la-mad.lo `test -f 'src/mad.c' || echo '$(srcdir)/'`src/mad.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-mad.Tpo $(DEPDIR)/libibmad_la-mad.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/mad.c' object='libibmad_la-mad.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-mad.lo `test -f 'src/mad.c' || echo '$(srcdir)/'`src/mad.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-mad.lo `test -f 'src/mad.c' || echo '$(srcdir)/'`src/mad.c
 
 libibmad_la-portid.lo: src/portid.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-portid.lo -MD -MP -MF $(DEPDIR)/libibmad_la-portid.Tpo -c -o libibmad_la-portid.lo `test -f 'src/portid.c' || echo '$(srcdir)/'`src/portid.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-portid.Tpo $(DEPDIR)/libibmad_la-portid.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-portid.lo -MD -MP -MF $(DEPDIR)/libibmad_la-portid.Tpo -c -o libibmad_la-portid.lo `test -f 'src/portid.c' || echo '$(srcdir)/'`src/portid.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-portid.Tpo $(DEPDIR)/libibmad_la-portid.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/portid.c' object='libibmad_la-portid.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-portid.lo `test -f 'src/portid.c' || echo '$(srcdir)/'`src/portid.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-portid.lo `test -f 'src/portid.c' || echo '$(srcdir)/'`src/portid.c
 
 libibmad_la-resolve.lo: src/resolve.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-resolve.lo -MD -MP -MF $(DEPDIR)/libibmad_la-resolve.Tpo -c -o libibmad_la-resolve.lo `test -f 'src/resolve.c' || echo '$(srcdir)/'`src/resolve.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-resolve.Tpo $(DEPDIR)/libibmad_la-resolve.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-resolve.lo -MD -MP -MF $(DEPDIR)/libibmad_la-resolve.Tpo -c -o libibmad_la-resolve.lo `test -f 'src/resolve.c' || echo '$(srcdir)/'`src/resolve.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-resolve.Tpo $(DEPDIR)/libibmad_la-resolve.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/resolve.c' object='libibmad_la-resolve.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-resolve.lo `test -f 'src/resolve.c' || echo '$(srcdir)/'`src/resolve.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-resolve.lo `test -f 'src/resolve.c' || echo '$(srcdir)/'`src/resolve.c
 
 libibmad_la-rpc.lo: src/rpc.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-rpc.lo -MD -MP -MF $(DEPDIR)/libibmad_la-rpc.Tpo -c -o libibmad_la-rpc.lo `test -f 'src/rpc.c' || echo '$(srcdir)/'`src/rpc.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-rpc.Tpo $(DEPDIR)/libibmad_la-rpc.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-rpc.lo -MD -MP -MF $(DEPDIR)/libibmad_la-rpc.Tpo -c -o libibmad_la-rpc.lo `test -f 'src/rpc.c' || echo '$(srcdir)/'`src/rpc.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-rpc.Tpo $(DEPDIR)/libibmad_la-rpc.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/rpc.c' object='libibmad_la-rpc.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-rpc.lo `test -f 'src/rpc.c' || echo '$(srcdir)/'`src/rpc.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-rpc.lo `test -f 'src/rpc.c' || echo '$(srcdir)/'`src/rpc.c
 
 libibmad_la-sa.lo: src/sa.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-sa.lo -MD -MP -MF $(DEPDIR)/libibmad_la-sa.Tpo -c -o libibmad_la-sa.lo `test -f 'src/sa.c' || echo '$(srcdir)/'`src/sa.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-sa.Tpo $(DEPDIR)/libibmad_la-sa.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-sa.lo -MD -MP -MF $(DEPDIR)/libibmad_la-sa.Tpo -c -o libibmad_la-sa.lo `test -f 'src/sa.c' || echo '$(srcdir)/'`src/sa.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-sa.Tpo $(DEPDIR)/libibmad_la-sa.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/sa.c' object='libibmad_la-sa.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-sa.lo `test -f 'src/sa.c' || echo '$(srcdir)/'`src/sa.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-sa.lo `test -f 'src/sa.c' || echo '$(srcdir)/'`src/sa.c
 
 libibmad_la-smp.lo: src/smp.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-smp.lo -MD -MP -MF $(DEPDIR)/libibmad_la-smp.Tpo -c -o libibmad_la-smp.lo `test -f 'src/smp.c' || echo '$(srcdir)/'`src/smp.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-smp.Tpo $(DEPDIR)/libibmad_la-smp.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-smp.lo -MD -MP -MF $(DEPDIR)/libibmad_la-smp.Tpo -c -o libibmad_la-smp.lo `test -f 'src/smp.c' || echo '$(srcdir)/'`src/smp.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-smp.Tpo $(DEPDIR)/libibmad_la-smp.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/smp.c' object='libibmad_la-smp.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-smp.lo `test -f 'src/smp.c' || echo '$(srcdir)/'`src/smp.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-smp.lo `test -f 'src/smp.c' || echo '$(srcdir)/'`src/smp.c
 
 libibmad_la-gs.lo: src/gs.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-gs.lo -MD -MP -MF $(DEPDIR)/libibmad_la-gs.Tpo -c -o libibmad_la-gs.lo `test -f 'src/gs.c' || echo '$(srcdir)/'`src/gs.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-gs.Tpo $(DEPDIR)/libibmad_la-gs.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-gs.lo -MD -MP -MF $(DEPDIR)/libibmad_la-gs.Tpo -c -o libibmad_la-gs.lo `test -f 'src/gs.c' || echo '$(srcdir)/'`src/gs.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-gs.Tpo $(DEPDIR)/libibmad_la-gs.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/gs.c' object='libibmad_la-gs.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-gs.lo `test -f 'src/gs.c' || echo '$(srcdir)/'`src/gs.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-gs.lo `test -f 'src/gs.c' || echo '$(srcdir)/'`src/gs.c
 
 libibmad_la-serv.lo: src/serv.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-serv.lo -MD -MP -MF $(DEPDIR)/libibmad_la-serv.Tpo -c -o libibmad_la-serv.lo `test -f 'src/serv.c' || echo '$(srcdir)/'`src/serv.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-serv.Tpo $(DEPDIR)/libibmad_la-serv.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-serv.lo -MD -MP -MF $(DEPDIR)/libibmad_la-serv.Tpo -c -o libibmad_la-serv.lo `test -f 'src/serv.c' || echo '$(srcdir)/'`src/serv.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-serv.Tpo $(DEPDIR)/libibmad_la-serv.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/serv.c' object='libibmad_la-serv.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-serv.lo `test -f 'src/serv.c' || echo '$(srcdir)/'`src/serv.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-serv.lo `test -f 'src/serv.c' || echo '$(srcdir)/'`src/serv.c
 
 libibmad_la-register.lo: src/register.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-register.lo -MD -MP -MF $(DEPDIR)/libibmad_la-register.Tpo -c -o libibmad_la-register.lo `test -f 'src/register.c' || echo '$(srcdir)/'`src/register.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-register.Tpo $(DEPDIR)/libibmad_la-register.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-register.lo -MD -MP -MF $(DEPDIR)/libibmad_la-register.Tpo -c -o libibmad_la-register.lo `test -f 'src/register.c' || echo '$(srcdir)/'`src/register.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-register.Tpo $(DEPDIR)/libibmad_la-register.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/register.c' object='libibmad_la-register.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-register.lo `test -f 'src/register.c' || echo '$(srcdir)/'`src/register.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-register.lo `test -f 'src/register.c' || echo '$(srcdir)/'`src/register.c
 
 libibmad_la-vendor.lo: src/vendor.c
- at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-vendor.lo -MD -MP -MF $(DEPDIR)/libibmad_la-vendor.Tpo -c -o libibmad_la-vendor.lo `test -f 'src/vendor.c' || echo '$(srcdir)/'`src/vendor.c
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libibmad_la-vendor.Tpo $(DEPDIR)/libibmad_la-vendor.Plo
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-vendor.lo -MD -MP -MF $(DEPDIR)/libibmad_la-vendor.Tpo -c -o libibmad_la-vendor.lo `test -f 'src/vendor.c' || echo '$(srcdir)/'`src/vendor.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-vendor.Tpo $(DEPDIR)/libibmad_la-vendor.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/vendor.c' object='libibmad_la-vendor.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-vendor.lo `test -f 'src/vendor.c' || echo '$(srcdir)/'`src/vendor.c
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-vendor.lo `test -f 'src/vendor.c' || echo '$(srcdir)/'`src/vendor.c
+
+libibmad_la-bm.lo: src/bm.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-bm.lo -MD -MP -MF $(DEPDIR)/libibmad_la-bm.Tpo -c -o libibmad_la-bm.lo `test -f 'src/bm.c' || echo '$(srcdir)/'`src/bm.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-bm.Tpo $(DEPDIR)/libibmad_la-bm.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/bm.c' object='libibmad_la-bm.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-bm.lo `test -f 'src/bm.c' || echo '$(srcdir)/'`src/bm.c
+
+libibmad_la-cc.lo: src/cc.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -MT libibmad_la-cc.lo -MD -MP -MF $(DEPDIR)/libibmad_la-cc.Tpo -c -o libibmad_la-cc.lo `test -f 'src/cc.c' || echo '$(srcdir)/'`src/cc.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libibmad_la-cc.Tpo $(DEPDIR)/libibmad_la-cc.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/cc.c' object='libibmad_la-cc.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libibmad_la_CFLAGS) $(CFLAGS) -c -o libibmad_la-cc.lo `test -f 'src/cc.c' || echo '$(srcdir)/'`src/cc.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -462,20 +536,23 @@ distclean-libtool:
 install-libibmadincludeHEADERS: $(libibmadinclude_HEADERS)
 	@$(NORMAL_INSTALL)
 	test -z "$(libibmadincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libibmadincludedir)"
-	@list='$(libibmadinclude_HEADERS)'; for p in $$list; do \
+	@list='$(libibmadinclude_HEADERS)'; test -n "$(libibmadincludedir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(libibmadincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libibmadincludedir)/$$f'"; \
-	  $(libibmadincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libibmadincludedir)/$$f"; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libibmadincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libibmadincludedir)" || exit $$?; \
 	done
 
 uninstall-libibmadincludeHEADERS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(libibmadinclude_HEADERS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(libibmadincludedir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(libibmadincludedir)/$$f"; \
-	done
+	@list='$(libibmadinclude_HEADERS)'; test -n "$(libibmadincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(libibmadincludedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(libibmadincludedir)" && rm -f $$files
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -484,7 +561,7 @@ uninstall-libibmadincludeHEADERS:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -501,7 +578,7 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
@@ -509,7 +586,7 @@ $(RECURSIVE_TARGETS):
 	fi; test -z "$$fail"
 
 $(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -535,16 +612,16 @@ $(RECURSIVE_CLEAN_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -559,7 +636,7 @@ tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -571,7 +648,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
@@ -580,36 +657,41 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
-	test -d $(distdir) || mkdir $(distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -625,29 +707,44 @@ distdir: $(DISTFILES)
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
 	  if test -d $$d/$$file; then \
 	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
 	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
 		am__remove_distdir=: \
 		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -655,11 +752,13 @@ distdir: $(DISTFILES)
 	$(MAKE) $(AM_MAKEFLAGS) \
 	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
 	  dist-hook
-	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r $(distdir)
+	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
@@ -672,6 +771,10 @@ dist-lzma: distdir
 	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 	$(am__remove_distdir)
 
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -695,15 +798,17 @@ dist dist-all: distdir
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
@@ -711,9 +816,11 @@ distcheck: dist
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/_build \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -735,13 +842,15 @@ distcheck: dist
 	  && rm -rf "$$dc_destdir" \
 	  && $(MAKE) $(AM_MAKEFLAGS) dist \
 	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@cd $(distuninstallcheck_dir) \
+	@$(am__cd) '$(distuninstallcheck_dir)' \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -786,6 +895,7 @@ clean-generic:
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -808,6 +918,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -816,18 +928,28 @@ install-data-am: install-libibmadincludeHEADERS
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am: install-libLTLIBRARIES
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -853,33 +975,35 @@ ps-am:
 uninstall-am: uninstall-libLTLIBRARIES \
 	uninstall-libibmadincludeHEADERS
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-	install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am am--refresh check check-am clean clean-generic \
 	clean-libLTLIBRARIES clean-libtool ctags ctags-recursive dist \
 	dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \
-	dist-tarZ dist-zip distcheck distclean distclean-compile \
-	distclean-generic distclean-hdr distclean-libtool \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
-	install-libibmadincludeHEADERS install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs installdirs-am \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	dist-tarZ dist-xz dist-zip distcheck distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am \
+	install-libLTLIBRARIES install-libibmadincludeHEADERS \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
 	uninstall-libLTLIBRARIES uninstall-libibmadincludeHEADERS
 
 
 dist-hook:
-	if [ -x $(top_srcdir)/../gen_chlog.sh ] ; then \
-		$(top_srcdir)/../gen_chlog.sh $(PACKAGE) > $(distdir)/ChangeLog ; \
+	if [ -x $(top_srcdir)/gen_chlog.sh ] ; then \
+		$(top_srcdir)/gen_chlog.sh > $(distdir)/ChangeLog ; \
 	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..097e0ea
--- /dev/null
+++ b/README
@@ -0,0 +1,25 @@
+libibmad is a convenience library to encode, decode, and dump IB MAD packets.  It
+is implemented on top of and in conjunction with libibumad (the umad kernel
+interface library.)
+
+The main consumer of this library is the infiniband-diags package.
+
+Dependencies:
+
+	1) libibumad >= 1.3.7
+	2) opensm-libs >= 3.3.10
+	3) ib_umad kernel module
+
+Release notes for 1.3.8 to 1.3.9 are:
+
+   1) bug fixes
+   2) Add support for Congestion Control MAD's
+   3) Add SA NodeRecord
+   4) Add MKey support to ibmad_port object
+   5) Update counter offsets for PortExtendedSpeedsCounters
+   6) Additional print functions
+        classportinfo dump function
+	additional debugging
+
+   These changes increment the soname to 8 but the library is backwards
+   compatible to soname 5.
diff --git a/aclocal.m4 b/aclocal.m4
index 8e383e6..b5ac213 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -19,7965 +19,6 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-		   [m4_fatal([Libtool version $1 or higher is required],
-		             63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\	*)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-	[m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-	[tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-	   m4_quote(lt_decl_varnames),
-	m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-					   [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-	dnl If the libtool generation code has been placed in $CONFIG_LT,
-	dnl instead of duplicating it all over again into config.status,
-	dnl then we will have config.status run $CONFIG_LT later, so it
-	dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -q, --quiet     do not print progress messages
-  -d, --debug     don't remove temporary files
-
-Report bugs to <bug-libtool at gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],			[_LT_LANG(C)],
-  [C++],		[_LT_LANG(CXX)],
-  [Java],		[_LT_LANG(GCJ)],
-  [Fortran 77],		[_LT_LANG(F77)],
-  [Fortran],		[_LT_LANG(FC)],
-  [Windows Resource],	[_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
-  case $host_os in
-    rhapsody* | darwin*)
-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
-    AC_CHECK_TOOL([LIPO], [lipo], [:])
-    AC_CHECK_TOOL([OTOOL], [otool], [:])
-    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
-    _LT_DECL([], [DSYMUTIL], [1],
-      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
-    _LT_DECL([], [NMEDIT], [1],
-      [Tool to change global to local symbols on Mac OS X])
-    _LT_DECL([], [LIPO], [1],
-      [Tool to manipulate fat objects and archives on Mac OS X])
-    _LT_DECL([], [OTOOL], [1],
-      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
-    _LT_DECL([], [OTOOL64], [1],
-      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
-    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
-      [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-	# By default we will add the -single_module flag. You can override
-	# by either setting the environment variable LT_MULTI_MODULE
-	# non-empty at configure time, or by adding -multi_module to the
-	# link flags.
-	rm -rf libconftest.dylib*
-	echo "int foo(void){return 1;}" > conftest.c
-	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
-	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
-	  lt_cv_apple_cc_single_mod=yes
-	else
-	  cat conftest.err >&AS_MESSAGE_LOG_FD
-	fi
-	rm -rf libconftest.dylib*
-	rm -f conftest.*
-      fi])
-    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
-      [lt_cv_ld_exported_symbols_list],
-      [lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-	[lt_cv_ld_exported_symbols_list=yes],
-	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS="$save_LDFLAGS"
-    ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
-  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_automatic, $1)=yes
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
-  _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-    m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-],[])
-  else
-  _LT_TAGVAR(ld_shlibs, $1)=no
-  fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
-
-	  if test "$prev" != 'sed 50q "[$]0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-  [AS_HELP_STRING([--disable-libtool-lock],
-    [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-	HPUX_IA64_MODE="32"
-	;;
-      *ELF-64*)
-	HPUX_IA64_MODE="64"
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -melf32bsmip"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -melf32bmipn32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -melf64bmip"
-	;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -32"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -n32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -64"
-	  ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_i386_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
-	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
-	    LD="${LD-ld} -m elf32ppclinux"
-	    ;;
-	  s390x-*linux*)
-	    LD="${LD-ld} -m elf_s390"
-	    ;;
-	  sparc64-*linux*)
-	    LD="${LD-ld} -m elf32_sparc"
-	    ;;
-	esac
-	;;
-      *64-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_x86_64_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_x86_64"
-	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
-	    LD="${LD-ld} -m elf64ppc"
-	    ;;
-	  s390*-*linux*|s390*-*tpf*)
-	    LD="${LD-ld} -m elf64_s390"
-	    ;;
-	  sparc*-*linux*)
-	    LD="${LD-ld} -m elf64_sparc"
-	    ;;
-	esac
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)
-	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-	  LD="${LD-ld} -64"
-	fi
-	;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
-    [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
-    [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$5], , :, [$5])
-else
-    m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                  [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$4], , :, [$4])
-else
-    m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
-    [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}]
-_LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-    ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-	  lt_cv_dlopen_self_static, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
-	 [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
-	 [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
-	 [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-	[Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
-         [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
-   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
-    [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
-	[], [
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[[4-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-    gentoo)
-      version_type=linux ;;
-    *)
-      version_type=freebsd-$objformat ;;
-  esac
-
-  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
-      ;;
-    linux)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-      soname_spec='${libname}${release}${shared_ext}$major'
-      need_lib_prefix=no
-      need_version=no
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix[[3-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
-    [Variables whose values should be saved in libtool wrapper scripts and
-    restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
-    [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
-    [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
-    [[List of archive names.  First name is the real one, the rest are links.
-    The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
-    [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
-    [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
-    [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
-    [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
-    [[As "finish_cmds", except a single script fragment to be evaled but
-    not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
-    [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
-    [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="m4_if([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-_LT_EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
-	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[[3-9]]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
-    [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
-	#   nm: unknown option "B" ignored
-	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
-	  lt_cv_path_NM="$tmp_nm -B"
-	  break
-	  ;;
-	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	  */dev/null*)
-	    lt_cv_path_NM="$tmp_nm -p"
-	    break
-	    ;;
-	  *)
-	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	    continue # so that we can try to find one that supports BSD flags
-	    ;;
-	  esac
-	  ;;
-	esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
-  AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
-  [lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
-  cat conftest.out >&AS_MESSAGE_LOG_FD
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
-	[Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK ['"\
-"     {last_section=section; section=\$ 3};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx]"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-	  cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-const struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-	  cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
-    [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-    [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
-    [lt_cv_sys_global_symbol_to_c_name_address], [1],
-    [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
-    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
-    [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[[4-9]]*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd* | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	      ;;
-	    esac
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      interix*)
-	# This is c89, which is MS Visual C++ (no shared libs)
-	# Anyone wants to do a port?
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux* | k*bsd*-gnu)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  icpc* )
-	    # Intel C++, used to be incompatible with GCC.
-	    # ICC 10 doesn't accept -KPIC any more.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  pgCC* | pgcpp*)
-	    # Portland Group C++ compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  cxx*)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd*)
-	;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC*)
-	    # Rational C++ 2.4.1
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.x
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC*)
-	    # NonStop-UX NCC 3.20
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
-	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	;;
-      *)
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
-	  ;;
-	esac
-	;;
-      esac
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    rdos*)
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
-    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
-    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
-	[Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
-	[Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix[[4-9]]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  *)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
-  runpath_var=
-  _LT_TAGVAR(allow_undefined_flag, $1)=
-  _LT_TAGVAR(always_export_symbols, $1)=no
-  _LT_TAGVAR(archive_cmds, $1)=
-  _LT_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_TAGVAR(compiler_needs_object, $1)=no
-  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(hardcode_automatic, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(inherit_rpath, $1)=no
-  _LT_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_TAGVAR(module_cmds, $1)=
-  _LT_TAGVAR(module_expsym_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[[3-9]]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=no
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-	case $cc_basename in
-	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
-	esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
-      then
-	tmp_addflag=
-	tmp_sharedflag='-shared'
-	case $cc_basename,$host_cpu in
-        pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	lf95*)				# Lahey Fortran 8.1
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
-	  tmp_sharedflag='-qmkshrobj'
-	  tmp_addflag= ;;
-	esac
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  _LT_TAGVAR(compiler_needs_object, $1)=yes
-	  tmp_sharedflag='-G' ;;
-	*Sun\ F*)			# Sun Fortran 8.3
-	  tmp_sharedflag='-G' ;;
-	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-	case $cc_basename in
-	xlf*)
-	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-	  fi
-	  ;;
-	esac
-      else
-        _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-	;;
-	*)
-	  # For security reasons, it is highly recommended that you always
-	  # use absolute paths for naming shared libraries, and exclude the
-	  # DT_RUNPATH tag from executables and libraries.  But doing so
-	  # requires that you compile everything twice, which is a pain.
-	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  else
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	  fi
-	;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
-
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-	    aix_use_runtimelinking=yes
-	    break
-	  fi
-	  done
-	  ;;
-	esac
-
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_TAGVAR(archive_cmds, $1)=''
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[[012]]|aix4.[[012]].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	  # We have reworked collect2
-	  :
-	  else
-	  # We have old collect2
-	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
-
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-	if test "$host_cpu" = ia64; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an
-	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[[45]]*)
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
-
-    dgux*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	_LT_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  ;;
-	*)
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  ;;
-	esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	# Try to use the -exported_symbol ld option, if it does not
-	# work, assume that -exports_file does not work either and
-	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(inherit_rpath, $1)=yes
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	     ;;
-	   *)
-	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-	fi
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-	# Both c and cxx compiler support -rpath directly
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-	case `$CC -V 2>&1` in
-	*"Compilers 5.0"*)
-	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-	  ;;
-	*)
-	  wlarc='${wl}'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-	  ;;
-	esac
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
-	# but is careful enough not to reorder.
-	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-	sni)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-        ;;
-	motorola)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
-	;;
-      esac
-    fi
-  fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
-    [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
-    [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
-    [enable_shared_with_static_runtimes], [0],
-    [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
-    [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
-    [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
-    [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
-    [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
-    [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
-    [Commands used to build a loadable module if different from building
-    a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
-    [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
-    [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
-    [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
-    [Flag to hardcode $libdir into a binary during linking.
-    This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
-    [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
-    library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
-    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
-    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
-    [Set to "yes" if building a shared library automatically hardcodes DIR
-    into the library and all subsequent libraries and executables linked
-    against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
-    [Set to yes if linker adds runtime paths of dependent libraries
-    to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
-    [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
-    [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
-    [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
-    [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
-    [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
-    [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
-    [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl    [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_SYS_DYNAMIC_LINKER($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-  LT_SYS_DLOPEN_SELF
-  _LT_CMD_STRIPLIB
-
-  # Report which library types will actually be built
-  AC_MSG_CHECKING([if libtool supports shared libraries])
-  AC_MSG_RESULT([$can_build_shared])
-
-  AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  AC_MSG_RESULT([$enable_shared])
-
-  AC_MSG_CHECKING([whether to build static libraries])
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  AC_MSG_RESULT([$enable_static])
-
-  _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-    else
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-      LT_PATH_LD
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-    _LT_TAGVAR(ld_shlibs, $1)=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-      aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	    for ld_flag in $LDFLAGS; do
-	      case $ld_flag in
-	      *-brtl*)
-	        aix_use_runtimelinking=yes
-	        break
-	        ;;
-	      esac
-	    done
-	    ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        _LT_TAGVAR(archive_cmds, $1)=''
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[[012]]|aix4.[[012]].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	    # We have reworked collect2
-	    :
-	  else
-	    # We have old collect2
-	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	    # It fails to find uninstalled libraries when the uninstalled
-	    # path is not listed in the libpath.  Setting hardcode_minus_L
-	    # to unsupported forces relinking
-	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-          esac
-          shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
-	  fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	  # chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-          else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
-	    else
-	      shared_flag='${wl}-bM:SRE'
-	    fi
-          fi
-        fi
-
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-	# export.
-        _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          _LT_SYS_MODULE_PATH_AIX
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-	    # Determine the default libpath from the value encoded in an
-	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	    # Warning - without using the other run time loading flags,
-	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-	  # FIXME: insert proper C++ library support
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	  ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    cp $export_symbols $output_objdir/$soname.def;
-          else
-	    echo EXPORTS > $output_objdir/$soname.def;
-	    cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
-      darwin* | rhapsody*)
-        _LT_DARWIN_LINKER_FEATURES($1)
-	;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          ghcx*)
-	    # Green Hills C++ Compiler
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      freebsd[[12]]*)
-        # C++ shared libraries reported to be fairly broken before
-	# switch to ELF
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      freebsd-elf*)
-        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-        ;;
-
-      gnu*)
-        ;;
-
-      hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-				             # but as the default
-				             # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            _LT_TAGVAR(ld_shlibs, $1)=no
-            ;;
-          aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              _LT_TAGVAR(ld_shlibs, $1)=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            _LT_TAGVAR(hardcode_direct, $1)=no
-            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-            ;;
-          *)
-            _LT_TAGVAR(hardcode_direct, $1)=yes
-            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					         # but as the default
-					         # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          aCC*)
-	    case $host_cpu in
-	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	    esac
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
-	        case $host_cpu in
-	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	        esac
-	      fi
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      interix[[3-9]]*)
-	_LT_TAGVAR(hardcode_direct, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-	# Instead, shared libraries are loaded at an image base (0x10000000 by
-	# default) and relocated if they conflict, which is a slow very memory
-	# consuming and fragmenting process.  To avoid this, we pick a random,
-	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
-	      fi
-	    fi
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-	    ;;
-        esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(inherit_rpath, $1)=yes
-        ;;
-
-      linux* | k*bsd*-gnu)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	    ;;
-	  icpc* | ecpc* )
-	    # Intel C++
-	    with_gnu_ld=yes
-	    # version 8.0 and above of icpc choke on multiply defined symbols
-	    # if we add $predep_objects and $postdep_objects, however 7.1 and
-	    # earlier do not add the objects themselves.
-	    case `$CC -V 2>&1` in
-	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	      *)  # Version 8.0 or newer
-	        tmp_idyn=
-	        case $host_cpu in
-		  ia64*) tmp_idyn=' -i_dynamic';;
-		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	    esac
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	    ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-	    case `$CC -V` in
-	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
-	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
-	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-		$RANLIB $oldlib'
-	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    *) # Version 6 will use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-	  cxx*)
-	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-	    runpath_var=LD_RUN_PATH
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-	  xl*)
-	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	    fi
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	      _LT_TAGVAR(compiler_needs_object, $1)=yes
-
-	      # Not sure whether something based on
-	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-	      # would be better.
-	      output_verbose_link_cmd='echo'
-
-	      # Archives containing C++ object files must be created using
-	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	      # necessary to make sure instantiated templates are included
-	      # in the archive.
-	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	  *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	esac
-	;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-	  wlarc=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	fi
-	# Workaround some broken pre-1.5 toolchains
-	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-	;;
-
-      *nto* | *qnx*)
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-	;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      openbsd*)
-	if test -f /usr/libexec/ld.so; then
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	  fi
-	  output_verbose_link_cmd=echo
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Archives containing C++ object files must be created using
-	    # the KAI C++ compiler.
-	    case $host in
-	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
-	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
-	    esac
-	    ;;
-          RCC*)
-	    # Rational C++ 2.4.1
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          cxx*)
-	    case $host in
-	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-		;;
-	      *)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-		;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	      case $host in
-	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	      esac
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	      # Commands to make compiler produce verbose output that lists
-	      # what "hidden" libraries, object files and flags are used when
-	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-	    # Sun C++ 4.x
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          lcc*)
-	    # Lucid
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
-	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	    case $host_os in
-	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-	      *)
-		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
-	        # Supported since Solaris 2.6 (maybe 2.5.1?)
-		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	        ;;
-	    esac
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-
-	    output_verbose_link_cmd='echo'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	    ;;
-          gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-	    # The C++ compiler must be used to create the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-	      fi
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	      case $host_os in
-		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-		  ;;
-	      esac
-	    fi
-	    ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
-	# link with -lc, and that would cause any symbols used from libc to
-	# always be unresolved, which means just about no library would
-	# ever link correctly.  If we're not using GNU ld we use -z text
-	# though, which does catch some bad symbols but isn't as heavy-handed
-	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-	runpath_var='LD_RUN_PATH'
-
-	case $cc_basename in
-          CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    ;;
-	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    ;;
-	esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-	    # NonStop-UX NCC 3.20
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-    esac
-
-    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_TAGVAR(predep_objects,$1)=
-  _LT_TAGVAR(postdep_objects,$1)=
-  _LT_TAGVAR(postdeps,$1)=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
-    [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
-    [Dependencies to place before and after the objects being linked to
-    create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
-    [The library search path used internally by the compiler when linking
-    a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${F77-"f77"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-  GCC=$G77
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${FC-"f95"}
-  compiler=$CC
-  GCC=$ac_cv_fc_compiler_gnu
-
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
-  :
-  _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
-  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
-    [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-      AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
-    ;;
-  esac
-])
-
-# Helper functions for option handling.                    -*- Autoconf -*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
-        _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
-		      [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME.  If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-    [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
-  dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
-  dnl specified:
-  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
-  ])
-  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
-  ])
-  dnl
-  dnl If no reference was made to various pairs of opposing options, then
-  dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
-  dnl archives by default:
-  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
-  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-  		   [_LT_ENABLE_FAST_INSTALL])
-  ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
-    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
-    _LT_DECL([build_libtool_libs], [enable_shared], [0],
-	[Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
-    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
-    _LT_DECL([build_old_libs], [enable_static], [0],
-	[Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
-    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
-	 [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
-		 [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
-		 [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
-		 [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
-		 [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
-		 [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
-       [$#], [2], [[$2]],
-       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
-       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
-       [$#], 1, [],
-       [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
-	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
-       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
-	     [m4_foreach([_Lt_suffix],
-		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
-	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
-	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
-		 [lt_append([$1], [$2], [$3])$4],
-		 [$5])],
-	  [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
-	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
-    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
-	[$5],
-    [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
-  [lt_join(m4_quote(m4_default([$4], [[, ]])),
-           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
-		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers			-*- Autoconf -*-
-#
-#   Copyright (C) 2004 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3012 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
-#
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else.  This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-
 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -7990,10 +31,10 @@ m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.2], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -8009,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.2])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -8069,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -8089,6 +130,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -8102,14 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -8166,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -8183,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -8193,19 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -8269,59 +335,61 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 4
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[# Autoconf 2.62 quotes --file arguments for eval, but not when files
-# are listed without --file.  Let's play safe and only enable the eval
-# if we detect the quoting.
-case $CONFIG_FILES in
-*\'*) eval set x "$CONFIG_FILES" ;;
-*)   set x $CONFIG_FILES ;;
-esac
-shift
-for mf
-do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -8353,13 +421,13 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -8376,7 +444,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -8427,8 +495,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -8436,24 +504,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-	      		     [_AM_PROG_TAR([v7])])])
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -8476,7 +557,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -8487,7 +568,14 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -8513,13 +601,13 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -8528,7 +616,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -8538,24 +626,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -8565,14 +653,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -8589,7 +677,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -8660,14 +755,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -8676,16 +771,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -8738,18 +846,25 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -8846,3 +961,8 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([config/libtool.m4])
+m4_include([config/ltoptions.m4])
+m4_include([config/ltsugar.m4])
+m4_include([config/ltversion.m4])
+m4_include([config/lt~obsolete.m4])
diff --git a/config.h.in b/config.h.in
index a7e9b0e..11c9ae8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,9 +6,6 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the `ibcommon' library (-libcommon). */
-#undef HAVE_LIBIBCOMMON
-
 /* Define to 1 if you have the `ibumad' library (-libumad). */
 #undef HAVE_LIBIBUMAD
 
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
index 202f698..2fc3acc 100755
--- a/config/config.guess
+++ b/config/config.guess
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-timestamp='2008-09-28'
+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
@@ -18,15 +17,13 @@ timestamp='2008-09-28'
 #
 # 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.
+# 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.
@@ -56,8 +53,8 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+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."
@@ -69,11 +66,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit 0 ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit 0 ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit 0 ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -107,7 +104,7 @@ set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { 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 ; } ;
@@ -126,7 +123,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+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)
@@ -139,21 +136,11 @@ 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
 
-if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
-	eval $set_cc_for_build
-	cat << EOF > $dummy.c
-	#include <features.h>
-	#ifdef __UCLIBC__
-	# ifdef __UCLIBC_CONFIG_VERSION__
-	LIBC=uclibc __UCLIBC_CONFIG_VERSION__
-	# else
-	LIBC=uclibc
-	# endif
-	#else
-	LIBC=gnu
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+## 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.
@@ -178,7 +165,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
@@ -217,32 +203,50 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit ;;
+	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:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
+	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
+	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
@@ -280,49 +284,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    "EV7.9 (21364A)")
 		UNAME_MACHINE="alphaev79" ;;
 	esac
-	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	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 ;;
+	exit 0 ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit ;;
+	exit 0 ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit ;;
+	exit 0;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
+	exit 0 ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
+	exit 0 ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
+	exit 0;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
+	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
@@ -330,32 +327,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit ;;
+	exit 0 ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit ;;
+	exit 0 ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
+	exit 0 ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
+	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 ;;
+	exit 0 ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -364,10 +361,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
+	exit 0 ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
+	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
@@ -379,10 +376,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit ;;
+	exit 0 ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
+	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
@@ -393,40 +390,37 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+        exit 0 ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+        exit 0 ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+        exit 0 ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
+        exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit ;;
+	exit 0 ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -450,33 +444,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
+	$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 ;;
+	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit ;;
+	exit 0 ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit ;;
+	exit 0 ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit ;;
+	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit ;;
+	exit 0 ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit ;;
+	exit 0 ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit ;;
+	exit 0 ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit ;;
+	exit 0 ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -492,29 +485,29 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+ 	exit 0 ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit ;;
+	exit 0 ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit ;;
+	exit 0 ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit ;;
+	exit 0 ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit ;;
+	exit 0 ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
+	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 ;;               # Note that: echo "'`uname -s`'" gives '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 ;;
+	exit 0 ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -522,7 +515,7 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
+	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -537,19 +530,15 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
+		$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 ;;
-    *:AIX:*:[456])
+	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
@@ -562,28 +551,28 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
+	exit 0 ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit ;;
+	exit 0 ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit ;;
+	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 ;;                             # report: romp-ibm BSD 4.3
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit ;;
+	exit 0 ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit ;;
+	exit 0 ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit ;;
+	exit 0 ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit ;;
+	exit 0 ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -645,19 +634,9 @@ EOF
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
+	    # 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
@@ -665,11 +644,11 @@ EOF
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
+	exit 0 ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
+	exit 0 ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -697,192 +676,150 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 	echo unknown-hitachi-hiuxwe2
-	exit ;;
+	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit ;;
+	exit 0 ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit ;;
+	exit 0 ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit ;;
+	exit 0 ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit ;;
+	exit 0 ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit ;;
+	exit 0 ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit ;;
+	exit 0 ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit ;;
+	exit 0 ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+        exit 0 ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+        exit 0 ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+        exit 0 ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+        exit 0 ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+        exit 0 ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	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 ;;
+	exit 0 ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	exit 0 ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	exit 0 ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	exit 0 ;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	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 ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
+        exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
+	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 ;;
-    *:MINGW*:*)
+	exit 0 ;;
+    i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
+	exit 0 ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    EM64T | authenticamd | genuineintel)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
+	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 ;;
+	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 ;;
+	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
+	exit 0 ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit ;;
+	exit 0 ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
+	exit 0 ;;
     *:GNU:*:*)
-	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
+	exit 0 ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
+	exit 0 ;;
     arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	else
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-${LIBC}
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-${LIBC}
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-${LIBC}
-	exit ;;
+	echo cris-axis-linux-gnu
+	exit 0 ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+	echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     mips:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -899,12 +836,8 @@ EOF
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	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
@@ -922,22 +855,15 @@ EOF
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
 	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-${LIBC}
-	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
-	exit ;;
+	echo powerpc-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-${LIBC}
-	exit ;;
+	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 ;;
@@ -949,44 +875,35 @@ EOF
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
-	exit ;;
+	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-${LIBC} ;;
-	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit ;;
+	exit 0 ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${LIBC}
-	exit ;;
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
+	echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+	exit 0 ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
-	exit ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-${LIBC}
-	exit ;;
-    xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
+	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
@@ -1000,19 +917,20 @@ EOF
 				    p'`
         case "$ld_supported_targets" in
 	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 		;;
 	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
-		exit ;;
+		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-${LIBC}oldld"
-		exit ;;
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
 	esac
-	# This should get integrated into the C code below, but now we hack
-	if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
 	# Determine whether the default compiler is a.out or elf
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -1028,33 +946,23 @@ EOF
 	LIBC=gnulibc1
 	# endif
 	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	#ifdef __INTEL_COMPILER
 	LIBC=gnu
 	#else
 	LIBC=gnuaout
 	#endif
 	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	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 ;;
+	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...
@@ -1062,27 +970,24 @@ EOF
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
+	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 ;;
+	exit 0 ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
+	exit 0 ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
+	exit 0 ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
+	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
@@ -1090,16 +995,15 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	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 ;;
+	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`
@@ -1117,73 +1021,73 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit ;;
+	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 ;;
+        exit 0 ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit ;;
+	exit 0 ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit ;;
+	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 ;;
+	exit 0 ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit ;;
+	exit 0 ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit ;;
+	exit 0 ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	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; }
+	  && 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; } ;;
+	  && 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; } ;;
+          && echo i486-ncr-sysv4 && exit 0 ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit ;;
+	exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit ;;
+	exit 0 ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit ;;
+	exit 0 ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1191,84 +1095,68 @@ EOF
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit ;;
+	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 ;;
+        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 ;;
+	exit 0 ;;
     *:*:*:FTX*)
 	# From seanf at swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
+	exit 0 ;;
     *:VOS:*:*)
 	# From Paul.Green at stratus.com.
 	echo hppa1.1-stratus-vos
-	exit ;;
+	exit 0 ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit ;;
+	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 ;;
+        exit 0 ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit ;;
+	exit 0 ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit ;;
+	exit 0 ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit ;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
+	exit 0 ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1276,25 +1164,22 @@ EOF
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
+	exit 0 ;;
+    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit ;;
+	exit 0 ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit ;;
+	exit 0 ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
+	exit 0 ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1305,47 +1190,28 @@ EOF
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
+	exit 0 ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit ;;
+	exit 0 ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit ;;
+	exit 0 ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit ;;
+	exit 0 ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit ;;
+	exit 0 ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit ;;
+	exit 0 ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit ;;
+	exit 0 ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1377,7 +1243,7 @@ main ()
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
+  printf ("arm-acorn-riscix"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1466,12 +1332,11 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
+$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; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1480,22 +1345,22 @@ then
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit ;;
+	exit 0 ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit ;;
+	exit 0 ;;
     c34*)
 	echo c34-convex-bsd
-	exit ;;
+	exit 0 ;;
     c38*)
 	echo c38-convex-bsd
-	exit ;;
+	exit 0 ;;
     c4*)
 	echo c4-convex-bsd
-	exit ;;
+	exit 0 ;;
     esac
 fi
 
@@ -1506,9 +1371,7 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+    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
diff --git a/config/config.sub b/config/config.sub
index 66f218c..6b2ff9f 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-timestamp='2008-09-08'
+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
@@ -22,15 +21,14 @@ timestamp='2008-09-08'
 #
 # 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.
-#
+# 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.
 #
@@ -72,8 +70,8 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+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."
@@ -85,11 +83,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit 0 ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit 0 ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit 0 ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -101,7 +99,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit ;;
+       exit 0;;
 
     * )
        break ;;
@@ -120,9 +118,7 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -148,7 +144,7 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
+	-apple | -axis)
 		os=
 		basic_machine=$1
 		;;
@@ -173,10 +169,6 @@ case $os in
 	-hiux*)
 		os=-hiuxwe2
 		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -193,10 +185,6 @@ case $os in
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -240,55 +228,45 @@ case $basic_machine in
 	| a29k \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx | dvp \
-	| fido | fr30 | frv \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
 	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
-	| mt \
 	| msp430 \
-	| nios | nios2 \
 	| ns16k | ns32k \
-	| or32 \
+	| openrisc | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| s390 | s390x \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k | z80)
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -298,9 +276,6 @@ case $basic_machine in
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -320,66 +295,55 @@ case $basic_machine in
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
+	| avr-* \
+	| bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
+	| clipper-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32c-* | m32r-* | m32rle-* \
+	| ip2k-* \
+	| m32r-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| m88110-* | m88k-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
 	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
 	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa*-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
 	| ymp-* \
-	| z8k-* | z80-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
+	| z8k-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -397,9 +361,6 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -417,9 +378,6 @@ case $basic_machine in
 	amd64)
 		basic_machine=x86_64-pc
 		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -451,22 +409,10 @@ case $basic_machine in
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
-		basic_machine=arm-unknown
-		os=-cegcc
-		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -491,27 +437,12 @@ case $basic_machine in
 		basic_machine=j90-cray
 		os=-unicos
 		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -534,14 +465,6 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -692,14 +615,6 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -715,10 +630,6 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -726,30 +637,16 @@ case $basic_machine in
 		basic_machine=m68k-atari
 		os=-mint
 		;;
-	mipsEE* | ee | ps2)
-		basic_machine=mips64r5900el-scei
-		case $os in
-		    -linux*)
-			;;
-		    *)
-			os=-elf
-			;;
-		esac
-		;;
-	iop)
-		basic_machine=mipsel-scei
-		os=-irx
-		;;
-	dvp)
-		basic_machine=dvp-scei
-		os=-elf
-		;;
 	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
@@ -762,9 +659,6 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-msdos
 		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
@@ -833,6 +727,10 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -840,12 +738,9 @@ case $basic_machine in
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	openrisc | openrisc-*)
+	or32 | or32-*)
 		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
+		os=-coff
 		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
@@ -863,14 +758,6 @@ case $basic_machine in
 		basic_machine=i860-intel
 		os=-osf
 		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -880,12 +767,6 @@ case $basic_machine in
 	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
@@ -942,10 +823,6 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -956,12 +833,6 @@ case $basic_machine in
 	rtpc | rtpc-*)
 		basic_machine=romp-ibm
 		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
 	sa29200)
 		basic_machine=a29k-amd
 		os=-udi
@@ -972,10 +843,6 @@ case $basic_machine in
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
 	sei)
 		basic_machine=mips-sei
 		os=-seiux
@@ -987,9 +854,6 @@ case $basic_machine in
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
 	sh64)
 		basic_machine=sh64-unknown
 		;;
@@ -1079,10 +943,6 @@ case $basic_machine in
 		basic_machine=tic6x-unknown
 		os=-coff
 		;;
-	tile*)
-		basic_machine=tile-unknown
-		os=-linux-gnu
-		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
@@ -1096,10 +956,6 @@ case $basic_machine in
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -1143,10 +999,6 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1158,10 +1010,6 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
-		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1181,9 +1029,6 @@ case $basic_machine in
 	romp)
 		basic_machine=romp-ibm
 		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1200,10 +1045,13 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1276,23 +1124,19 @@ case $os in
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -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* | -cegcc* \
+	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -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* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1310,15 +1154,12 @@ case $os in
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -1331,9 +1172,6 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
-		os=-os400
-		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1355,9 +1193,6 @@ case $os in
 	-atheos*)
 		os=-atheos
 		;;
-	-syllable*)
-		os=-syllable
-		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1380,9 +1215,6 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
-		os=-tpf
-		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1419,12 +1251,6 @@ case $os in
 	-kaos*)
 		os=-kaos
 		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
 	-none)
 		;;
 	*)
@@ -1447,12 +1273,6 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
-		os=-elf
-		;;
-        spu-*)
-		os=-elf
-		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1462,8 +1282,8 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1490,9 +1310,6 @@ case $basic_machine in
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
-		os=-elf
-		;;
 	mips*-cisco)
 		os=-elf
 		;;
@@ -1511,15 +1328,9 @@ case $basic_machine in
 	*-be)
 		os=-beos
 		;;
-	*-haiku)
-		os=-haiku
-		;;
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
-		os=-mmixware
-		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1652,15 +1463,9 @@ case $basic_machine in
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
-			-os400*)
-				vendor=ibm
-				;;
 			-ptx*)
 				vendor=sequent
 				;;
-			-tpf*)
-				vendor=ibm
-				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
@@ -1685,7 +1490,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit
+exit 0
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/config/depcomp b/config/depcomp
index e5f9736..04701da 100755
--- a/config/depcomp
+++ b/config/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2007-03-29.01
+scriptversion=2005-07-09.11
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# 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
@@ -92,20 +91,7 @@ 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.
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
-## the command line argument order; so add the flags where they
-## appear in depend2.am.  Note that the slowdown incurred here
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
-  for arg
-  do
-    case $arg in
-    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
-    *)  set fnord "$@" "$arg" ;;
-    esac
-    shift # fnord
-    shift # $arg
-  done
-  "$@"
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -215,39 +201,34 @@ aix)
   # 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.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
   if test "$libtool" = yes; then
-    tmpdepfile1=$dir$base.u
-    tmpdepfile2=$base.u
-    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
-    tmpdepfile1=$dir$base.u
-    tmpdepfile2=$dir$base.u
-    tmpdepfile3=$dir$base.u
     "$@" -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 "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    rm -f "$tmpdepfile"
     exit $stat
   fi
 
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
-  do
-    test -f "$tmpdepfile" && break
-  done
   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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    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
@@ -295,46 +276,6 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
-hp2)
-  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
-  # compilers, which have integrated preprocessors.  The correct option
-  # to use with these is +Maked; it writes dependencies to a file named
-  # 'foo.d', which lands next to the object file, wherever that
-  # happens to be.
-  # Much of this is similar to the tru64 case; see comments there.
-  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
-    tmpdepfile1=$dir$base.d
-    tmpdepfile2=$dir.libs/$base.d
-    "$@" -Wc,+Maked
-  else
-    tmpdepfile1=$dir$base.d
-    tmpdepfile2=$dir$base.d
-    "$@" +Maked
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-     rm -f "$tmpdepfile1" "$tmpdepfile2"
-     exit $stat
-  fi
-
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
-  do
-    test -f "$tmpdepfile" && break
-  done
-  if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
-  else
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile" "$tmpdepfile2"
-  ;;
-
 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'.
@@ -347,13 +288,13 @@ tru64)
 
    if test "$libtool" = yes; then
       # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
+      # 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 $dir.libs/$base.o.d and
+      # 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
diff --git a/config/install-sh b/config/install-sh
index a5897de..4d4a951 100755
--- a/config/install-sh
+++ b/config/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-12-25.00
+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
@@ -39,68 +39,38 @@ scriptversion=2006-12-25.00
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" ""	$nl"
+# 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-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
+doit="${DOITPROG-}"
 
-posix_mkdir=
+# put in absolute paths if you don't have them in your path; or use env. vars.
 
-# Desired mode of installed file.
-mode=0755
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
 
-chgrpcmd=
-chmodcmd=$chmodprog
+chmodcmd="$chmodprog 0755"
 chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
+chgrpcmd=
 stripcmd=
-
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
 src=
 dst=
 dir_arg=
-dst_arg=
-
-copy_on_change=false
+dstarg=
 no_target_directory=
 
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -110,86 +80,81 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
-     --help     display this help and exit.
-     --version  display version info and exit.
-
-  -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
-  -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.
+-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 CMPPROG CPPROG MKDIRPROG MVPROG
-  RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
 "
 
-while test $# -ne 0; do
+while test -n "$1"; do
   case $1 in
-    -c) ;;
-
-    -C) copy_on_change=true;;
+    -c) shift
+        continue;;
 
-    -d) dir_arg=true;;
+    -d) dir_arg=true
+        shift
+        continue;;
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift
+        shift
+        continue;;
 
     --help) echo "$usage"; exit $?;;
 
-    -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift
+        shift
+        continue;;
 
-    -s) stripcmd=$stripprog;;
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
 
-    -t) dst_arg=$2
-	shift;;
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
 
-    -T) no_target_directory=true;;
+    -T) no_target_directory=true
+	shift
+	continue;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
+    *)  # 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;;
-
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
-
-    *)  break;;
   esac
-  shift
 done
 
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
-  # When -d is used, all remaining arguments are directories to create.
-  # When -t is used, the destination is already specified.
-  # Otherwise, the last argument is the destination.  Remove it from $@.
-  for arg
-  do
-    if test -n "$dst_arg"; then
-      # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dst_arg"
-      shift # fnord
-    fi
-    shift # arg
-    dst_arg=$arg
-  done
-fi
-
-if test $# -eq 0; then
+if test -z "$1"; then
   if test -z "$dir_arg"; then
     echo "$0: no input file specified." >&2
     exit 1
@@ -199,47 +164,24 @@ if test $# -eq 0; then
   exit 0
 fi
 
-if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
-
-  # Set umask so as not to create temps with too-generous modes.
-  # However, 'strip' requires both read and write access to temps.
-  case $mode in
-    # Optimize common cases.
-    *644) cp_umask=133;;
-    *755) cp_umask=22;;
-
-    *[0-7])
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw='% 200'
-      fi
-      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
-    *)
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw=,u+rw
-      fi
-      cp_umask=$mode$u_plus_rw;;
-  esac
-fi
-
 for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src;;
+    -*) src=./$src ;;
   esac
 
   if test -n "$dir_arg"; then
     dst=$src
-    dstdir=$dst
-    test -d "$dstdir"
-    dstdir_status=$?
-  else
+    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 '*'.
@@ -248,199 +190,71 @@ do
       exit 1
     fi
 
-    if test -z "$dst_arg"; then
+    if test -z "$dstarg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dst_arg
+    dst=$dstarg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst;;
+      -*) 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: $dst_arg: Is a directory" >&2
+	echo "$0: $dstarg: Is a directory" >&2
 	exit 1
       fi
-      dstdir=$dst
-      dst=$dstdir/`basename "$src"`
-      dstdir_status=0
-    else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
-      test -d "$dstdir"
-      dstdir_status=$?
+      dst=$dst/`basename "$src"`
     fi
   fi
 
-  obsolete_mkdir_used=false
-
-  if test $dstdir_status != 0; then
-    case $posix_mkdir in
-      '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
-    esac
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
 
-    if
-      $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
-      )
-    then :
-    else
+  # Make sure that the destination directory exists.
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
-      # or it failed possibly due to a race condition.  Create the
-      # directory the slow way, step by step, checking for races as we go.
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
 
-      case $dstdir in
-	/*) prefix='/';;
-	-*) prefix='./';;
-	*)  prefix='';;
-      esac
+    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
 
-      eval "$initialize_posix_glob"
+    pathcomp=
 
-      oIFS=$IFS
-      IFS=/
-      $posix_glob set -f
-      set fnord $dstdir
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
       shift
-      $posix_glob set +f
-      IFS=$oIFS
-
-      prefixes=
-
-      for d
-      do
-	test -z "$d" && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
-      done
-
-      if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+      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
-    fi
+      pathcomp=$pathcomp/
+    done
   fi
 
   if test -n "$dir_arg"; then
-    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
-    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
-      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+    $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.$$_
@@ -448,9 +262,10 @@ do
 
     # 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.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    $doit $cpprog "$src" "$dsttmp" &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -458,59 +273,48 @@ do
     # 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 $mode "$dsttmp"; } &&
-
-    # If -C, don't bother to copy if it wouldn't change the file.
-    if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
-       set X $old && old=:$2:$4:$5:$6 &&
-       set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
-       test "$old" = "$new" &&
-       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
-    then
-      rm -f "$dsttmp"
-    else
-      # Rename the file to the real destination.
-      $doit $mvcmd -f "$dsttmp" "$dst" 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.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
-      }
-    fi || exit 1
-
-    trap '' 0
-  fi
+    { 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="
diff --git a/aclocal.m4 b/config/libtool.m4
similarity index 82%
copy from aclocal.m4
copy to config/libtool.m4
index 8e383e6..671cde1 100644
--- a/aclocal.m4
+++ b/config/libtool.m4
@@ -1,24 +1,3 @@
-# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
-You have another version of autoconf.  It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -284,6 +263,9 @@ ltmain="$ac_aux_dir/ltmain.sh"
 ])# _LT_PROG_LTMAIN
 
 
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
@@ -337,6 +319,9 @@ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
 
 
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
 
 
 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
@@ -2316,14 +2301,7 @@ freebsd* | dragonfly*)
     *) objformat=elf ;;
     esac
   fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-    gentoo)
-      version_type=linux ;;
-    *)
-      version_type=freebsd-$objformat ;;
-  esac
-
+  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}'
@@ -2334,12 +2312,6 @@ freebsd* | dragonfly*)
       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
-    linux)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-      soname_spec='${libname}${release}${shared_ext}$major'
-      need_lib_prefix=no
-      need_version=no
-      ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
@@ -2498,10 +2470,13 @@ linux* | k*bsd*-gnu)
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -5285,6 +5260,10 @@ compiler_DEFAULT=$CC
 _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
 if test -n "$compiler"; then
   _LT_COMPILER_NO_RTTI($1)
   _LT_COMPILER_PIC($1)
@@ -6914,6 +6893,10 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
 if test -n "$compiler"; then
   _LT_COMPILER_NO_RTTI($1)
   _LT_COMPILER_PIC($1)
@@ -7052,10 +7035,12 @@ _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
 ])# _LT_DECL_SED
 
 m4_ifndef([AC_PROG_SED], [
+############################################################
 # NOTE: This macro has been submitted for inclusion into   #
 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 #  a released version of Autoconf we should remove this    #
 #  macro and use it instead.                               #
+############################################################
 
 m4_defun([AC_PROG_SED],
 [AC_MSG_CHECKING([for a sed that does not truncate output])
@@ -7373,1476 +7358,3 @@ _LT_EOF
     ;;
   esac
 ])
-
-# Helper functions for option handling.                    -*- Autoconf -*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
-        _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
-		      [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME.  If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-    [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
-  dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
-  dnl specified:
-  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
-  ])
-  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
-  ])
-  dnl
-  dnl If no reference was made to various pairs of opposing options, then
-  dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
-  dnl archives by default:
-  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
-  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-  		   [_LT_ENABLE_FAST_INSTALL])
-  ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
-    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
-    _LT_DECL([build_libtool_libs], [enable_shared], [0],
-	[Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
-    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
-    _LT_DECL([build_old_libs], [enable_static], [0],
-	[Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
-    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
-	 [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
-		 [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
-		 [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
-		 [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
-		 [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
-		 [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
-       [$#], [2], [[$2]],
-       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
-       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
-       [$#], 1, [],
-       [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
-	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
-       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
-	     [m4_foreach([_Lt_suffix],
-		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
-	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
-	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
-		 [lt_append([$1], [$2], [$3])$4],
-		 [$5])],
-	  [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
-	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
-    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
-	[$5],
-    [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
-  [lt_join(m4_quote(m4_default([$4], [[, ]])),
-           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
-		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers			-*- Autoconf -*-
-#
-#   Copyright (C) 2004 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3012 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
-#
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else.  This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.2], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.2])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 4
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[# Autoconf 2.62 quotes --file arguments for eval, but not when files
-# are listed without --file.  Let's play safe and only enable the eval
-# if we detect the quoting.
-case $CONFIG_FILES in
-*\'*) eval set x "$CONFIG_FILES" ;;
-*)   set x $CONFIG_FILES ;;
-esac
-shift
-for mf
-do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 13
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-	      		     [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.	            -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/config/ltmain.sh b/config/ltmain.sh
index 0634c4b..a72f2fd 100755
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -1,6 +1,6 @@
 # Generated from ltmain.m4sh.
 
-# ltmain.sh (GNU libtool) 2.2.6
+# ltmain.sh (GNU libtool) 2.2.6b
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
@@ -65,7 +65,7 @@
 #       compiler:		$LTCC
 #       compiler flags:		$LTCFLAGS
 #       linker:		$LD (gnu? $with_gnu_ld)
-#       $progname:		(GNU libtool) 2.2.6
+#       $progname:		(GNU libtool) 2.2.6b
 #       automake:		$automake_version
 #       autoconf:		$autoconf_version
 #
@@ -73,9 +73,9 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=2.2.6
+VERSION=2.2.6b
 TIMESTAMP=""
-package_revision=1.3012
+package_revision=1.3017
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -116,15 +116,15 @@ $lt_unset CDPATH
 
 : ${CP="cp -f"}
 : ${ECHO="echo"}
-: ${EGREP="/usr/bin/grep -E"}
-: ${FGREP="/usr/bin/grep -F"}
-: ${GREP="/usr/bin/grep"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
 : ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/opt/local/bin/gsed"}
+: ${SED="/bin/sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -570,13 +570,6 @@ else
   # Restart under the correct shell, and then maybe $ECHO will work.
   exec $SHELL "$progpath" --no-reexec ${1+"$@"}
 fi
-# Same for EGREP, and just to be sure, do LTCC as well
-if test "x$EGREP" = x ; then
-    EGREP=egrep
-fi
-if test "x$LTCC" = x ; then
-    LTCC=${CC-gcc}
-fi
 
 if test "X$1" = X--fallback-echo; then
   # used as fallback echo
@@ -8066,53 +8059,9 @@ EOF
 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
-		if test "x$EGREP" = x ; then
-			EGREP=egrep
-		fi
-		# We do not want portage's install root ($D) present.  Check only for
-		# this if the .la is being installed.
-		if test "$installed" = yes && test "$D"; then
-		  eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
-		else
-		  mynewdependency_lib="$libdir/$name"
-		fi
-		# Do not add duplicates
-		if test "$mynewdependency_lib"; then
-		  my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
-		  if test -z "$my_little_ninja_foo_1"; then
-		    newdependency_libs="$newdependency_libs $mynewdependency_lib"
-		  fi
-		fi
-		;;
-		  *)
-		if test "$installed" = yes; then
-		  # Rather use S=WORKDIR if our version of portage supports it.
-		  # This is because some ebuild (gcc) do not use $S as buildroot.
-		  if test "$PWORKDIR"; then
-		    S="$PWORKDIR"
-		  fi
-		  # We do not want portage's build root ($S) present.
-		  my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
-		  # We do not want portage's install root ($D) present.
-		  my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
-		  if test -n "$my_little_ninja_foo_2" && test "$S"; then
-		    mynewdependency_lib=""
-		  elif test -n "$my_little_ninja_foo_3" && test "$D"; then
-		    eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
-		  else
-		    mynewdependency_lib="$deplib"
-		  fi
-		else
-		  mynewdependency_lib="$deplib"
-		fi
-		# Do not add duplicates
-		if test "$mynewdependency_lib"; then
-		  my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
-		  if test -z "$my_little_ninja_foo_4"; then
-			newdependency_libs="$newdependency_libs $mynewdependency_lib"
-		  fi
-		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
 		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
 	      esac
 	    done
 	    dependency_libs="$newdependency_libs"
@@ -8176,10 +8125,6 @@ EOF
 	  case $host,$output,$installed,$module,$dlname in
 	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
 	  esac
-	  # Do not add duplicates
-	  if test "$installed" = yes && test "$D"; then
-	    install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
-	  fi
 	  $ECHO > $output "\
 # $outputname - a libtool library file
 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
diff --git a/config/ltoptions.m4 b/config/ltoptions.m4
new file mode 100644
index 0000000..34151a3
--- /dev/null
+++ b/config/ltoptions.m4
@@ -0,0 +1,368 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/config/ltsugar.m4 b/config/ltsugar.m4
new file mode 100644
index 0000000..9000a05
--- /dev/null
+++ b/config/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/config/ltversion.m4 b/config/ltversion.m4
new file mode 100644
index 0000000..f3c5309
--- /dev/null
+++ b/config/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/config/lt~obsolete.m4 b/config/lt~obsolete.m4
new file mode 100644
index 0000000..637bb20
--- /dev/null
+++ b/config/lt~obsolete.m4
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/config/missing b/config/missing
index 1c8ff70..894e786 100755
--- a/config/missing
+++ b/config/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2005-06-08.21
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+# 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.
 
@@ -33,8 +33,6 @@ if test $# -eq 0; then
 fi
 
 run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -46,7 +44,7 @@ fi
 
 msg="missing on your system"
 
-case $1 in
+case "$1" in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
@@ -79,7 +77,6 @@ Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
   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
@@ -109,7 +106,7 @@ 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
+case "$1" in
   lex|yacc)
     # Not GNU programs, they don't have --version.
     ;;
@@ -138,7 +135,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case "$1" in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -167,7 +164,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case $f in
+      case "$f" in
       *:*) touch_files="$touch_files "`echo "$f" |
 				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -195,8 +192,8 @@ WARNING: \`$1' is needed, but is $msg.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    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
@@ -217,25 +214,25 @@ WARNING: \`$1' $msg.  You should only need it if
          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 test $# -ne 1; then
+    if [ $# -ne 1 ]; then
         eval LASTARG="\${$#}"
-	case $LASTARG in
+	case "$LASTARG" in
 	*.y)
 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
+	    if [ -f "$SRCFILE" ]; then
 	         cp "$SRCFILE" y.tab.c
 	    fi
 	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
+	    if [ -f "$SRCFILE" ]; then
 	         cp "$SRCFILE" y.tab.h
 	    fi
 	  ;;
 	esac
     fi
-    if test ! -f y.tab.h; then
+    if [ ! -f y.tab.h ]; then
 	echo >y.tab.h
     fi
-    if test ! -f y.tab.c; then
+    if [ ! -f y.tab.c ]; then
 	echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
@@ -247,18 +244,18 @@ WARNING: \`$1' is $msg.  You should only need it if
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if test $# -ne 1; then
+    if [ $# -ne 1 ]; then
         eval LASTARG="\${$#}"
-	case $LASTARG in
+	case "$LASTARG" in
 	*.l)
 	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
+	    if [ -f "$SRCFILE" ]; then
 	         cp "$SRCFILE" lex.yy.c
 	    fi
 	  ;;
 	esac
     fi
-    if test ! -f lex.yy.c; then
+    if [ ! -f lex.yy.c ]; then
 	echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
@@ -270,9 +267,11 @@ WARNING: \`$1' is $msg.  You should only need it if
 	 \`Help2man' package in order for those modifications to take
 	 effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
+    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
@@ -290,17 +289,11 @@ WARNING: \`$1' is $msg.  You should only need it if
          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 "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    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`
+      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
@@ -324,13 +317,13 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     firstarg="$1"
     if shift; then
-	case $firstarg in
+	case "$firstarg" in
 	*o*)
 	    firstarg=`echo "$firstarg" | sed s/o//`
 	    tar "$firstarg" "$@" && exit 0
 	    ;;
 	esac
-	case $firstarg in
+	case "$firstarg" in
 	*h*)
 	    firstarg=`echo "$firstarg" | sed s/h//`
 	    tar "$firstarg" "$@" && exit 0
diff --git a/configure b/configure
index e4a27d6..f7f8651 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for libibmad 1.2.3_20090314.
+# Generated by GNU Autoconf 2.63 for libibmad 1.3.9.
 #
-# Report bugs to <general at lists.openfabrics.org>.
+# Report bugs to <linux-rdma at vger.kernel.org>.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -745,9 +745,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='libibmad'
 PACKAGE_TARNAME='libibmad'
-PACKAGE_VERSION='1.2.3_20090314'
-PACKAGE_STRING='libibmad 1.2.3_20090314'
-PACKAGE_BUGREPORT='general at lists.openfabrics.org'
+PACKAGE_VERSION='1.3.9'
+PACKAGE_STRING='libibmad 1.3.9'
+PACKAGE_BUGREPORT='linux-rdma at vger.kernel.org'
 
 ac_unique_file="src/sa.c"
 # Factoring default headers for most tests.
@@ -786,7 +786,9 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
 HAVE_LD_VERSION_SCRIPT_FALSE
 HAVE_LD_VERSION_SCRIPT_TRUE
@@ -1470,7 +1472,7 @@ 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 libibmad 1.2.3_20090314 to adapt to many kinds of systems.
+\`configure' configures libibmad 1.3.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1540,7 +1542,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libibmad 1.2.3_20090314:";;
+     short | recursive ) echo "Configuration of libibmad 1.3.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1577,7 +1579,7 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <general at lists.openfabrics.org>.
+Report bugs to <linux-rdma at vger.kernel.org>.
 _ACEOF
 ac_status=$?
 fi
@@ -1640,7 +1642,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libibmad configure 1.2.3_20090314
+libibmad configure 1.3.9
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1654,7 +1656,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libibmad $as_me 1.2.3_20090314, which was
+It was created by libibmad $as_me 1.3.9, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2054,9 +2056,10 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
+
 ac_config_headers="$ac_config_headers config.h"
 
-am__api_version='1.10'
+am__api_version='1.11'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2156,16 +2159,33 @@ $as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -2209,7 +2229,14 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -2219,6 +2246,115 @@ else
 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
@@ -2373,7 +2509,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libibmad'
- VERSION='1.2.3_20090314'
+ VERSION='1.3.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2401,108 +2537,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.
@@ -2544,8 +2578,8 @@ esac
 
 
 
-macro_version='2.2.6'
-macro_revision='1.3012'
+macro_version='2.2.6b'
+macro_revision='1.3017'
 
 
 
@@ -2652,7 +2686,7 @@ ac_config_commands="$ac_config_commands depfiles"
 am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -2663,24 +2697,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
 
@@ -3669,6 +3703,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3686,7 +3725,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3696,19 +3745,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -4341,13 +4394,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4344: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4397: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4347: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4400: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4350: output\"" >&5)
+  (eval echo "\"\$as_me:4403: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5553,7 +5606,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5556 "configure"' > conftest.$ac_ext
+  echo '#line 5609 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7381,6 +7434,10 @@ _lt_linker_boilerplate=`cat conftest.err`
 $RM -r conftest*
 
 
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
 if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
@@ -7406,11 +7463,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7409: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7466: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7413: \$? = $ac_status" >&5
+   echo "$as_me:7470: \$? = $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.
@@ -7745,11 +7802,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7748: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7805: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7752: \$? = $ac_status" >&5
+   echo "$as_me:7809: \$? = $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.
@@ -7850,11 +7907,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7853: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7910: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7857: \$? = $ac_status" >&5
+   echo "$as_me:7914: \$? = $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
@@ -7905,11 +7962,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7908: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7965: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7912: \$? = $ac_status" >&5
+   echo "$as_me:7969: \$? = $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
@@ -9541,14 +9598,7 @@ freebsd* | dragonfly*)
     *) objformat=elf ;;
     esac
   fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-    gentoo)
-      version_type=linux ;;
-    *)
-      version_type=freebsd-$objformat ;;
-  esac
-
+  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}'
@@ -9559,12 +9609,6 @@ freebsd* | dragonfly*)
       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
-    linux)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-      soname_spec='${libname}${release}${shared_ext}$major'
-      need_lib_prefix=no
-      need_version=no
-      ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
@@ -9770,10 +9814,13 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -10718,7 +10765,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10721 "configure"
+#line 10768 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10814,7 +10861,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10817 "configure"
+#line 10864 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11755,6 +11802,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -11772,7 +11824,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -11782,19 +11844,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -11837,85 +11903,6 @@ fi
 if test "$disable_libcheck" != "yes"
 then
 
-{ $as_echo "$as_me:$LINENO: checking for sys_read_string in -libcommon" >&5
-$as_echo_n "checking for sys_read_string in -libcommon... " >&6; }
-if test "${ac_cv_lib_ibcommon_sys_read_string+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-libcommon  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sys_read_string ();
-int
-main ()
-{
-return sys_read_string ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_ibcommon_sys_read_string=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_ibcommon_sys_read_string=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ibcommon_sys_read_string" >&5
-$as_echo "$ac_cv_lib_ibcommon_sys_read_string" >&6; }
-if test "x$ac_cv_lib_ibcommon_sys_read_string" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBIBCOMMON 1
-_ACEOF
-
-  LIBS="-libcommon $LIBS"
-
-else
-  { { $as_echo "$as_me:$LINENO: error: sys_read_string() not found. libibmad requires libibcommon." >&5
-$as_echo "$as_me: error: sys_read_string() not found. libibmad requires libibcommon." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
 { $as_echo "$as_me:$LINENO: checking for umad_init in -libumad" >&5
 $as_echo_n "checking for umad_init in -libumad... " >&6; }
 if test "${ac_cv_lib_ibumad_umad_init+set}" = set; then
@@ -12298,9 +12285,9 @@ $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result
     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
-## -------------------------------------------- ##
-## Report this to general at lists.openfabrics.org ##
-## -------------------------------------------- ##
+## ----------------------------------------- ##
+## Report this to linux-rdma at vger.kernel.org ##
+## ----------------------------------------- ##
 _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
@@ -12331,148 +12318,6 @@ done
 
 if test "$disable_libcheck" != "yes"
 then
-if test "${ac_cv_header_infiniband_common_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for infiniband/common.h" >&5
-$as_echo_n "checking for infiniband/common.h... " >&6; }
-if test "${ac_cv_header_infiniband_common_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_common_h" >&5
-$as_echo "$ac_cv_header_infiniband_common_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking infiniband/common.h usability" >&5
-$as_echo_n "checking infiniband/common.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <infiniband/common.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking infiniband/common.h presence" >&5
-$as_echo_n "checking infiniband/common.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <infiniband/common.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: infiniband/common.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: infiniband/common.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## -------------------------------------------- ##
-## Report this to general at lists.openfabrics.org ##
-## -------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for infiniband/common.h" >&5
-$as_echo_n "checking for infiniband/common.h... " >&6; }
-if test "${ac_cv_header_infiniband_common_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_infiniband_common_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_common_h" >&5
-$as_echo "$ac_cv_header_infiniband_common_h" >&6; }
-
-fi
-if test "x$ac_cv_header_infiniband_common_h" = x""yes; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: <infiniband/common.h> not found. libibmad requires libibcommon." >&5
-$as_echo "$as_me: error: <infiniband/common.h> not found. libibmad requires libibcommon." >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-
 if test "${ac_cv_header_infiniband_umad_h+set}" = set; then
   { $as_echo "$as_me:$LINENO: checking for infiniband/umad.h" >&5
 $as_echo_n "checking for infiniband/umad.h... " >&6; }
@@ -12587,9 +12432,9 @@ $as_echo "$as_me: WARNING: infiniband/umad.h: proceeding with the preprocessor's
     { $as_echo "$as_me:$LINENO: WARNING: infiniband/umad.h: in the future, the compiler will take precedence" >&5
 $as_echo "$as_me: WARNING: infiniband/umad.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
-## -------------------------------------------- ##
-## Report this to general at lists.openfabrics.org ##
-## -------------------------------------------- ##
+## ----------------------------------------- ##
+## Report this to linux-rdma at vger.kernel.org ##
+## ----------------------------------------- ##
 _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
@@ -13021,6 +12866,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -13371,7 +13224,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libibmad $as_me 1.2.3_20090314, which was
+This file was extended by libibmad $as_me 1.3.9, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13434,7 +13287,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-libibmad config.status 1.2.3_20090314
+libibmad config.status 1.3.9
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -14471,27 +14324,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files
-# are listed without --file.  Let's play safe and only enable the eval
-# if we detect the quoting.
-case $CONFIG_FILES in
-*\'*) eval set x "$CONFIG_FILES" ;;
-*)   set x $CONFIG_FILES ;;
-esac
-shift
-for mf
-do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$mf" : 'X\(//\)[^/]' \| \
 	 X"$mf" : 'X\(//\)$' \| \
@@ -14514,28 +14368,28 @@ $as_echo X"$mf" |
 	    q
 	  }
 	  s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$file" : 'X\(//\)[^/]' \| \
 	 X"$file" : 'X\(//\)$' \| \
@@ -14558,7 +14412,7 @@ $as_echo X"$file" |
 	    q
 	  }
 	  s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
+      { as_dir=$dirpart/$fdir
   case $as_dir in #(
   -*) as_dir=./$as_dir;;
   esac
@@ -14599,10 +14453,11 @@ $as_echo X"$as_dir" |
   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
  ;;
     "libtool":C)
 
diff --git a/configure.in b/configure.in
index 4f34084..81d8d90 100644
--- a/configure.in
+++ b/configure.in
@@ -1,9 +1,10 @@
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT(libibmad, 1.2.3_20090314, general at lists.openfabrics.org)
+AC_INIT(libibmad, 1.3.9, linux-rdma at vger.kernel.org)
 AC_CONFIG_SRCDIR([src/sa.c])
 AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR(config)
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE
 
@@ -31,8 +32,6 @@ AC_PROG_CC
 dnl Checks for libraries
 if test "$disable_libcheck" != "yes"
 then
-AC_CHECK_LIB(ibcommon, sys_read_string, [],
-	AC_MSG_ERROR([sys_read_string() not found. libibmad requires libibcommon.]))
 AC_CHECK_LIB(ibumad, umad_init, [],
 	AC_MSG_ERROR([umad_init() not found. libibmad requires libibumad.]))
 fi
@@ -42,9 +41,6 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h sys/time.h unistd.h])
 if test "$disable_libcheck" != "yes"
 then
-AC_CHECK_HEADER(infiniband/common.h, [],
-	AC_MSG_ERROR([<infiniband/common.h> not found. libibmad requires libibcommon.])
-)
 AC_CHECK_HEADER(infiniband/umad.h, [],
 	AC_MSG_ERROR([<infiniband/umad.h> not found. libibmad requires libibumad.])
 )
diff --git a/include/infiniband/mad.h b/include/infiniband/mad.h
index c2ad148..278b9bc 100644
--- a/include/infiniband/mad.h
+++ b/include/infiniband/mad.h
@@ -1,5 +1,7 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
+ * Copyright (c) 2009-2011 Mellanox Technologies LTD.  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
@@ -33,80 +35,83 @@
 #ifndef _MAD_H_
 #define _MAD_H_
 
-#include <stdint.h>
-#include <string.h>
+#include <infiniband/mad_osd.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
 #  define END_C_DECLS   }
-#else /* !__cplusplus */
+#else				/* !__cplusplus */
 #  define BEGIN_C_DECLS
 #  define END_C_DECLS
-#endif /* __cplusplus */
+#endif				/* __cplusplus */
 
 BEGIN_C_DECLS
+#define IB_MAD_RPC_VERSION_MASK	0x0f00
+#define IB_MAD_RPC_VERSION1	(1<<8)
 
 #define IB_SUBNET_PATH_HOPS_MAX	64
-#define IB_DEFAULT_SUBN_PREFIX	0xfe80000000000000llu
+#define IB_DEFAULT_SUBN_PREFIX	0xfe80000000000000ULL
 #define IB_DEFAULT_QP1_QKEY	0x80010000
-
 #define IB_MAD_SIZE		256
-
 #define IB_SMP_DATA_OFFS	64
 #define IB_SMP_DATA_SIZE	64
-
 #define IB_VENDOR_RANGE1_DATA_OFFS	24
 #define IB_VENDOR_RANGE1_DATA_SIZE	(IB_MAD_SIZE - IB_VENDOR_RANGE1_DATA_OFFS)
-
 #define IB_VENDOR_RANGE2_DATA_OFFS	40
 #define IB_VENDOR_RANGE2_DATA_SIZE	(IB_MAD_SIZE - IB_VENDOR_RANGE2_DATA_OFFS)
-
 #define IB_SA_DATA_SIZE		200
 #define IB_SA_DATA_OFFS		56
-
 #define IB_PC_DATA_OFFS		64
 #define IB_PC_DATA_SZ		(IB_MAD_SIZE - IB_PC_DATA_OFFS)
-
 #define IB_SA_MCM_RECSZ		53
 #define IB_SA_PR_RECSZ		64
+#define IB_SA_GIR_RECSZ		72
+#define IB_BM_DATA_OFFS		64
+#define IB_BM_DATA_SZ		(IB_MAD_SIZE - IB_BM_DATA_OFFS)
+#define IB_BM_BKEY_OFFS		24
+#define IB_BM_BKEY_AND_DATA_SZ	(IB_MAD_SIZE - IB_BM_BKEY_OFFS)
+#define IB_CC_DATA_OFFS         64
+#define IB_CC_DATA_SZ           (IB_MAD_SIZE - IB_CC_DATA_OFFS)
+#define IB_CC_LOG_DATA_OFFS     32 
+#define IB_CC_LOG_DATA_SZ       (IB_MAD_SIZE - IB_CC_LOG_DATA_OFFS)
 
 enum MAD_CLASSES {
-	IB_SMI_CLASS = 		0x1,
-	IB_SMI_DIRECT_CLASS = 	0x81,
-	IB_SA_CLASS = 		0x3,
-	IB_PERFORMANCE_CLASS = 	0x4,
-	IB_BOARD_MGMT_CLASS = 	0x5,
-	IB_DEVICE_MGMT_CLASS =	0x6,
-	IB_CM_CLASS =		0x7,
-	IB_SNMP_CLASS =		0x8,
+	IB_SMI_CLASS = 0x1,
+	IB_SMI_DIRECT_CLASS = 0x81,
+	IB_SA_CLASS = 0x3,
+	IB_PERFORMANCE_CLASS = 0x4,
+	IB_BOARD_MGMT_CLASS = 0x5,
+	IB_DEVICE_MGMT_CLASS = 0x6,
+	IB_CM_CLASS = 0x7,
+	IB_SNMP_CLASS = 0x8,
 	IB_VENDOR_RANGE1_START_CLASS = 0x9,
 	IB_VENDOR_RANGE1_END_CLASS = 0x0f,
-	IB_CC_CLASS =		0x21,
+	IB_CC_CLASS = 0x21,
 	IB_VENDOR_RANGE2_START_CLASS = 0x30,
 	IB_VENDOR_RANGE2_END_CLASS = 0x4f,
 };
 
 enum MAD_METHODS {
-	IB_MAD_METHOD_GET = 		0x1,
-	IB_MAD_METHOD_SET = 		0x2,
-	IB_MAD_METHOD_GET_RESPONSE =	0x81,
+	IB_MAD_METHOD_GET = 0x1,
+	IB_MAD_METHOD_SET = 0x2,
+	IB_MAD_METHOD_GET_RESPONSE = 0x81,
 
-	IB_MAD_METHOD_SEND = 		0x3,
-	IB_MAD_METHOD_TRAP = 		0x5,
-	IB_MAD_METHOD_TRAP_REPRESS = 	0x7,
+	IB_MAD_METHOD_SEND = 0x3,
+	IB_MAD_METHOD_TRAP = 0x5,
+	IB_MAD_METHOD_TRAP_REPRESS = 0x7,
 
-	IB_MAD_METHOD_REPORT =		0x6,
+	IB_MAD_METHOD_REPORT = 0x6,
 	IB_MAD_METHOD_REPORT_RESPONSE = 0x86,
-	IB_MAD_METHOD_GET_TABLE =  	0x12,
+	IB_MAD_METHOD_GET_TABLE = 0x12,
 	IB_MAD_METHOD_GET_TABLE_RESPONSE = 0x92,
 	IB_MAD_METHOD_GET_TRACE_TABLE = 0x13,
 	IB_MAD_METHOD_GET_TRACE_TABLE_RESPONSE = 0x93,
-	IB_MAD_METHOD_GETMULTI = 	0x14,
+	IB_MAD_METHOD_GETMULTI = 0x14,
 	IB_MAD_METHOD_GETMULTI_RESPONSE = 0x94,
-	IB_MAD_METHOD_DELETE =		0x15,
+	IB_MAD_METHOD_DELETE = 0x15,
 	IB_MAD_METHOD_DELETE_RESPONSE = 0x95,
 
-	IB_MAD_RESPONSE = 		0x80,
+	IB_MAD_RESPONSE = 0x80,
 };
 
 enum MAD_ATTR_ID {
@@ -115,6 +120,16 @@ enum MAD_ATTR_ID {
 	INFORM_INFO = 0x3,
 };
 
+enum MAD_STATUS {
+	IB_MAD_STS_OK = (0 << 2),
+	IB_MAD_STS_BUSY = (1 << 0),
+	IB_MAD_STS_REDIRECT = (1 << 1),
+	IB_MAD_STS_BAD_BASE_VER_OR_CLASS = (1 << 2),
+	IB_MAD_STS_METHOD_NOT_SUPPORTED = (2 << 2),
+	IB_MAD_STS_METHOD_ATTR_NOT_SUPPORTED = (3 << 2),
+	IB_MAD_STS_INV_ATTR_VALUE = (7 << 2),
+};
+
 enum SMI_ATTR_ID {
 	IB_ATTR_NODE_DESC = 0x10,
 	IB_ATTR_NODE_INFO = 0x11,
@@ -126,20 +141,35 @@ enum SMI_ATTR_ID {
 	IB_ATTR_VL_ARBITRATION = 0x18,
 	IB_ATTR_LINEARFORWTBL = 0x19,
 	IB_ATTR_MULTICASTFORWTBL = 0x1b,
+	IB_ATTR_LINKSPEEDWIDTHPAIRSTBL = 0x1c,
+	IB_ATTR_VENDORMADSTBL = 0x1d,
 	IB_ATTR_SMINFO = 0x20,
 
-	IB_ATTR_LAST
+	IB_ATTR_LAST,
+
+	IB_ATTR_MLNX_EXT_PORT_INFO = 0xff90,
 };
 
 enum SA_ATTR_ID {
 	IB_SA_ATTR_NOTICE = 0x02,
 	IB_SA_ATTR_INFORMINFO = 0x03,
+	IB_SA_ATTR_NODERECORD = 0x11,
 	IB_SA_ATTR_PORTINFORECORD = 0x12,
+	IB_SA_ATTR_SL2VLTABLERECORD = 0x13,
+	IB_SA_ATTR_SWITCHINFORECORD = 0x14,
+	IB_SA_ATTR_LFTRECORD = 0x15,
+	IB_SA_ATTR_RFTRECORD = 0x16,
+	IB_SA_ATTR_MFTRECORD = 0x17,
+	IB_SA_ATTR_SMINFORECORD = 0x18,
 	IB_SA_ATTR_LINKRECORD = 0x20,
+	IB_SA_ATTR_GUIDINFORECORD = 0x30,
 	IB_SA_ATTR_SERVICERECORD = 0x31,
+	IB_SA_ATTR_PKEYTABLERECORD = 0x33,
 	IB_SA_ATTR_PATHRECORD = 0x35,
+	IB_SA_ATTR_VLARBTABLERECORD = 0x36,
 	IB_SA_ATTR_MCRECORD = 0x38,
 	IB_SA_ATTR_MULTIPATH = 0x3a,
+	IB_SA_ATTR_INFORMINFORECORD = 0xf3,
 
 	IB_SA_ATTR_LAST
 };
@@ -148,18 +178,67 @@ enum GSI_ATTR_ID {
 	IB_GSI_PORT_SAMPLES_CONTROL = 0x10,
 	IB_GSI_PORT_SAMPLES_RESULT = 0x11,
 	IB_GSI_PORT_COUNTERS = 0x12,
+	IB_GSI_PORT_RCV_ERROR_DETAILS = 0x15,
+	IB_GSI_PORT_XMIT_DISCARD_DETAILS = 0x16,
+	IB_GSI_PORT_PORT_OP_RCV_COUNTERS = 0x17,
+	IB_GSI_PORT_PORT_FLOW_CTL_COUNTERS = 0x18,
+	IB_GSI_PORT_PORT_VL_OP_PACKETS = 0x19,
+	IB_GSI_PORT_PORT_VL_OP_DATA = 0x1A,
+	IB_GSI_PORT_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS = 0x1B,
+	IB_GSI_PORT_PORT_VL_XMIT_WAIT_COUNTERS = 0x1C,
 	IB_GSI_PORT_COUNTERS_EXT = 0x1D,
-
+	IB_GSI_PORT_EXT_SPEEDS_COUNTERS = 0x1F,
+	IB_GSI_SW_PORT_VL_CONGESTION = 0x30,
+	IB_GSI_PORT_RCV_CON_CTRL = 0x31,
+	IB_GSI_PORT_SL_RCV_FECN = 0x32,
+	IB_GSI_PORT_SL_RCV_BECN = 0x33,
+	IB_GSI_PORT_XMIT_CON_CTRL = 0x34,
+	IB_GSI_PORT_VL_XMIT_TIME_CONG = 0x35,
+	IB_GSI_PORT_XMIT_DATA_SL = 0x36,
+	IB_GSI_PORT_RCV_DATA_SL = 0x37,
 	IB_GSI_ATTR_LAST
 };
 
+enum BM_ATTR_ID {
+	IB_BM_ATTR_BKEYINFO = 0x10,
+	IB_BM_ATTR_WRITE_VPD = 0x20,
+	IB_BM_ATTR_READ_VPD = 0x21,
+	IB_BM_ATTR_RESET_IBML = 0x22,
+	IB_BM_ATTR_SET_MODULE_PM_CONTROL = 0x23,
+	IB_BM_ATTR_GET_MODULE_PM_CONTROL = 0x24,
+	IB_BM_ATTR_SET_UNIT_PM_CONTROL = 0x25,
+	IB_BM_ATTR_GET_UNIT_PM_CONTROL = 0x26,
+	IB_BM_ATTR_SET_IOC_PM_CONTROL = 0x27,
+	IB_BM_ATTR_GET_IOC_PM_CONTROL = 0x28,
+	IB_BM_ATTR_SET_MODULE_STATE = 0x29,
+	IB_BM_ATTR_SET_MODULE_ATTENTION = 0x2A,
+	IB_BM_ATTR_GET_MODULE_STATUS = 0x2B,
+	IB_BM_ATTR_IB2IBML = 0x2C,
+	IB_BM_ATTR_IB2CME = 0x2D,
+	IB_BM_ATTR_IB2MME = 0x2E,
+	IB_BM_ATTR_OEM = 0x2F,
+
+	IB_BM_ATTR_LAST
+};
+
+enum CC_ATTRI_ID {
+	IB_CC_ATTR_CONGESTION_INFO = 0x11,
+	IB_CC_ATTR_CONGESTION_KEY_INFO = 0x12,
+	IB_CC_ATTR_CONGESTION_LOG = 0x13,
+	IB_CC_ATTR_SWITCH_CONGESTION_SETTING = 0x14,
+	IB_CC_ATTR_SWITCH_PORT_CONGESTION_SETTING = 0x15,
+	IB_CC_ATTR_CA_CONGESTION_SETTING = 0x16,
+	IB_CC_ATTR_CONGESTION_CONTROL_TABLE = 0x17,
+	IB_CC_ATTR_TIMESTAMP = 0x18,
+};
+
 #define IB_VENDOR_OPENIB_PING_CLASS	(IB_VENDOR_RANGE2_START_CLASS + 2)
 #define IB_VENDOR_OPENIB_SYSSTAT_CLASS	(IB_VENDOR_RANGE2_START_CLASS + 3)
 #define IB_OPENIB_OUI			(0x001405)
 
 typedef uint8_t ibmad_gid_t[16];
 #ifdef USE_DEPRECATED_IB_GID_T
-typedef ibmad_gid_t ib_gid_t __attribute__((deprecated));
+typedef ibmad_gid_t ib_gid_t __attribute__ ((deprecated));
 #endif
 
 typedef struct {
@@ -182,13 +261,46 @@ typedef struct {
 	int dataoffs;
 	int datasz;
 	uint64_t mkey;
-	uint64_t trid;	/* used for out mad if nonzero, return real val */
-	uint64_t mask;	/* for sa mads */
-	unsigned recsz;	/* for sa mads (attribute offset) */
+	uint64_t trid;		/* used for out mad if nonzero, return real val */
+	uint64_t mask;		/* for sa mads */
+	unsigned recsz;		/* for sa mads (attribute offset) */
 	int timeout;
-	uint32_t oui;	/* for vendor range 2 mads */
+	uint32_t oui;		/* for vendor range 2 mads */
 } ib_rpc_t;
 
+typedef struct {
+	int mgtclass;
+	int method;
+	ib_attr_t attr;
+	uint32_t rstatus;	/* return status */
+	int dataoffs;
+	int datasz;
+	uint64_t mkey;
+	uint64_t trid;		/* used for out mad if nonzero, return real val */
+	uint64_t mask;		/* for sa mads */
+	unsigned recsz;		/* for sa mads (attribute offset) */
+	int timeout;
+	uint32_t oui;		/* for vendor range 2 mads */
+	int error;		/* errno */
+} ib_rpc_v1_t;
+
+typedef struct {
+	int mgtclass;
+	int method;
+	ib_attr_t attr;
+	uint32_t rstatus;       /* return status */
+	int dataoffs;
+	int datasz;
+	uint64_t mkey;
+	uint64_t trid;          /* used for out mad if nonzero, return real val */
+	uint64_t mask;          /* for sa mads */
+	unsigned recsz;         /* for sa mads (attribute offset) */
+	int timeout;
+	uint32_t oui;           /* for vendor range 2 mads */
+	int error;		/* errno */
+	uint64_t cckey;
+} ib_rpc_cc_t;
+
 typedef struct portid {
 	int lid;		/* lid or 0 if directed route */
 	ib_dr_path_t drpath;
@@ -200,7 +312,7 @@ typedef struct portid {
 	unsigned pkey_idx;
 } ib_portid_t;
 
-typedef void (ib_mad_dump_fn)(char *buf, int bufsz, void *val, int valsz);
+typedef void (ib_mad_dump_fn) (char *buf, int bufsz, void *val, int valsz);
 
 #define IB_FIELD_NAME_LEN	32
 
@@ -242,8 +354,8 @@ enum MAD_FIELDS {
 	IB_MAD_MKEY_F,
 
 	/* word 9 (32-37 bytes) */
-	IB_DRSMP_DRSLID_F,
 	IB_DRSMP_DRDLID_F,
+	IB_DRSMP_DRSLID_F,
 
 	/* word 10,11 (36-43 bytes) */
 	IB_SA_MKEY_F,
@@ -270,7 +382,7 @@ enum MAD_FIELDS {
 	IB_DRSMP_RPATH_F,
 
 	/*
-	 * PortInfo fields:
+	 * PortInfo fields
 	 */
 	IB_PORT_FIRST_F,
 	IB_PORT_MKEY_F = IB_PORT_FIRST_F,
@@ -313,6 +425,7 @@ enum MAD_FIELDS {
 	IB_PORT_QKEY_VIOL_F,
 	IB_PORT_GUID_CAP_F,
 	IB_PORT_CLIENT_REREG_F,
+	IB_PORT_MCAST_PKEY_SUPR_ENAB_F,
 	IB_PORT_SUBN_TIMEOUT_F,
 	IB_PORT_RESP_TIME_VAL_F,
 	IB_PORT_LOCAL_PHYS_ERR_F,
@@ -322,7 +435,7 @@ enum MAD_FIELDS {
 	IB_PORT_LAST_F,
 
 	/*
-	 * NodeInfo fields:
+	 * NodeInfo fields
 	 */
 	IB_NODE_FIRST_F,
 	IB_NODE_BASE_VERS_F = IB_NODE_FIRST_F,
@@ -340,7 +453,7 @@ enum MAD_FIELDS {
 	IB_NODE_LAST_F,
 
 	/*
-	 * SwitchInfo fields:
+	 * SwitchInfo fields
 	 */
 	IB_SW_FIRST_F,
 	IB_SW_LINEAR_FDB_CAP_F = IB_SW_FIRST_F,
@@ -352,6 +465,7 @@ enum MAD_FIELDS {
 	IB_SW_DEF_MCAST_NOT_PRIM_F,
 	IB_SW_LIFE_TIME_F,
 	IB_SW_STATE_CHANGE_F,
+	IB_SW_OPT_SLTOVL_MAPPING_F,
 	IB_SW_LIDS_PER_PORT_F,
 	IB_SW_PARTITION_ENFORCE_CAP_F,
 	IB_SW_PARTITION_ENF_INB_F,
@@ -359,20 +473,21 @@ enum MAD_FIELDS {
 	IB_SW_FILTER_RAW_INB_F,
 	IB_SW_FILTER_RAW_OUTB_F,
 	IB_SW_ENHANCED_PORT0_F,
+	IB_SW_MCAST_FDB_TOP_F,
 	IB_SW_LAST_F,
 
 	/*
-	 * SwitchLinearForwardingTable fields:
+	 * SwitchLinearForwardingTable fields
 	 */
 	IB_LINEAR_FORW_TBL_F,
 
 	/*
-	 * SwitchMulticastForwardingTable fields:
+	 * SwitchMulticastForwardingTable fields
 	 */
 	IB_MULTICAST_FORW_TBL_F,
 
 	/*
-	 * NodeDescription fields:
+	 * NodeDescription fields
 	 */
 	IB_NODE_DESC_F,
 
@@ -406,6 +521,7 @@ enum MAD_FIELDS {
 	IB_PC_XMT_DISCARDS_F,
 	IB_PC_ERR_XMTCONSTR_F,
 	IB_PC_ERR_RCVCONSTR_F,
+	IB_PC_COUNTER_SELECT2_F,
 	IB_PC_ERR_LOCALINTEG_F,
 	IB_PC_ERR_EXCESS_OVR_F,
 	IB_PC_VL15_DROPPED_F,
@@ -413,6 +529,7 @@ enum MAD_FIELDS {
 	IB_PC_RCV_BYTES_F,
 	IB_PC_XMT_PKTS_F,
 	IB_PC_RCV_PKTS_F,
+	IB_PC_XMT_WAIT_F,
 	IB_PC_LAST_F,
 
 	/*
@@ -438,8 +555,8 @@ enum MAD_FIELDS {
 	IB_SA_RMPP_SEGNUM_F,
 	/* data2 */
 	IB_SA_RMPP_D2_F,
-	IB_SA_RMPP_LEN_F,		/* DATA: Payload len */
-	IB_SA_RMPP_NEWWIN_F,		/* ACK: new window last */
+	IB_SA_RMPP_LEN_F,	/* DATA: Payload len */
+	IB_SA_RMPP_NEWWIN_F,	/* ACK: new window last */
 
 	/*
 	 * SA Multi Path rec
@@ -457,6 +574,7 @@ enum MAD_FIELDS {
 	IB_SA_PR_DLID_F,
 	IB_SA_PR_SLID_F,
 	IB_SA_PR_NPATH_F,
+	IB_SA_PR_SL_F,
 
 	/*
 	 * MC Member rec
@@ -528,9 +646,589 @@ enum MAD_FIELDS {
 	/*
 	 * GUIDInfo fields
 	 */
-	IB_GUID_GUID0_F,
+	IB_GUID_GUID0_F, /* Obsolete, kept for compatibility
+			    Use IB_GI_GUID0_F going forward */
+
+	/*
+	 * ClassPortInfo fields
+	 */
+	IB_CPI_BASEVER_F,
+	IB_CPI_CLASSVER_F,
+	IB_CPI_CAPMASK_F,
+	IB_CPI_CAPMASK2_F,
+	IB_CPI_RESP_TIME_VALUE_F,
+	IB_CPI_REDIRECT_GID_F,
+	IB_CPI_REDIRECT_TC_F,
+	IB_CPI_REDIRECT_SL_F,
+	IB_CPI_REDIRECT_FL_F,
+	IB_CPI_REDIRECT_LID_F,
+	IB_CPI_REDIRECT_PKEY_F,
+	IB_CPI_REDIRECT_QP_F,
+	IB_CPI_REDIRECT_QKEY_F,
+	IB_CPI_TRAP_GID_F,
+	IB_CPI_TRAP_TC_F,
+	IB_CPI_TRAP_SL_F,
+	IB_CPI_TRAP_FL_F,
+	IB_CPI_TRAP_LID_F,
+	IB_CPI_TRAP_PKEY_F,
+	IB_CPI_TRAP_HL_F,
+	IB_CPI_TRAP_QP_F,
+	IB_CPI_TRAP_QKEY_F,
+
+	/*
+	 * PortXmitDataSL fields
+	 */
+	IB_PC_XMT_DATA_SL_FIRST_F,
+	IB_PC_XMT_DATA_SL0_F = IB_PC_XMT_DATA_SL_FIRST_F,
+	IB_PC_XMT_DATA_SL1_F,
+	IB_PC_XMT_DATA_SL2_F,
+	IB_PC_XMT_DATA_SL3_F,
+	IB_PC_XMT_DATA_SL4_F,
+	IB_PC_XMT_DATA_SL5_F,
+	IB_PC_XMT_DATA_SL6_F,
+	IB_PC_XMT_DATA_SL7_F,
+	IB_PC_XMT_DATA_SL8_F,
+	IB_PC_XMT_DATA_SL9_F,
+	IB_PC_XMT_DATA_SL10_F,
+	IB_PC_XMT_DATA_SL11_F,
+	IB_PC_XMT_DATA_SL12_F,
+	IB_PC_XMT_DATA_SL13_F,
+	IB_PC_XMT_DATA_SL14_F,
+	IB_PC_XMT_DATA_SL15_F,
+	IB_PC_XMT_DATA_SL_LAST_F,
+
+	/*
+	 * PortRcvDataSL fields
+	 */
+	IB_PC_RCV_DATA_SL_FIRST_F,
+	IB_PC_RCV_DATA_SL0_F = IB_PC_RCV_DATA_SL_FIRST_F,
+	IB_PC_RCV_DATA_SL1_F,
+	IB_PC_RCV_DATA_SL2_F,
+	IB_PC_RCV_DATA_SL3_F,
+	IB_PC_RCV_DATA_SL4_F,
+	IB_PC_RCV_DATA_SL5_F,
+	IB_PC_RCV_DATA_SL6_F,
+	IB_PC_RCV_DATA_SL7_F,
+	IB_PC_RCV_DATA_SL8_F,
+	IB_PC_RCV_DATA_SL9_F,
+	IB_PC_RCV_DATA_SL10_F,
+	IB_PC_RCV_DATA_SL11_F,
+	IB_PC_RCV_DATA_SL12_F,
+	IB_PC_RCV_DATA_SL13_F,
+	IB_PC_RCV_DATA_SL14_F,
+	IB_PC_RCV_DATA_SL15_F,
+	IB_PC_RCV_DATA_SL_LAST_F,
+
+	/*
+	 * PortXmitDiscardDetails fields
+	 */
+	IB_PC_XMT_INACT_DISC_F,
+	IB_PC_XMT_NEIGH_MTU_DISC_F,
+	IB_PC_XMT_SW_LIFE_DISC_F,
+	IB_PC_XMT_SW_HOL_DISC_F,
+	IB_PC_XMT_DISC_LAST_F,
+
+	/*
+	 * PortRcvErrorDetails fields
+	 */
+	IB_PC_RCV_LOCAL_PHY_ERR_F,
+	IB_PC_RCV_MALFORMED_PKT_ERR_F,
+	IB_PC_RCV_BUF_OVR_ERR_F,
+	IB_PC_RCV_DLID_MAP_ERR_F,
+	IB_PC_RCV_VL_MAP_ERR_F,
+	IB_PC_RCV_LOOPING_ERR_F,
+	IB_PC_RCV_ERR_LAST_F,
+
+	/*
+	 * PortSamplesControl fields
+	 */
+	IB_PSC_OPCODE_F,
+	IB_PSC_PORT_SELECT_F,
+	IB_PSC_TICK_F,
+	IB_PSC_COUNTER_WIDTH_F,
+	IB_PSC_COUNTER_MASK0_F,
+	IB_PSC_COUNTER_MASKS1TO9_F,
+	IB_PSC_COUNTER_MASKS10TO14_F,
+	IB_PSC_SAMPLE_MECHS_F,
+	IB_PSC_SAMPLE_STATUS_F,
+	IB_PSC_OPTION_MASK_F,
+	IB_PSC_VENDOR_MASK_F,
+	IB_PSC_SAMPLE_START_F,
+	IB_PSC_SAMPLE_INTVL_F,
+	IB_PSC_TAG_F,
+	IB_PSC_COUNTER_SEL0_F,
+	IB_PSC_COUNTER_SEL1_F,
+	IB_PSC_COUNTER_SEL2_F,
+	IB_PSC_COUNTER_SEL3_F,
+	IB_PSC_COUNTER_SEL4_F,
+	IB_PSC_COUNTER_SEL5_F,
+	IB_PSC_COUNTER_SEL6_F,
+	IB_PSC_COUNTER_SEL7_F,
+	IB_PSC_COUNTER_SEL8_F,
+	IB_PSC_COUNTER_SEL9_F,
+	IB_PSC_COUNTER_SEL10_F,
+	IB_PSC_COUNTER_SEL11_F,
+	IB_PSC_COUNTER_SEL12_F,
+	IB_PSC_COUNTER_SEL13_F,
+	IB_PSC_COUNTER_SEL14_F,
+	IB_PSC_SAMPLES_ONLY_OPT_MASK_F,
+	IB_PSC_LAST_F,
+
+	/*
+	 * GUIDInfo fields
+	 */
+	IB_GI_GUID0_F, /* a duplicate of IB_GUID_GUID0_F for backwards
+			  compatibility */
+	IB_GI_GUID1_F,
+	IB_GI_GUID2_F,
+	IB_GI_GUID3_F,
+	IB_GI_GUID4_F,
+	IB_GI_GUID5_F,
+	IB_GI_GUID6_F,
+	IB_GI_GUID7_F,
+
+	/*
+	 * GUID Info Record
+	 */
+	IB_SA_GIR_LID_F,
+	IB_SA_GIR_BLOCKNUM_F,
+	IB_SA_GIR_GUID0_F,
+	IB_SA_GIR_GUID1_F,
+	IB_SA_GIR_GUID2_F,
+	IB_SA_GIR_GUID3_F,
+	IB_SA_GIR_GUID4_F,
+	IB_SA_GIR_GUID5_F,
+	IB_SA_GIR_GUID6_F,
+	IB_SA_GIR_GUID7_F,
+
+	/*
+	 * More PortInfo fields
+	 */
+	IB_PORT_CAPMASK2_F,
+	IB_PORT_LINK_SPEED_EXT_ACTIVE_F,
+	IB_PORT_LINK_SPEED_EXT_SUPPORTED_F,
+	IB_PORT_LINK_SPEED_EXT_ENABLED_F,
+	IB_PORT_LINK_SPEED_EXT_LAST_F,
+
+	/*
+	 * PortExtendedSpeedsCounters fields
+	 */
+	IB_PESC_PORT_SELECT_F,
+	IB_PESC_COUNTER_SELECT_F,
+	IB_PESC_SYNC_HDR_ERR_CTR_F,
+	IB_PESC_UNK_BLOCK_CTR_F,
+	IB_PESC_ERR_DET_CTR_LANE0_F,
+	IB_PESC_ERR_DET_CTR_LANE1_F,
+	IB_PESC_ERR_DET_CTR_LANE2_F,
+	IB_PESC_ERR_DET_CTR_LANE3_F,
+	IB_PESC_ERR_DET_CTR_LANE4_F,
+	IB_PESC_ERR_DET_CTR_LANE5_F,
+	IB_PESC_ERR_DET_CTR_LANE6_F,
+	IB_PESC_ERR_DET_CTR_LANE7_F,
+	IB_PESC_ERR_DET_CTR_LANE8_F,
+	IB_PESC_ERR_DET_CTR_LANE9_F,
+	IB_PESC_ERR_DET_CTR_LANE10_F,
+	IB_PESC_ERR_DET_CTR_LANE11_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE0_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE1_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE2_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE3_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE4_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE5_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE6_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE7_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE8_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE9_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE10_F,
+	IB_PESC_FEC_CORR_BLOCK_CTR_LANE11_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE0_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE1_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE2_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE3_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE4_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE5_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE6_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE7_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE8_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE9_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE10_F,
+	IB_PESC_FEC_UNCORR_BLOCK_CTR_LANE11_F,
+	IB_PESC_LAST_F,
+
+	/*
+	 * PortOpRcvCounters fields
+	 */
+	IB_PC_PORT_OP_RCV_COUNTERS_FIRST_F,
+	IB_PC_PORT_OP_RCV_PKTS_F = IB_PC_PORT_OP_RCV_COUNTERS_FIRST_F,
+	IB_PC_PORT_OP_RCV_DATA_F,
+	IB_PC_PORT_OP_RCV_COUNTERS_LAST_F,
+
+	/*
+	 * PortFlowCtlCounters fields
+	 */
+	IB_PC_PORT_FLOW_CTL_COUNTERS_FIRST_F,
+	IB_PC_PORT_XMIT_FLOW_PKTS_F = IB_PC_PORT_FLOW_CTL_COUNTERS_FIRST_F,
+	IB_PC_PORT_RCV_FLOW_PKTS_F,
+	IB_PC_PORT_FLOW_CTL_COUNTERS_LAST_F,
+
+	/*
+	 * PortVLOpPackets fields
+	 */
+	IB_PC_PORT_VL_OP_PACKETS_FIRST_F,
+	IB_PC_PORT_VL_OP_PACKETS0_F = IB_PC_PORT_VL_OP_PACKETS_FIRST_F,
+	IB_PC_PORT_VL_OP_PACKETS1_F,
+	IB_PC_PORT_VL_OP_PACKETS2_F,
+	IB_PC_PORT_VL_OP_PACKETS3_F,
+	IB_PC_PORT_VL_OP_PACKETS4_F,
+	IB_PC_PORT_VL_OP_PACKETS5_F,
+	IB_PC_PORT_VL_OP_PACKETS6_F,
+	IB_PC_PORT_VL_OP_PACKETS7_F,
+	IB_PC_PORT_VL_OP_PACKETS8_F,
+	IB_PC_PORT_VL_OP_PACKETS9_F,
+	IB_PC_PORT_VL_OP_PACKETS10_F,
+	IB_PC_PORT_VL_OP_PACKETS11_F,
+	IB_PC_PORT_VL_OP_PACKETS12_F,
+	IB_PC_PORT_VL_OP_PACKETS13_F,
+	IB_PC_PORT_VL_OP_PACKETS14_F,
+	IB_PC_PORT_VL_OP_PACKETS15_F,
+	IB_PC_PORT_VL_OP_PACKETS_LAST_F,
+
+	/*
+	 * PortVLOpData fields
+	 */
+	IB_PC_PORT_VL_OP_DATA_FIRST_F,
+	IB_PC_PORT_VL_OP_DATA0_F = IB_PC_PORT_VL_OP_DATA_FIRST_F,
+	IB_PC_PORT_VL_OP_DATA1_F,
+	IB_PC_PORT_VL_OP_DATA2_F,
+	IB_PC_PORT_VL_OP_DATA3_F,
+	IB_PC_PORT_VL_OP_DATA4_F,
+	IB_PC_PORT_VL_OP_DATA5_F,
+	IB_PC_PORT_VL_OP_DATA6_F,
+	IB_PC_PORT_VL_OP_DATA7_F,
+	IB_PC_PORT_VL_OP_DATA8_F,
+	IB_PC_PORT_VL_OP_DATA9_F,
+	IB_PC_PORT_VL_OP_DATA10_F,
+	IB_PC_PORT_VL_OP_DATA11_F,
+	IB_PC_PORT_VL_OP_DATA12_F,
+	IB_PC_PORT_VL_OP_DATA13_F,
+	IB_PC_PORT_VL_OP_DATA14_F,
+	IB_PC_PORT_VL_OP_DATA15_F,
+	IB_PC_PORT_VL_OP_DATA_LAST_F,
+
+	/*
+	 * PortVLXmitFlowCtlUpdateErrors fields
+	 */
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_FIRST_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS0_F = IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_FIRST_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS1_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS2_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS3_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS4_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS5_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS6_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS7_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS8_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS9_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS10_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS11_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS12_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS13_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS14_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS15_F,
+	IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_LAST_F,
+
+	/*
+	 * PortVLXmitWaitCounters fields
+	 */
+	IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_FIRST_F,
+	IB_PC_PORT_VL_XMIT_WAIT0_F = IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_FIRST_F,
+	IB_PC_PORT_VL_XMIT_WAIT1_F,
+	IB_PC_PORT_VL_XMIT_WAIT2_F,
+	IB_PC_PORT_VL_XMIT_WAIT3_F,
+	IB_PC_PORT_VL_XMIT_WAIT4_F,
+	IB_PC_PORT_VL_XMIT_WAIT5_F,
+	IB_PC_PORT_VL_XMIT_WAIT6_F,
+	IB_PC_PORT_VL_XMIT_WAIT7_F,
+	IB_PC_PORT_VL_XMIT_WAIT8_F,
+	IB_PC_PORT_VL_XMIT_WAIT9_F,
+	IB_PC_PORT_VL_XMIT_WAIT10_F,
+	IB_PC_PORT_VL_XMIT_WAIT11_F,
+	IB_PC_PORT_VL_XMIT_WAIT12_F,
+	IB_PC_PORT_VL_XMIT_WAIT13_F,
+	IB_PC_PORT_VL_XMIT_WAIT14_F,
+	IB_PC_PORT_VL_XMIT_WAIT15_F,
+	IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_LAST_F,
+
+	/*
+	 * SwPortVLCongestion fields
+	 */
+	IB_PC_SW_PORT_VL_CONGESTION_FIRST_F,
+	IB_PC_SW_PORT_VL_CONGESTION0_F = IB_PC_SW_PORT_VL_CONGESTION_FIRST_F,
+	IB_PC_SW_PORT_VL_CONGESTION1_F,
+	IB_PC_SW_PORT_VL_CONGESTION2_F,
+	IB_PC_SW_PORT_VL_CONGESTION3_F,
+	IB_PC_SW_PORT_VL_CONGESTION4_F,
+	IB_PC_SW_PORT_VL_CONGESTION5_F,
+	IB_PC_SW_PORT_VL_CONGESTION6_F,
+	IB_PC_SW_PORT_VL_CONGESTION7_F,
+	IB_PC_SW_PORT_VL_CONGESTION8_F,
+	IB_PC_SW_PORT_VL_CONGESTION9_F,
+	IB_PC_SW_PORT_VL_CONGESTION10_F,
+	IB_PC_SW_PORT_VL_CONGESTION11_F,
+	IB_PC_SW_PORT_VL_CONGESTION12_F,
+	IB_PC_SW_PORT_VL_CONGESTION13_F,
+	IB_PC_SW_PORT_VL_CONGESTION14_F,
+	IB_PC_SW_PORT_VL_CONGESTION15_F,
+	IB_PC_SW_PORT_VL_CONGESTION_LAST_F,
+
+	/*
+	 * PortRcvConCtrl fields
+	 */
+	IB_PC_RCV_CON_CTRL_FIRST_F,
+	IB_PC_RCV_CON_CTRL_PKT_RCV_FECN_F = IB_PC_RCV_CON_CTRL_FIRST_F,
+	IB_PC_RCV_CON_CTRL_PKT_RCV_BECN_F,
+	IB_PC_RCV_CON_CTRL_LAST_F,
 
-	IB_FIELD_LAST_	/* must be last */
+	/*
+	 * PortSLRcvFECN fields
+	 */
+	IB_PC_SL_RCV_FECN_FIRST_F,
+	IB_PC_SL_RCV_FECN0_F = IB_PC_SL_RCV_FECN_FIRST_F,
+	IB_PC_SL_RCV_FECN1_F,
+	IB_PC_SL_RCV_FECN2_F,
+	IB_PC_SL_RCV_FECN3_F,
+	IB_PC_SL_RCV_FECN4_F,
+	IB_PC_SL_RCV_FECN5_F,
+	IB_PC_SL_RCV_FECN6_F,
+	IB_PC_SL_RCV_FECN7_F,
+	IB_PC_SL_RCV_FECN8_F,
+	IB_PC_SL_RCV_FECN9_F,
+	IB_PC_SL_RCV_FECN10_F,
+	IB_PC_SL_RCV_FECN11_F,
+	IB_PC_SL_RCV_FECN12_F,
+	IB_PC_SL_RCV_FECN13_F,
+	IB_PC_SL_RCV_FECN14_F,
+	IB_PC_SL_RCV_FECN15_F,
+	IB_PC_SL_RCV_FECN_LAST_F,
+
+	/*
+	 * PortSLRcvBECN fields
+	 */
+	IB_PC_SL_RCV_BECN_FIRST_F,
+	IB_PC_SL_RCV_BECN0_F = IB_PC_SL_RCV_BECN_FIRST_F,
+	IB_PC_SL_RCV_BECN1_F,
+	IB_PC_SL_RCV_BECN2_F,
+	IB_PC_SL_RCV_BECN3_F,
+	IB_PC_SL_RCV_BECN4_F,
+	IB_PC_SL_RCV_BECN5_F,
+	IB_PC_SL_RCV_BECN6_F,
+	IB_PC_SL_RCV_BECN7_F,
+	IB_PC_SL_RCV_BECN8_F,
+	IB_PC_SL_RCV_BECN9_F,
+	IB_PC_SL_RCV_BECN10_F,
+	IB_PC_SL_RCV_BECN11_F,
+	IB_PC_SL_RCV_BECN12_F,
+	IB_PC_SL_RCV_BECN13_F,
+	IB_PC_SL_RCV_BECN14_F,
+	IB_PC_SL_RCV_BECN15_F,
+	IB_PC_SL_RCV_BECN_LAST_F,
+
+	/*
+	 * PortXmitConCtrl fields
+	 */
+	IB_PC_XMIT_CON_CTRL_FIRST_F,
+	IB_PC_XMIT_CON_CTRL_TIME_CONG_F = IB_PC_XMIT_CON_CTRL_FIRST_F,
+	IB_PC_XMIT_CON_CTRL_LAST_F,
+
+	/*
+	 * PortVLXmitTimeCong fields
+	 */
+	IB_PC_VL_XMIT_TIME_CONG_FIRST_F,
+	IB_PC_VL_XMIT_TIME_CONG0_F = IB_PC_VL_XMIT_TIME_CONG_FIRST_F,
+	IB_PC_VL_XMIT_TIME_CONG1_F,
+	IB_PC_VL_XMIT_TIME_CONG2_F,
+	IB_PC_VL_XMIT_TIME_CONG3_F,
+	IB_PC_VL_XMIT_TIME_CONG4_F,
+	IB_PC_VL_XMIT_TIME_CONG5_F,
+	IB_PC_VL_XMIT_TIME_CONG6_F,
+	IB_PC_VL_XMIT_TIME_CONG7_F,
+	IB_PC_VL_XMIT_TIME_CONG8_F,
+	IB_PC_VL_XMIT_TIME_CONG9_F,
+	IB_PC_VL_XMIT_TIME_CONG10_F,
+	IB_PC_VL_XMIT_TIME_CONG11_F,
+	IB_PC_VL_XMIT_TIME_CONG12_F,
+	IB_PC_VL_XMIT_TIME_CONG13_F,
+	IB_PC_VL_XMIT_TIME_CONG14_F,
+	IB_PC_VL_XMIT_TIME_CONG_LAST_F,
+
+	/*
+	 * Mellanox ExtendedPortInfo fields
+	 */
+	IB_MLNX_EXT_PORT_STATE_CHG_ENABLE_F,
+	IB_MLNX_EXT_PORT_LINK_SPEED_SUPPORTED_F,
+	IB_MLNX_EXT_PORT_LINK_SPEED_ENABLED_F,
+	IB_MLNX_EXT_PORT_LINK_SPEED_ACTIVE_F,
+	IB_MLNX_EXT_PORT_LAST_F,
+
+	/*
+	 * Congestion Control Mad fields
+	 * bytes 24-31 of congestion control mad
+	 */
+	IB_CC_CCKEY_F,
+
+	/*
+	 * CongestionInfo fields
+	 */
+	IB_CC_CONGESTION_INFO_FIRST_F,
+	IB_CC_CONGESTION_INFO_F = IB_CC_CONGESTION_INFO_FIRST_F,
+	IB_CC_CONGESTION_INFO_CONTROL_TABLE_CAP_F,
+	IB_CC_CONGESTION_INFO_LAST_F,
+
+	/*
+	 * CongestionKeyInfo fields
+	 */
+	IB_CC_CONGESTION_KEY_INFO_FIRST_F,
+	IB_CC_CONGESTION_KEY_INFO_CC_KEY_F = IB_CC_CONGESTION_KEY_INFO_FIRST_F,
+	IB_CC_CONGESTION_KEY_INFO_CC_KEY_PROTECT_BIT_F,
+	IB_CC_CONGESTION_KEY_INFO_CC_KEY_LEASE_PERIOD_F,
+	IB_CC_CONGESTION_KEY_INFO_CC_KEY_VIOLATIONS_F,
+	IB_CC_CONGESTION_KEY_INFO_LAST_F,
+
+	/*
+	 * CongestionLog (common) fields
+	 */
+	IB_CC_CONGESTION_LOG_FIRST_F,
+	IB_CC_CONGESTION_LOG_LOGTYPE_F = IB_CC_CONGESTION_LOG_FIRST_F,
+	IB_CC_CONGESTION_LOG_CONGESTION_FLAGS_F,
+	IB_CC_CONGESTION_LOG_LAST_F,
+
+	/*
+	 * CongestionLog (Switch) fields
+	 */
+	IB_CC_CONGESTION_LOG_SWITCH_FIRST_F,
+	IB_CC_CONGESTION_LOG_SWITCH_LOG_EVENTS_COUNTER_F = IB_CC_CONGESTION_LOG_SWITCH_FIRST_F,
+	IB_CC_CONGESTION_LOG_SWITCH_CURRENT_TIME_STAMP_F,
+	IB_CC_CONGESTION_LOG_SWITCH_PORTMAP_F,
+	IB_CC_CONGESTION_LOG_SWITCH_LAST_F,
+
+	/*
+	 * CongestionLogEvent (Switch) fields
+	 */
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_FIRST_F,
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_SLID_F = IB_CC_CONGESTION_LOG_ENTRY_SWITCH_FIRST_F,
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_DLID_F,
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_SL_F,
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_TIMESTAMP_F,
+	IB_CC_CONGESTION_LOG_ENTRY_SWITCH_LAST_F,
+
+	/*
+	 * CongestionLog (CA) fields
+	 */
+	IB_CC_CONGESTION_LOG_CA_FIRST_F,
+	IB_CC_CONGESTION_LOG_CA_THRESHOLD_EVENT_COUNTER_F = IB_CC_CONGESTION_LOG_CA_FIRST_F,
+	IB_CC_CONGESTION_LOG_CA_THRESHOLD_CONGESTION_EVENT_MAP_F,
+	IB_CC_CONGESTION_LOG_CA_CURRENT_TIMESTAMP_F,
+	IB_CC_CONGESTION_LOG_CA_LAST_F,
+
+	/*
+	 * CongestionLogEvent (CA) fields
+	 */
+	IB_CC_CONGESTION_LOG_ENTRY_CA_FIRST_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_LOCAL_QP_CN_ENTRY_F = IB_CC_CONGESTION_LOG_ENTRY_CA_FIRST_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_SL_CN_ENTRY_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_SERVICE_TYPE_CN_ENTRY_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_REMOTE_QP_NUMBER_CN_ENTRY_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_LOCAL_LID_CN_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_REMOTE_LID_CN_ENTRY_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_TIMESTAMP_CN_ENTRY_F,
+	IB_CC_CONGESTION_LOG_ENTRY_CA_LAST_F,
+
+	/*
+	 * SwitchCongestionSetting fields
+	 */
+	IB_CC_SWITCH_CONGESTION_SETTING_FIRST_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_CONTROL_MAP_F = IB_CC_SWITCH_CONGESTION_SETTING_FIRST_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_VICTIM_MASK_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_CREDIT_MASK_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_THRESHOLD_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_PACKET_SIZE_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_CS_THRESHOLD_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_CS_RETURN_DELAY_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_MARKING_RATE_F,
+	IB_CC_SWITCH_CONGESTION_SETTING_LAST_F,
+
+	/*
+	 * SwitchPortCongestionSettingElement fields
+	 */
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_FIRST_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_VALID_F = IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_FIRST_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_CONTROL_TYPE_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_THRESHOLD_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_PACKET_SIZE_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_CONG_PARM_MARKING_RATE_F,
+	IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_LAST_F,
+
+	/*
+	 * CACongestionSetting fields
+	 */
+	IB_CC_CA_CONGESTION_SETTING_FIRST_F,
+	IB_CC_CA_CONGESTION_SETTING_PORT_CONTROL_F = IB_CC_CA_CONGESTION_SETTING_FIRST_F,
+	IB_CC_CA_CONGESTION_SETTING_CONTROL_MAP_F,
+	IB_CC_CA_CONGESTION_SETTING_LAST_F,
+
+	/*
+	 * CACongestionEntry fields
+	 */
+	IB_CC_CA_CONGESTION_ENTRY_FIRST_F,
+	IB_CC_CA_CONGESTION_ENTRY_CCTI_TIMER_F = IB_CC_CA_CONGESTION_ENTRY_FIRST_F,
+	IB_CC_CA_CONGESTION_ENTRY_CCTI_INCREASE_F,
+	IB_CC_CA_CONGESTION_ENTRY_TRIGGER_THRESHOLD_F,
+	IB_CC_CA_CONGESTION_ENTRY_CCTI_MIN_F,
+	IB_CC_CA_CONGESTION_ENTRY_LAST_F,
+
+	/*
+	 * CongestionControlTable fields
+	 */
+	IB_CC_CONGESTION_CONTROL_TABLE_FIRST_F,
+	IB_CC_CONGESTION_CONTROL_TABLE_CCTI_LIMIT_F = IB_CC_CONGESTION_CONTROL_TABLE_FIRST_F,
+	IB_CC_CONGESTION_CONTROL_TABLE_LAST_F,
+
+	/*
+	 * CongestionControlTableEntry fields
+	 */
+	IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_FIRST_F,
+	IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_CCT_SHIFT_F = IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_FIRST_F,
+	IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_CCT_MULTIPLIER_F,
+	IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_LAST_F,
+
+	/*
+	 * Timestamp fields
+	 */
+	IB_CC_TIMESTAMP_FIRST_F,
+	IB_CC_TIMESTAMP_F = IB_CC_TIMESTAMP_FIRST_F,
+	IB_CC_TIMESTAMP_LAST_F,
+
+	/*
+	 * Node Record
+	 */
+	IB_SA_NR_FIRST_F,
+	IB_SA_NR_LID_F = IB_SA_NR_FIRST_F,
+	IB_SA_NR_BASEVER_F,
+	IB_SA_NR_CLASSVER_F,
+	IB_SA_NR_TYPE_F,
+	IB_SA_NR_NPORTS_F,
+	IB_SA_NR_SYSTEM_GUID_F,
+	IB_SA_NR_GUID_F,
+	IB_SA_NR_PORT_GUID_F,
+	IB_SA_NR_PARTITION_CAP_F,
+	IB_SA_NR_DEVID_F,
+	IB_SA_NR_REVISION_F,
+	IB_SA_NR_LOCAL_PORT_F,
+	IB_SA_NR_VENDORID_F,
+	IB_SA_NR_NODEDESC_F,
+	IB_SA_NR_LAST_F,
+
+	IB_FIELD_LAST_		/* must be last */
 };
 
 /*
@@ -575,8 +1273,8 @@ typedef struct ib_sa_call {
 	uint64_t mask;
 	unsigned method;
 
-	uint64_t trid;	/* used for out mad if nonzero, return real val */
-	unsigned recsz;	/* return field */
+	uint64_t trid;		/* used for out mad if nonzero, return real val */
+	unsigned recsz;		/* return field */
 	ib_rmpp_hdr_t rmpp;
 } ib_sa_call_t;
 
@@ -590,6 +1288,14 @@ typedef struct ib_vendor_call {
 	ib_rmpp_hdr_t rmpp;
 } ib_vendor_call_t;
 
+typedef struct ib_bm_call {
+	unsigned method;
+	unsigned attrid;
+	unsigned mod;
+	unsigned timeout;
+	uint64_t bkey;
+} ib_bm_call_t;
+
 #define IB_MIN_UCAST_LID	1
 #define IB_MAX_UCAST_LID	(0xc000-1)
 #define IB_MIN_MCAST_LID	0xc000
@@ -601,14 +1307,15 @@ typedef struct ib_vendor_call {
 #define MAD_DEF_RETRIES		3
 #define MAD_DEF_TIMEOUT_MS	1000
 
-enum {
+enum MAD_DEST {
 	IB_DEST_LID,
 	IB_DEST_DRPATH,
 	IB_DEST_GUID,
 	IB_DEST_DRSLID,
+	IB_DEST_GID
 };
 
-enum {
+enum MAD_NODE_TYPE {
 	IB_NODE_CA = 1,
 	IB_NODE_SWITCH,
 	IB_NODE_ROUTER,
@@ -620,13 +1327,13 @@ enum {
 /******************************************************************************/
 
 /* portid.c */
-char *	portid2str(ib_portid_t *portid);
-int	portid2portnum(ib_portid_t *portid);
-int	str2drpath(ib_dr_path_t *path, char *routepath, int drslid, int drdlid);
-char *  drpath2str(ib_dr_path_t *path, char *dstr, size_t dstr_size);
+MAD_EXPORT char *portid2str(ib_portid_t * portid);
+MAD_EXPORT int portid2portnum(ib_portid_t * portid);
+MAD_EXPORT int str2drpath(ib_dr_path_t * path, char *routepath, int drslid,
+			  int drdlid);
+MAD_EXPORT char *drpath2str(ib_dr_path_t * path, char *dstr, size_t dstr_size);
 
-static inline int
-ib_portid_set(ib_portid_t *portid, int lid, int qp, int qkey)
+static inline int ib_portid_set(ib_portid_t * portid, int lid, int qp, int qkey)
 {
 	portid->lid = lid;
 	portid->qp = qp;
@@ -637,269 +1344,301 @@ ib_portid_set(ib_portid_t *portid, int lid, int qp, int qkey)
 }
 
 /* fields.c */
-extern ib_field_t ib_mad_f[];
-
-void	_set_field(void *buf, int base_offs, ib_field_t *f, uint32_t val);
-uint32_t _get_field(void *buf, int base_offs, ib_field_t *f);
-void	_set_array(void *buf, int base_offs, ib_field_t *f, void *val);
-void	_get_array(void *buf, int base_offs, ib_field_t *f, void *val);
-void	_set_field64(void *buf, int base_offs, ib_field_t *f, uint64_t val);
-uint64_t _get_field64(void *buf, int base_offs, ib_field_t *f);
-
-/* mad.c */
-static inline uint32_t
-mad_get_field(void *buf, int base_offs, int field)
-{
-	return _get_field(buf, base_offs, ib_mad_f + field);
-}
-
-static inline void
-mad_set_field(void *buf, int base_offs, int field, uint32_t val)
-{
-	_set_field(buf, base_offs, ib_mad_f + field, val);
-}
-
+MAD_EXPORT uint32_t mad_get_field(void *buf, int base_offs,
+				  enum MAD_FIELDS field);
+MAD_EXPORT void mad_set_field(void *buf, int base_offs, enum MAD_FIELDS field,
+			      uint32_t val);
 /* field must be byte aligned */
-static inline uint64_t
-mad_get_field64(void *buf, int base_offs, int field)
-{
-	return _get_field64(buf, base_offs, ib_mad_f + field);
-}
+MAD_EXPORT uint64_t mad_get_field64(void *buf, int base_offs,
+				    enum MAD_FIELDS field);
+MAD_EXPORT void mad_set_field64(void *buf, int base_offs, enum MAD_FIELDS field,
+				uint64_t val);
+MAD_EXPORT void mad_set_array(void *buf, int base_offs, enum MAD_FIELDS field,
+			      void *val);
+MAD_EXPORT void mad_get_array(void *buf, int base_offs, enum MAD_FIELDS field,
+			      void *val);
+MAD_EXPORT void mad_decode_field(uint8_t * buf, enum MAD_FIELDS field,
+				 void *val);
+MAD_EXPORT void mad_encode_field(uint8_t * buf, enum MAD_FIELDS field,
+				 void *val);
+MAD_EXPORT int mad_print_field(enum MAD_FIELDS field, const char *name,
+			       void *val);
+MAD_EXPORT char *mad_dump_field(enum MAD_FIELDS field, char *buf, int bufsz,
+				void *val);
+MAD_EXPORT char *mad_dump_val(enum MAD_FIELDS field, char *buf, int bufsz,
+			      void *val);
+MAD_EXPORT const char *mad_field_name(enum MAD_FIELDS field);
 
-static inline void
-mad_set_field64(void *buf, int base_offs, int field, uint64_t val)
-{
-	_set_field64(buf, base_offs, ib_mad_f + field, val);
-}
+/* mad.c */
+MAD_EXPORT void *mad_encode(void *buf, ib_rpc_t * rpc, ib_dr_path_t * drpath,
+			    void *data);
+MAD_EXPORT uint64_t mad_trid(void);
+MAD_EXPORT int mad_build_pkt(void *umad, ib_rpc_t * rpc, ib_portid_t * dport,
+			     ib_rmpp_hdr_t * rmpp, void *data);
+
+/* New interface */
+MAD_EXPORT void madrpc_show_errors(int set);
+MAD_EXPORT int madrpc_set_retries(int retries);
+MAD_EXPORT int madrpc_set_timeout(int timeout);
+MAD_EXPORT struct ibmad_port *mad_rpc_open_port(char *dev_name, int dev_port,
+						int *mgmt_classes,
+						int num_classes);
+MAD_EXPORT void mad_rpc_close_port(struct ibmad_port *srcport);
 
-static inline void
-mad_set_array(void *buf, int base_offs, int field, void *val)
-{
-	_set_array(buf, base_offs, ib_mad_f + field, val);
-}
+/*
+ * On redirection, the dport argument is updated with the redirection target,
+ * so subsequent MADs will not go through the redirection process again but
+ * reach the target directly.
+ */
+MAD_EXPORT void *mad_rpc(const struct ibmad_port *srcport, ib_rpc_t * rpc,
+			 ib_portid_t * dport, void *payload, void *rcvdata);
 
-static inline void
-mad_get_array(void *buf, int base_offs, int field, void *val)
-{
-	_get_array(buf, base_offs, ib_mad_f + field, val);
-}
+MAD_EXPORT void *mad_rpc_rmpp(const struct ibmad_port *srcport, ib_rpc_t * rpc,
+			      ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
+			      void *data);
+MAD_EXPORT int mad_rpc_portid(struct ibmad_port *srcport);
+MAD_EXPORT void mad_rpc_set_retries(struct ibmad_port *port, int retries);
+MAD_EXPORT void mad_rpc_set_timeout(struct ibmad_port *port, int timeout);
+MAD_EXPORT int mad_rpc_class_agent(struct ibmad_port *srcport, int cls);
 
-void	mad_decode_field(uint8_t *buf, int field, void *val);
-void	mad_encode_field(uint8_t *buf, int field, void *val);
-void *	mad_encode(void *buf, ib_rpc_t *rpc, ib_dr_path_t *drpath, void *data);
-uint64_t mad_trid(void);
-int	mad_build_pkt(void *umad, ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp, void *data);
+MAD_EXPORT int mad_get_timeout(const struct ibmad_port *srcport,
+			       int override_ms);
+MAD_EXPORT int mad_get_retries(const struct ibmad_port *srcport);
 
 /* register.c */
-int	mad_register_port_client(int port_id, int mgmt, uint8_t rmpp_version);
-int	mad_register_client(int mgmt, uint8_t rmpp_version);
-int	mad_register_server(int mgmt, uint8_t rmpp_version,
-			    long method_mask[16/sizeof(long)],
-			    uint32_t class_oui);
-int	mad_class_agent(int mgmt);
-int	mad_agent_class(int agent);
+MAD_EXPORT int mad_register_port_client(int port_id, int mgmt,
+					uint8_t rmpp_version);
+MAD_EXPORT int mad_register_client(int mgmt, uint8_t rmpp_version) DEPRECATED;
+MAD_EXPORT int mad_register_server(int mgmt, uint8_t rmpp_version,
+				   long method_mask[16 / sizeof(long)],
+				   uint32_t class_oui) DEPRECATED;
+/* register.c new interface */
+MAD_EXPORT int mad_register_client_via(int mgmt, uint8_t rmpp_version,
+				       struct ibmad_port *srcport);
+MAD_EXPORT int mad_register_server_via(int mgmt, uint8_t rmpp_version,
+				       long method_mask[16 / sizeof(long)],
+				       uint32_t class_oui,
+				       struct ibmad_port *srcport);
+MAD_EXPORT int mad_class_agent(int mgmt) DEPRECATED;
 
 /* serv.c */
-int	mad_send(ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp,
-		 void *data);
-void *	mad_receive(void *umad, int timeout);
-int	mad_respond(void *umad, ib_portid_t *portid, uint32_t rstatus);
-void *	mad_alloc(void);
-void	mad_free(void *umad);
+MAD_EXPORT int mad_send(ib_rpc_t * rpc, ib_portid_t * dport,
+			ib_rmpp_hdr_t * rmpp, void *data) DEPRECATED;
+MAD_EXPORT void *mad_receive(void *umad, int timeout) DEPRECATED;
+MAD_EXPORT int mad_respond(void *umad, ib_portid_t * portid, uint32_t rstatus)
+    DEPRECATED;
+
+/* serv.c new interface */
+MAD_EXPORT int mad_send_via(ib_rpc_t * rpc, ib_portid_t * dport,
+			    ib_rmpp_hdr_t * rmpp, void *data,
+			    struct ibmad_port *srcport);
+MAD_EXPORT void *mad_receive_via(void *umad, int timeout,
+				 struct ibmad_port *srcport);
+MAD_EXPORT int mad_respond_via(void *umad, ib_portid_t * portid,
+			       uint32_t rstatus, struct ibmad_port *srcport);
+MAD_EXPORT void *mad_alloc(void);
+MAD_EXPORT void mad_free(void *umad);
 
 /* vendor.c */
-uint8_t *ib_vendor_call(void *data, ib_portid_t *portid,
-			ib_vendor_call_t *call);
+MAD_EXPORT uint8_t *ib_vendor_call(void *data, ib_portid_t * portid,
+				   ib_vendor_call_t * call) DEPRECATED;
+
+/* vendor.c new interface */
+MAD_EXPORT uint8_t *ib_vendor_call_via(void *data, ib_portid_t * portid,
+				       ib_vendor_call_t * call,
+				       struct ibmad_port *srcport);
 
-static inline int
-mad_is_vendor_range1(int mgmt)
+static inline int mad_is_vendor_range1(int mgmt)
 {
 	return mgmt >= 0x9 && mgmt <= 0xf;
 }
 
-static inline int
-mad_is_vendor_range2(int mgmt)
+static inline int mad_is_vendor_range2(int mgmt)
 {
 	return mgmt >= 0x30 && mgmt <= 0x4f;
 }
 
 /* rpc.c */
-int	madrpc_portid(void);
-int	madrpc_set_retries(int retries);
-int	madrpc_set_timeout(int timeout);
-void *	madrpc(ib_rpc_t *rpc, ib_portid_t *dport, void *payload, void *rcvdata);
-void *  madrpc_rmpp(ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp,
-		    void *data);
-void	madrpc_init(char *dev_name, int dev_port, int *mgmt_classes,
-		    int num_classes);
-void	madrpc_save_mad(void *madbuf, int len);
-void	madrpc_lock(void);
-void	madrpc_unlock(void);
-void	madrpc_show_errors(int set);
-
-void *	mad_rpc_open_port(char *dev_name, int dev_port, int *mgmt_classes,
-			  int num_classes);
-void	mad_rpc_close_port(void *ibmad_port);
-void *	mad_rpc(const void *ibmad_port, ib_rpc_t *rpc, ib_portid_t *dport,
-		void *payload, void *rcvdata);
-void *  mad_rpc_rmpp(const void *ibmad_port, ib_rpc_t *rpc, ib_portid_t *dport,
-		     ib_rmpp_hdr_t *rmpp, void *data);
+MAD_EXPORT int madrpc_portid(void) DEPRECATED;
+void *madrpc(ib_rpc_t * rpc, ib_portid_t * dport, void *payload, void *rcvdata)
+    DEPRECATED;
+void *madrpc_rmpp(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
+		  void *data) DEPRECATED;
+MAD_EXPORT void madrpc_init(char *dev_name, int dev_port, int *mgmt_classes,
+			    int num_classes) DEPRECATED;
+void madrpc_save_mad(void *madbuf, int len) DEPRECATED;
 
 /* smp.c */
-uint8_t * smp_query(void *buf, ib_portid_t *id, unsigned attrid, unsigned mod,
-		    unsigned timeout);
-uint8_t * smp_set(void *buf, ib_portid_t *id, unsigned attrid, unsigned mod,
-		  unsigned timeout);
-uint8_t * smp_query_via(void *buf, ib_portid_t *id, unsigned attrid,
-			unsigned mod, unsigned timeout, const void *srcport);
-uint8_t * smp_set_via(void *buf, ib_portid_t *id, unsigned attrid, unsigned mod,
-		      unsigned timeout, const void *srcport);
-
-inline static uint8_t *
-safe_smp_query(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	       unsigned timeout)
-{
-	uint8_t *p;
+MAD_EXPORT uint8_t *smp_query(void *buf, ib_portid_t * id, unsigned attrid,
+			      unsigned mod, unsigned timeout) DEPRECATED;
+MAD_EXPORT uint8_t *smp_set(void *buf, ib_portid_t * id, unsigned attrid,
+			    unsigned mod, unsigned timeout) DEPRECATED;
+
+/* smp.c new interface */
+MAD_EXPORT uint8_t *smp_query_via(void *buf, ib_portid_t * id, unsigned attrid,
+				  unsigned mod, unsigned timeout,
+				  const struct ibmad_port *srcport);
+MAD_EXPORT uint8_t *smp_set_via(void *buf, ib_portid_t * id, unsigned attrid,
+				unsigned mod, unsigned timeout,
+				const struct ibmad_port *srcport);
+MAD_EXPORT uint8_t *smp_query_status_via(void *rcvbuf, ib_portid_t * portid,
+					 unsigned attrid, unsigned mod,
+					 unsigned timeout, int *rstatus,
+					 const struct ibmad_port *srcport);
+MAD_EXPORT uint8_t *smp_set_status_via(void *data, ib_portid_t * portid,
+				       unsigned attrid, unsigned mod,
+				       unsigned timeout, int *rstatus,
+				       const struct ibmad_port *srcport);
+MAD_EXPORT void smp_mkey_set(struct ibmad_port *srcport, uint64_t mkey);
+MAD_EXPORT uint64_t smp_mkey_get(const struct ibmad_port *srcport);
+
+/* cc.c */
+MAD_EXPORT void *cc_query_status_via(void *rcvbuf, ib_portid_t * portid,
+				     unsigned attrid, unsigned mod, unsigned timeout,
+				     int *rstatus, const struct ibmad_port * srcport,
+				     uint64_t cckey);
+
+MAD_EXPORT void *cc_config_status_via(void *payload, void *rcvbuf, ib_portid_t * portid,
+				      unsigned attrid, unsigned mod, unsigned timeout,
+				      int *rstatus, const struct ibmad_port * srcport,
+				      uint64_t cckey);
 
-	madrpc_lock();
-	p = smp_query(rcvbuf, portid, attrid, mod, timeout);
-	madrpc_unlock();
+/* sa.c */
+uint8_t *sa_call(void *rcvbuf, ib_portid_t * portid, ib_sa_call_t * sa,
+		 unsigned timeout) DEPRECATED;
+MAD_EXPORT int ib_path_query(ibmad_gid_t srcgid, ibmad_gid_t destgid,
+			     ib_portid_t * sm_id, void *buf) DEPRECATED;
+
+/* sa.c new interface */
+MAD_EXPORT uint8_t *sa_rpc_call(const struct ibmad_port *srcport, void *rcvbuf,
+				ib_portid_t * portid, ib_sa_call_t * sa,
+				unsigned timeout);
+MAD_EXPORT int ib_path_query_via(const struct ibmad_port *srcport,
+				 ibmad_gid_t srcgid, ibmad_gid_t destgid,
+				 ib_portid_t * sm_id, void *buf);
+	/* returns lid */
 
-	return p;
-}
+/* resolve.c */
+MAD_EXPORT int ib_resolve_smlid(ib_portid_t * sm_id, int timeout) DEPRECATED;
+MAD_EXPORT int ib_resolve_portid_str(ib_portid_t * portid, char *addr_str,
+				     enum MAD_DEST dest, ib_portid_t * sm_id)
+    DEPRECATED;
+MAD_EXPORT int ib_resolve_self(ib_portid_t * portid, int *portnum,
+			       ibmad_gid_t * gid) DEPRECATED;
+
+/* resolve.c new interface */
+MAD_EXPORT int ib_resolve_smlid_via(ib_portid_t * sm_id, int timeout,
+				    const struct ibmad_port *srcport);
+MAD_EXPORT int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid,
+				   ib_portid_t * sm_id, int timeout,
+				   const struct ibmad_port *srcport);
+MAD_EXPORT int ib_resolve_gid_via(ib_portid_t * portid, ibmad_gid_t gid,
+				  ib_portid_t * sm_id, int timeout,
+				  const struct ibmad_port *srcport);
+MAD_EXPORT int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str,
+					 enum MAD_DEST dest,
+					 ib_portid_t * sm_id,
+					 const struct ibmad_port *srcport);
+MAD_EXPORT int ib_resolve_self_via(ib_portid_t * portid, int *portnum,
+				   ibmad_gid_t * gid,
+				   const struct ibmad_port *srcport);
+
+/* gs.c new interface */
+MAD_EXPORT uint8_t *pma_query_via(void *rcvbuf, ib_portid_t * dest, int port,
+				  unsigned timeout, unsigned id,
+				  const struct ibmad_port *srcport);
+MAD_EXPORT uint8_t *performance_reset_via(void *rcvbuf, ib_portid_t * dest,
+					  int port, unsigned mask,
+					  unsigned timeout, unsigned id,
+					  const struct ibmad_port *srcport);
+
+/* bm.c */
+MAD_EXPORT uint8_t *bm_call_via(void *data, ib_portid_t * portid,
+				ib_bm_call_t * call,
+				struct ibmad_port *srcport);
 
-inline static uint8_t *
-safe_smp_set(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	     unsigned timeout)
+/* dump.c */
+MAD_EXPORT ib_mad_dump_fn
+    mad_dump_int, mad_dump_uint, mad_dump_hex, mad_dump_rhex,
+    mad_dump_bitfield, mad_dump_array, mad_dump_string,
+    mad_dump_linkwidth, mad_dump_linkwidthsup, mad_dump_linkwidthen,
+    mad_dump_linkdowndefstate,
+    mad_dump_linkspeed, mad_dump_linkspeedsup, mad_dump_linkspeeden,
+    mad_dump_linkspeedext, mad_dump_linkspeedextsup, mad_dump_linkspeedexten,
+    mad_dump_portstate, mad_dump_portstates,
+    mad_dump_physportstate, mad_dump_portcapmask,
+    mad_dump_mtu, mad_dump_vlcap, mad_dump_opervls,
+    mad_dump_node_type, mad_dump_sltovl, mad_dump_vlarbitration,
+    mad_dump_nodedesc, mad_dump_nodeinfo, mad_dump_portinfo,
+    mad_dump_switchinfo, mad_dump_perfcounters, mad_dump_perfcounters_ext,
+    mad_dump_perfcounters_xmt_sl, mad_dump_perfcounters_rcv_sl,
+    mad_dump_perfcounters_xmt_disc, mad_dump_perfcounters_rcv_err,
+    mad_dump_portsamples_control, mad_dump_port_ext_speeds_counters,
+    mad_dump_perfcounters_port_op_rcv_counters, mad_dump_perfcounters_port_flow_ctl_counters,
+    mad_dump_perfcounters_port_vl_op_packet, mad_dump_perfcounters_port_vl_op_data,
+    mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors, mad_dump_perfcounters_port_vl_xmit_wait_counters,
+    mad_dump_perfcounters_sw_port_vl_congestion, mad_dump_perfcounters_rcv_con_ctrl,
+    mad_dump_perfcounters_sl_rcv_fecn, mad_dump_perfcounters_sl_rcv_becn,
+    mad_dump_perfcounters_xmit_con_ctrl, mad_dump_perfcounters_vl_xmit_time_cong,
+    mad_dump_mlnx_ext_port_info, mad_dump_cc_congestioninfo, mad_dump_cc_congestionkeyinfo,
+    mad_dump_cc_congestionlog, mad_dump_cc_congestionlogswitch,
+    mad_dump_cc_congestionlogentryswitch, mad_dump_cc_congestionlogca,
+    mad_dump_cc_congestionlogentryca, mad_dump_cc_switchcongestionsetting,
+    mad_dump_cc_switchportcongestionsettingelement, mad_dump_cc_cacongestionsetting,
+    mad_dump_cc_cacongestionentry, mad_dump_cc_congestioncontroltable,
+    mad_dump_cc_congestioncontroltableentry, mad_dump_cc_timestamp,
+    mad_dump_classportinfo;
+
+MAD_EXPORT void mad_dump_fields(char *buf, int bufsz, void *val, int valsz,
+				int start, int end);
+
+extern MAD_EXPORT int ibdebug;
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifndef ntohll
+static inline uint64_t ntohll(uint64_t x)
 {
-	uint8_t *p;
-
-	madrpc_lock();
-	p = smp_set(rcvbuf, portid, attrid, mod, timeout);
-	madrpc_unlock();
-
-	return p;
+	return bswap_64(x);
 }
-
-/* sa.c */
-uint8_t * sa_call(void *rcvbuf, ib_portid_t *portid, ib_sa_call_t *sa,
-		  unsigned timeout);
-uint8_t * sa_rpc_call(const void *ibmad_port, void *rcvbuf, ib_portid_t *portid,
-                      ib_sa_call_t *sa, unsigned timeout);
-int	ib_path_query(ibmad_gid_t srcgid, ibmad_gid_t destgid, ib_portid_t *sm_id,
-		      void *buf);	/* returns lid */
-int	ib_path_query_via(const void *srcport, ibmad_gid_t srcgid,
-			  ibmad_gid_t destgid, ib_portid_t *sm_id, void *buf);
-
-inline static uint8_t *
-safe_sa_call(void *rcvbuf, ib_portid_t *portid, ib_sa_call_t *sa,
-	     unsigned timeout)
+#endif
+#ifndef htonll
+static inline uint64_t htonll(uint64_t x)
 {
-	uint8_t *p;
-
-	madrpc_lock();
-	p = sa_call(rcvbuf, portid, sa, timeout);
-	madrpc_unlock();
-
-	return p;
+	return bswap_64(x);
 }
-
-/* resolve.c */
-int	ib_resolve_smlid(ib_portid_t *sm_id, int timeout);
-int	ib_resolve_guid(ib_portid_t *portid, uint64_t *guid,
-			ib_portid_t *sm_id, int timeout);
-int	ib_resolve_portid_str(ib_portid_t *portid, char *addr_str,
-			      int dest_type, ib_portid_t *sm_id);
-int	ib_resolve_self(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid);
-
-int	ib_resolve_smlid_via(ib_portid_t *sm_id, int timeout,
-			     const void *srcport);
-int	ib_resolve_guid_via(ib_portid_t *portid, uint64_t *guid,
-			    ib_portid_t *sm_id, int timeout,
-			    const void *srcport);
-int	ib_resolve_portid_str_via(ib_portid_t *portid, char *addr_str,
-			          int dest_type, ib_portid_t *sm_id,
-				  const void *srcport);
-int	ib_resolve_self_via(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid,
-			    const void *srcport);
-
-/* gs.c */
-uint8_t *perf_classportinfo_query(void *rcvbuf, ib_portid_t *dest, int port,
-				  unsigned timeout);
-uint8_t *port_performance_query(void *rcvbuf, ib_portid_t *dest, int port,
-				unsigned timeout);
-uint8_t *port_performance_reset(void *rcvbuf, ib_portid_t *dest, int port,
-				unsigned mask, unsigned timeout);
-uint8_t *port_performance_ext_query(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned timeout);
-uint8_t *port_performance_ext_reset(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned mask, unsigned timeout);
-uint8_t *port_samples_control_query(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned timeout);
-uint8_t *port_samples_result_query(void *rcvbuf, ib_portid_t *dest, int port,
-				   unsigned timeout);
-
-uint8_t *perf_classportinfo_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-				  unsigned timeout, const void *srcport);
-uint8_t *port_performance_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-				unsigned timeout, const void *srcport);
-uint8_t *port_performance_reset_via(void *rcvbuf, ib_portid_t *dest, int port,
-				unsigned mask, unsigned timeout, const void *srcport);
-uint8_t *port_performance_ext_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned timeout, const void *srcport);
-uint8_t *port_performance_ext_reset_via(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned mask, unsigned timeout, const void *srcport);
-uint8_t *port_samples_control_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-				    unsigned timeout, const void *srcport);
-uint8_t *port_samples_result_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-				   unsigned timeout, const void *srcport);
-/* dump.c */
-ib_mad_dump_fn
-	mad_dump_int, mad_dump_uint, mad_dump_hex, mad_dump_rhex,
-	mad_dump_bitfield, mad_dump_array, mad_dump_string,
-	mad_dump_linkwidth, mad_dump_linkwidthsup, mad_dump_linkwidthen,
-	mad_dump_linkdowndefstate,
-	mad_dump_linkspeed, mad_dump_linkspeedsup, mad_dump_linkspeeden,
-	mad_dump_portstate, mad_dump_portstates,
-	mad_dump_physportstate, mad_dump_portcapmask,
-	mad_dump_mtu, mad_dump_vlcap, mad_dump_opervls,
-	mad_dump_node_type,
-	mad_dump_sltovl, mad_dump_vlarbitration,
-	mad_dump_nodedesc, mad_dump_nodeinfo, mad_dump_portinfo, mad_dump_switchinfo,
-	mad_dump_perfcounters, mad_dump_perfcounters_ext;
-
-int	_mad_dump(ib_mad_dump_fn *fn, char *name, void *val, int valsz);
-char *	_mad_dump_field(ib_field_t *f, char *name, char *buf, int bufsz,
-			void *val);
-int	_mad_print_field(ib_field_t *f, char *name, void *val, int valsz);
-char *	_mad_dump_val(ib_field_t *f, char *buf, int bufsz, void *val);
-
-static inline int
-mad_print_field(int field, char *name, void *val)
+#endif
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#ifndef ntohll
+static inline uint64_t ntohll(uint64_t x)
 {
-	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
-		return -1;
-	return _mad_print_field(ib_mad_f + field, name, val, 0);
+	return x;
 }
-
-static inline char *
-mad_dump_field(int field, char *buf, int bufsz, void *val)
+#endif
+#ifndef htonll
+static inline uint64_t htonll(uint64_t x)
 {
-	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
-		return 0;
-	return _mad_dump_field(ib_mad_f + field, 0, buf, bufsz, val);
+	return x;
 }
+#endif
+#endif				/* __BYTE_ORDER == __BIG_ENDIAN */
 
-static inline char *
-mad_dump_val(int field, char *buf, int bufsz, void *val)
-{
-	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
-		return 0;
-	return _mad_dump_val(ib_mad_f + field, buf, bufsz, val);
-}
+/* Misc. macros: */
+/** align value \a l to \a size (ceil) */
+#define ALIGN(l, size) (((l) + ((size) - 1)) / (size) * (size))
 
-extern int ibdebug;
+/** printf style warning MACRO, includes name of function and pid */
+#define IBWARN(fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)
 
-END_C_DECLS
+#define IBDEBUG(fmt, ...) fprintf(stdout, "ibdebug: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)
+
+#define IBVERBOSE(fmt, ...) fprintf(stdout, "[%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)
 
-#endif /* _MAD_H_ */
+#define IBPANIC(fmt, ...) do { \
+	fprintf(stderr, "ibpanic: [%d] %s: " fmt ": %m\n", getpid(), __func__, ## __VA_ARGS__); \
+	exit(-1); \
+} while(0)
+
+MAD_EXPORT void xdump(FILE * file, char *msg, void *p, int size);
+
+END_C_DECLS
+#endif				/* _MAD_H_ */
diff --git a/include/infiniband/mad_osd.h b/include/infiniband/mad_osd.h
new file mode 100644
index 0000000..923be55
--- /dev/null
+++ b/include/infiniband/mad_osd.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2004-2009 Voltaire Inc.  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.
+ *
+ */
+#ifndef _MAD_OSD_H_
+#define _MAD_OSD_H_
+
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <byteswap.h>
+#include <inttypes.h>
+#include <arpa/inet.h>
+
+#define MAD_EXPORT
+#define DEPRECATED __attribute__ ((deprecated))
+
+#endif				/* _MAD_OSD_H_ */
diff --git a/libibmad.spec b/libibmad.spec
index 2eb7b49..dd5fc02 100644
--- a/libibmad.spec
+++ b/libibmad.spec
@@ -1,15 +1,15 @@
 
-%define RELEASE 1.ofed1.4.1
-%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
+%define RELEASE 1
+%define rel %{?CUSTOM_RELEASE}%{!?CUSTOM_RELEASE:%RELEASE}
 
 Summary: OpenFabrics Alliance InfiniBand MAD library
 Name: libibmad
-Version: 1.2.3_20090314
+Version: 1.3.9
 Release: %rel%{?dist}
 License: GPLv2 or BSD
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Source: http://www.openfabrics.org/downloads/management/libibmad-1.2.3_20090314.tar.gz
+Source: http://www.openfabrics.org/downloads/management/libibmad-1.3.9.tar.gz
 Url: http://openfabrics.org/
 BuildRequires: libibumad-devel, libtool
 Requires(post): /sbin/ldconfig
diff --git a/libibmad.spec.in b/libibmad.spec.in
index 5fd10f6..1b556aa 100644
--- a/libibmad.spec.in
+++ b/libibmad.spec.in
@@ -1,6 +1,6 @@
 
 %define RELEASE @RELEASE@
-%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
+%define rel %{?CUSTOM_RELEASE}%{!?CUSTOM_RELEASE:%RELEASE}
 
 Summary: OpenFabrics Alliance InfiniBand MAD library
 Name: libibmad
diff --git a/libibmad.ver b/libibmad.ver
index 51f2b71..7315f62 100644
--- a/libibmad.ver
+++ b/libibmad.ver
@@ -6,4 +6,4 @@
 # API_REV - advance on any added API
 # RUNNING_REV - advance any change to the vendor files
 # AGE - number of backward versions the API still supports
-LIBVERSION=4:0:3
+LIBVERSION=8:1:3
diff --git a/src/vendor.c b/src/bm.c
similarity index 56%
copy from src/vendor.c
copy to src/bm.c
index 468e2d3..3181451 100644
--- a/src/vendor.c
+++ b/src/bm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004,2005 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  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
@@ -33,67 +33,75 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-static inline int
-response_expected(int method)
+static inline int response_expected(int method)
 {
 	return method == IB_MAD_METHOD_GET ||
-		method == IB_MAD_METHOD_SET ||
-		method == IB_MAD_METHOD_TRAP;
+	    method == IB_MAD_METHOD_SET || method == IB_MAD_METHOD_TRAP;
 }
 
-uint8_t *
-ib_vendor_call(void *data, ib_portid_t *portid, ib_vendor_call_t *call)
+uint8_t *bm_call_via(void *data, ib_portid_t * portid, ib_bm_call_t * call,
+		     struct ibmad_port * srcport)
 {
-	ib_rpc_t rpc = {0};
-	int range1 = 0, resp_expected;
+	ib_rpc_t rpc = { 0 };
+	int resp_expected;
+	struct {
+		uint64_t bkey;
+		uint8_t reserved[32];
+		uint8_t data[IB_BM_DATA_SZ];
+	} bm_data;
 
 	DEBUG("route %s data %p", portid2str(portid), data);
-	if (portid->lid <= 0)
-		return 0;	/* no direct SMI */
-
-	if (!(range1 = mad_is_vendor_range1(call->mgmt_class)) &&
-	    !(mad_is_vendor_range2(call->mgmt_class)))
-		return 0;
+	if (portid->lid <= 0) {
+		IBWARN("only lid routes are supported");
+		return NULL;
+	}
 
 	resp_expected = response_expected(call->method);
 
-	rpc.mgtclass = call->mgmt_class;
+	rpc.mgtclass = IB_BOARD_MGMT_CLASS;
 
 	rpc.method = call->method;
 	rpc.attr.id = call->attrid;
 	rpc.attr.mod = call->mod;
 	rpc.timeout = resp_expected ? call->timeout : 0;
-	rpc.datasz = range1 ? IB_VENDOR_RANGE1_DATA_SIZE : IB_VENDOR_RANGE2_DATA_SIZE;
-	rpc.dataoffs = range1 ? IB_VENDOR_RANGE1_DATA_OFFS : IB_VENDOR_RANGE2_DATA_OFFS;
+	// send data and bkey
+	rpc.datasz = IB_BM_BKEY_AND_DATA_SZ;
+	rpc.dataoffs = IB_BM_BKEY_OFFS;
 
-	if (!range1)
-		rpc.oui = call->oui;
+	// copy data to a buffer which also includes the bkey
+	bm_data.bkey = htonll(call->bkey);
+	memset(bm_data.reserved, 0, sizeof(bm_data.reserved));
+	memcpy(bm_data.data, data, IB_BM_DATA_SZ);
 
-	DEBUG("class 0x%x method 0x%x attr 0x%x mod 0x%x datasz %d off %d res_ex %d",
-		rpc.mgtclass, rpc.method, rpc.attr.id, rpc.attr.mod,
-		rpc.datasz, rpc.dataoffs, resp_expected);
+	DEBUG
+	    ("method 0x%x attr 0x%x mod 0x%x datasz %d off %d res_ex %d bkey 0x%08x%08x",
+	     rpc.method, rpc.attr.id, rpc.attr.mod, rpc.datasz, rpc.dataoffs,
+	     resp_expected, (int)(call->bkey >> 32), (int)call->bkey);
 
 	portid->qp = 1;
 	if (!portid->qkey)
 		portid->qkey = IB_DEFAULT_QP1_QKEY;
 
-	if (resp_expected)
-		return madrpc_rmpp(&rpc, portid, 0, data);		/* FIXME: no RMPP for now */
+	if (resp_expected) {
+		/* FIXME: no RMPP for now */
+		if (mad_rpc(srcport, &rpc, portid, &bm_data, &bm_data))
+			goto return_ok;
+		return NULL;
+	}
+
+	if (mad_send_via(&rpc, portid, 0, &bm_data, srcport) < 0)
+		return NULL;
 
-	return mad_send(&rpc, portid, 0, data) < 0 ? 0 : data;		/* FIXME: no RMPP for now */
+return_ok:
+	memcpy(data, bm_data.data, IB_BM_DATA_SZ);
+	return data;
 }
diff --git a/src/smp.c b/src/cc.c
similarity index 52%
copy from src/smp.c
copy to src/cc.c
index 2c2bde2..cae174e 100644
--- a/src/smp.c
+++ b/src/cc.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2011 Lawrence Livermore National Lab.  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
@@ -33,91 +33,86 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-uint8_t *
-smp_set_via(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsigned timeout, const void *srcport)
+void *cc_query_status_via(void *rcvbuf, ib_portid_t * portid,
+			  unsigned attrid, unsigned mod, unsigned timeout,
+			  int *rstatus, const struct ibmad_port * srcport,
+			  uint64_t cckey)
 {
-	ib_rpc_t rpc = {0};
+	ib_rpc_cc_t rpc = { 0 };
+	void *res;
 
 	DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid));
-	if ((portid->lid <= 0) ||
-	    (portid->drpath.drslid == 0xffff) ||
-	    (portid->drpath.drdlid == 0xffff))
-		rpc.mgtclass = IB_SMI_DIRECT_CLASS;	/* direct SMI */
-	else
-		rpc.mgtclass = IB_SMI_CLASS;		/* Lid routed SMI */
-
-	rpc.method = IB_MAD_METHOD_SET;
+	rpc.method = IB_MAD_METHOD_GET;
 	rpc.attr.id = attrid;
 	rpc.attr.mod = mod;
 	rpc.timeout = timeout;
-	rpc.datasz = IB_SMP_DATA_SIZE;
-	rpc.dataoffs = IB_SMP_DATA_OFFS;
+	if (attrid == IB_CC_ATTR_CONGESTION_LOG) {
+		rpc.datasz = IB_CC_LOG_DATA_SZ;
+		rpc.dataoffs = IB_CC_LOG_DATA_OFFS;
+	}
+	else {
+		rpc.datasz = IB_CC_DATA_SZ;
+		rpc.dataoffs = IB_CC_DATA_OFFS;
+	}
+	rpc.mgtclass = IB_CC_CLASS;
+	rpc.cckey = cckey;
 
-	portid->sl = 0;
-	portid->qp = 0;
+	portid->qp = 1;
+	if (!portid->qkey)
+		portid->qkey = IB_DEFAULT_QP1_QKEY;
 
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, portid, data, data);
-	} else {
-		return madrpc(&rpc, portid, data, data);
-	}
-}
+	res = mad_rpc(srcport, (ib_rpc_t *)&rpc, portid, rcvbuf, rcvbuf);
+	if (rstatus)
+		*rstatus = rpc.rstatus;
 
-uint8_t *
-smp_set(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsigned timeout)
-{
-	return smp_set_via(data, portid, attrid, mod, timeout, NULL);
+	return res;
 }
 
-uint8_t *
-smp_query_via(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	      unsigned timeout, const void *srcport)
+void *cc_config_status_via(void *payload, void *rcvbuf, ib_portid_t * portid,
+                           unsigned attrid, unsigned mod, unsigned timeout,
+                           int *rstatus, const struct ibmad_port * srcport,
+                           uint64_t cckey)
 {
-	ib_rpc_t rpc = {0};
+	ib_rpc_cc_t rpc = { 0 };
+	void *res;
 
 	DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid));
-	rpc.method = IB_MAD_METHOD_GET;
+	rpc.method = IB_MAD_METHOD_SET;
 	rpc.attr.id = attrid;
 	rpc.attr.mod = mod;
 	rpc.timeout = timeout;
-	rpc.datasz = IB_SMP_DATA_SIZE;
-	rpc.dataoffs = IB_SMP_DATA_OFFS;
-
-	if ((portid->lid <= 0) ||
-	    (portid->drpath.drslid == 0xffff) ||
-	    (portid->drpath.drdlid == 0xffff))
-		rpc.mgtclass = IB_SMI_DIRECT_CLASS;	/* direct SMI */
-	else
-		rpc.mgtclass = IB_SMI_CLASS;		/* Lid routed SMI */
-
-	portid->sl = 0;
-	portid->qp = 0;
-
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, portid, 0, rcvbuf);
-	} else {
-		return madrpc(&rpc, portid, 0, rcvbuf);
+	if (attrid == IB_CC_ATTR_CONGESTION_LOG) {
+		rpc.datasz = IB_CC_LOG_DATA_SZ;
+		rpc.dataoffs = IB_CC_LOG_DATA_OFFS;
 	}
-}
+	else {
+		rpc.datasz = IB_CC_DATA_SZ;
+		rpc.dataoffs = IB_CC_DATA_OFFS;
+	}
+	rpc.mgtclass = IB_CC_CLASS;
+	rpc.cckey = cckey;
 
-uint8_t *
-smp_query(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	  unsigned timeout)
-{
-	return smp_query_via(rcvbuf, portid, attrid, mod, timeout, NULL);
+	portid->qp = 1;
+	if (!portid->qkey)
+		portid->qkey = IB_DEFAULT_QP1_QKEY;
+
+	res = mad_rpc(srcport, (ib_rpc_t *)&rpc, portid, payload, rcvbuf);
+	if (rstatus)
+		*rstatus = rpc.rstatus;
+
+	return res;
 }
+
+
diff --git a/src/dump.c b/src/dump.c
index 052127f..9937a82 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -1,6 +1,8 @@
 /*
- * Copyright (c) 2004-2008 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
  * Copyright (c) 2007 Xsigo Systems Inc.  All rights reserved.
+ * Copyright (c) 2009-2011 Mellanox Technologies LTD.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  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
@@ -34,37 +36,32 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <inttypes.h>
-#include <netinet/in.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
 
-void
-mad_dump_int(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_int(char *buf, int bufsz, void *val, int valsz)
 {
 	switch (valsz) {
 	case 1:
-		snprintf(buf, bufsz, "%d", *(uint8_t *)val);
+		snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xff);
 		break;
 	case 2:
-		snprintf(buf, bufsz, "%d", *(uint16_t *)val);
+		snprintf(buf, bufsz, "%d", *(uint32_t *) val & 0xffff);
 		break;
 	case 3:
 	case 4:
-		snprintf(buf, bufsz, "%d", *(uint32_t *)val);
+		snprintf(buf, bufsz, "%d", *(uint32_t *) val);
 		break;
 	case 5:
 	case 6:
 	case 7:
 	case 8:
-		snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *)val);
+		snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val);
 		break;
 	default:
 		IBWARN("bad int sz %d", valsz);
@@ -72,25 +69,24 @@ mad_dump_int(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_uint(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_uint(char *buf, int bufsz, void *val, int valsz)
 {
 	switch (valsz) {
 	case 1:
-		snprintf(buf, bufsz, "%u", *(uint8_t *)val);
+		snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xff);
 		break;
 	case 2:
-		snprintf(buf, bufsz, "%u", *(uint16_t *)val);
+		snprintf(buf, bufsz, "%u", *(uint32_t *) val & 0xffff);
 		break;
 	case 3:
 	case 4:
-		snprintf(buf, bufsz, "%u", *(uint32_t *)val);
+		snprintf(buf, bufsz, "%u", *(uint32_t *) val);
 		break;
 	case 5:
 	case 6:
 	case 7:
 	case 8:
-		snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *)val);
+		snprintf(buf, bufsz, "%" PRIu64, *(uint64_t *) val);
 		break;
 	default:
 		IBWARN("bad int sz %u", valsz);
@@ -98,33 +94,35 @@ mad_dump_uint(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_hex(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_hex(char *buf, int bufsz, void *val, int valsz)
 {
 	switch (valsz) {
 	case 1:
-		snprintf(buf, bufsz, "0x%02x", *(uint8_t *)val);
+		snprintf(buf, bufsz, "0x%02x", *(uint32_t *) val & 0xff);
 		break;
 	case 2:
-		snprintf(buf, bufsz, "0x%04x", *(uint16_t *)val);
+		snprintf(buf, bufsz, "0x%04x", *(uint32_t *) val & 0xffff);
 		break;
 	case 3:
-		snprintf(buf, bufsz, "0x%06x", *(uint32_t *)val & 0xffffff);
+		snprintf(buf, bufsz, "0x%06x", *(uint32_t *) val & 0xffffff);
 		break;
 	case 4:
-		snprintf(buf, bufsz, "0x%08x", *(uint32_t *)val);
+		snprintf(buf, bufsz, "0x%08x", *(uint32_t *) val);
 		break;
 	case 5:
-		snprintf(buf, bufsz, "0x%010" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffllu);
+		snprintf(buf, bufsz, "0x%010" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffULL);
 		break;
 	case 6:
-		snprintf(buf, bufsz, "0x%012" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffffllu);
+		snprintf(buf, bufsz, "0x%012" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffffULL);
 		break;
 	case 7:
-		snprintf(buf, bufsz, "0x%014" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffffffllu);
+		snprintf(buf, bufsz, "0x%014" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffffffULL);
 		break;
 	case 8:
-		snprintf(buf, bufsz, "0x%016" PRIx64, *(uint64_t *)val);
+		snprintf(buf, bufsz, "0x%016" PRIx64, *(uint64_t *) val);
 		break;
 	default:
 		IBWARN("bad int sz %d", valsz);
@@ -132,33 +130,35 @@ mad_dump_hex(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_rhex(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_rhex(char *buf, int bufsz, void *val, int valsz)
 {
 	switch (valsz) {
 	case 1:
-		snprintf(buf, bufsz, "%02x", *(uint8_t *)val);
+		snprintf(buf, bufsz, "%02x", *(uint32_t *) val & 0xff);
 		break;
 	case 2:
-		snprintf(buf, bufsz, "%04x", *(uint16_t *)val);
+		snprintf(buf, bufsz, "%04x", *(uint32_t *) val & 0xffff);
 		break;
 	case 3:
-		snprintf(buf, bufsz, "%06x", *(uint32_t *)val & 0xffffff);
+		snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
 		break;
 	case 4:
-		snprintf(buf, bufsz, "%08x", *(uint32_t *)val);
+		snprintf(buf, bufsz, "%08x", *(uint32_t *) val);
 		break;
 	case 5:
-		snprintf(buf, bufsz, "%010" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffllu);
+		snprintf(buf, bufsz, "%010" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffULL);
 		break;
 	case 6:
-		snprintf(buf, bufsz, "%012" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffffllu);
+		snprintf(buf, bufsz, "%012" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffffULL);
 		break;
 	case 7:
-		snprintf(buf, bufsz, "%014" PRIx64, *(uint64_t *)val & (uint64_t) 0xffffffffffffffllu);
+		snprintf(buf, bufsz, "%014" PRIx64,
+			 *(uint64_t *) val & (uint64_t) 0xffffffffffffffULL);
 		break;
 	case 8:
-		snprintf(buf, bufsz, "%016" PRIx64, *(uint64_t *)val);
+		snprintf(buf, bufsz, "%016" PRIx64, *(uint64_t *) val);
 		break;
 	default:
 		IBWARN("bad int sz %d", valsz);
@@ -166,8 +166,7 @@ mad_dump_rhex(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_linkwidth(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkwidth(char *buf, int bufsz, void *val, int valsz)
 {
 	int width = *(int *)val;
 
@@ -190,8 +189,7 @@ mad_dump_linkwidth(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-static void
-dump_linkwidth(char *buf, int bufsz, int width)
+static void dump_linkwidth(char *buf, int bufsz, int width)
 {
 	int n = 0;
 
@@ -209,17 +207,16 @@ dump_linkwidth(char *buf, int bufsz, int width)
 	else if (width == 0 || (width >> 4))
 		snprintf(buf + n, bufsz - n, "undefined (%d)", width);
 	else if (bufsz > 3)
-		buf[n-4] = '\0';
+		buf[n - 4] = '\0';
 }
 
-void
-mad_dump_linkwidthsup(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkwidthsup(char *buf, int bufsz, void *val, int valsz)
 {
 	int width = *(int *)val;
 
 	dump_linkwidth(buf, bufsz, width);
 
-	switch(width) {
+	switch (width) {
 	case 1:
 	case 3:
 	case 7:
@@ -235,20 +232,21 @@ mad_dump_linkwidthsup(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_linkwidthen(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkwidthen(char *buf, int bufsz, void *val, int valsz)
 {
 	int width = *(int *)val;
 
 	dump_linkwidth(buf, bufsz, width);
 }
 
-void
-mad_dump_linkspeed(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkspeed(char *buf, int bufsz, void *val, int valsz)
 {
 	int speed = *(int *)val;
 
 	switch (speed) {
+	case 0:
+		snprintf(buf, bufsz, "Extended speed");
+		break;
 	case 1:
 		snprintf(buf, bufsz, "2.5 Gbps");
 		break;
@@ -264,8 +262,7 @@ mad_dump_linkspeed(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-static void
-dump_linkspeed(char *buf, int bufsz, int speed)
+static void dump_linkspeed(char *buf, int bufsz, int speed)
 {
 	int n = 0;
 
@@ -283,7 +280,7 @@ dump_linkspeed(char *buf, int bufsz, int speed)
 		if (n >= bufsz)
 			return;
 	} else if (bufsz > 3) {
-		buf[n-4] = '\0';
+		buf[n - 4] = '\0';
 		n -= 4;
 	}
 
@@ -300,24 +297,85 @@ dump_linkspeed(char *buf, int bufsz, int speed)
 	}
 }
 
-void
-mad_dump_linkspeedsup(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkspeedsup(char *buf, int bufsz, void *val, int valsz)
 {
 	int speed = *(int *)val;
 
 	dump_linkspeed(buf, bufsz, speed);
 }
 
-void
-mad_dump_linkspeeden(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkspeeden(char *buf, int bufsz, void *val, int valsz)
 {
 	int speed = *(int *)val;
 
 	dump_linkspeed(buf, bufsz, speed);
 }
 
-void
-mad_dump_portstate(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkspeedext(char *buf, int bufsz, void *val, int valsz)
+{
+	int speed = *(int *)val;
+
+	switch (speed) {
+	case 0:
+		snprintf(buf, bufsz, "No Extended Speed");
+		break;
+	case 1:
+		snprintf(buf, bufsz, "14.0625 Gbps");
+		break;
+	case 2:
+		snprintf(buf, bufsz, "25.78125 Gbps");
+		break;
+	default:
+		snprintf(buf, bufsz, "undefined (%d)", speed);
+		break;
+	}
+}
+
+static void dump_linkspeedext(char *buf, int bufsz, int speed)
+{
+	int n = 0;
+
+	if (speed == 0) {
+		sprintf(buf, "%d", speed);
+		return;
+	}
+
+	if (speed & 0x1)
+		n += snprintf(buf + n, bufsz - n, "14.0625 Gbps or ");
+	if (n < bufsz && speed & 0x2)
+		n += snprintf(buf + n, bufsz - n, "25.78125 Gbps or ");
+	if (n >= bufsz) {
+		if (bufsz > 3)
+			buf[n - 4] = '\0';
+		return;
+	}
+
+	if (speed >> 2) {
+		n += snprintf(buf + n, bufsz - n, "undefined (%d)", speed);
+		return;
+	} else if (bufsz > 3)
+		buf[n - 4] = '\0';
+}
+
+void mad_dump_linkspeedextsup(char *buf, int bufsz, void *val, int valsz)
+{
+	int speed = *(int *)val;
+
+	dump_linkspeedext(buf, bufsz, speed);
+}
+
+void mad_dump_linkspeedexten(char *buf, int bufsz, void *val, int valsz)
+{
+	int speed = *(int *)val;
+
+	if (speed == 30) {
+		sprintf(buf, "%s", "Extended link speeds disabled");
+		return;
+	}
+	dump_linkspeedext(buf, bufsz, speed);
+}
+
+void mad_dump_portstate(char *buf, int bufsz, void *val, int valsz)
 {
 	int state = *(int *)val;
 
@@ -342,12 +400,11 @@ mad_dump_portstate(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_linkdowndefstate(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_linkdowndefstate(char *buf, int bufsz, void *val, int valsz)
 {
 	int state = *(int *)val;
 
-	switch(state) {
+	switch (state) {
 	case 0:
 		snprintf(buf, bufsz, "NoChange");
 		break;
@@ -363,8 +420,7 @@ mad_dump_linkdowndefstate(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_physportstate(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_physportstate(char *buf, int bufsz, void *val, int valsz)
 {
 	int state = *(int *)val;
 
@@ -398,8 +454,7 @@ mad_dump_physportstate(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_mtu(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_mtu(char *buf, int bufsz, void *val, int valsz)
 {
 	int mtu = *(int *)val;
 
@@ -425,8 +480,7 @@ mad_dump_mtu(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_vlcap(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_vlcap(char *buf, int bufsz, void *val, int valsz)
 {
 	int vlcap = *(int *)val;
 
@@ -451,8 +505,7 @@ mad_dump_vlcap(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_opervls(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_opervls(char *buf, int bufsz, void *val, int valsz)
 {
 	int opervls = *(int *)val;
 
@@ -480,8 +533,7 @@ mad_dump_opervls(char *buf, int bufsz, void *val, int valsz)
 	}
 }
 
-void
-mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
 {
 	unsigned mask = *(unsigned *)val;
 	char *s = buf;
@@ -493,6 +545,8 @@ mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
 		s += sprintf(s, "\t\t\t\tIsNoticeSupported\n");
 	if (mask & (1 << 3))
 		s += sprintf(s, "\t\t\t\tIsTrapSupported\n");
+	if (mask & (1 << 4))
+		s += sprintf(s, "\t\t\t\tIsOptionalIPDSupported\n");
 	if (mask & (1 << 5))
 		s += sprintf(s, "\t\t\t\tIsAutomaticMigrationSupported\n");
 	if (mask & (1 << 6))
@@ -508,7 +562,12 @@ mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
 	if (mask & (1 << 11))
 		s += sprintf(s, "\t\t\t\tIsSystemImageGUIDsupported\n");
 	if (mask & (1 << 12))
-		s += sprintf(s, "\t\t\t\tIsPkeySwitchExternalPortTrapSupported\n");
+		s += sprintf(s,
+			     "\t\t\t\tIsPkeySwitchExternalPortTrapSupported\n");
+	if (mask & (1 << 14))
+		s += sprintf(s, "\t\t\t\tIsExtendedSpeedsSupported\n");
+	if (mask & (1 << 15))
+		s += sprintf(s, "\t\t\t\tIsCapabilityMask2Supported\n");
 	if (mask & (1 << 16))
 		s += sprintf(s, "\t\t\t\tIsCommunicatonManagementSupported\n");
 	if (mask & (1 << 17))
@@ -532,33 +591,39 @@ mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
 	if (mask & (1 << 26))
 		s += sprintf(s, "\t\t\t\tIsOtherLocalChangesNoticeSupported\n");
 	if (mask & (1 << 27))
-		s += sprintf(s, "\t\t\t\tIsLinkSpeedWidthPairsTableSupported\n");
+		s += sprintf(s,
+			     "\t\t\t\tIsLinkSpeedWidthPairsTableSupported\n");
+	if (mask & (1 << 28))
+		s += sprintf(s, "\t\t\t\tIsVendorSpecificMadsTableSupported\n");
+	if (mask & (1 << 29))
+		s += sprintf(s, "\t\t\t\tIsMcastPkeyTrapSuppressionSupported\n");
+	if (mask & (1 << 30))
+		s += sprintf(s, "\t\t\t\tIsMulticastFDBTopSupported\n");
+	if (mask & (1 << 31))
+		s += sprintf(s, "\t\t\t\tIsHierarchyInfoSupported\n");
 
 	if (s != buf)
 		*(--s) = 0;
 }
 
-void
-mad_dump_bitfield(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_bitfield(char *buf, int bufsz, void *val, int valsz)
 {
-	snprintf(buf, bufsz, "0x%x", *(uint32_t *)val);
+	snprintf(buf, bufsz, "0x%x", *(uint32_t *) val);
 }
 
-void
-mad_dump_array(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_array(char *buf, int bufsz, void *val, int valsz)
 {
 	uint8_t *p = val, *e;
 	char *s = buf;
 
-	if (bufsz < valsz*2)
-		valsz = bufsz/2;
+	if (bufsz < valsz * 2)
+		valsz = bufsz / 2;
 
 	for (p = val, e = p + valsz; p < e; p++, s += 2)
 		sprintf(s, "%02x", *p);
 }
 
-void
-mad_dump_string(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_string(char *buf, int bufsz, void *val, int valsz)
 {
 	if (bufsz < valsz)
 		valsz = bufsz;
@@ -566,19 +631,18 @@ mad_dump_string(char *buf, int bufsz, void *val, int valsz)
 	snprintf(buf, valsz, "'%s'", (char *)val);
 }
 
-void
-mad_dump_node_type(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_node_type(char *buf, int bufsz, void *val, int valsz)
 {
-	int nodetype = *(int*)val;
+	int nodetype = *(int *)val;
 
 	switch (nodetype) {
- 	case 1:
+	case 1:
 		snprintf(buf, bufsz, "Channel Adapter");
 		break;
- 	case 2:
+	case 2:
 		snprintf(buf, bufsz, "Switch");
 		break;
- 	case 3:
+	case 3:
 		snprintf(buf, bufsz, "Router");
 		break;
 	default:
@@ -594,10 +658,9 @@ typedef struct _ib_slvl_table {
 	uint8_t vl_by_sl_num[IB_MAX_NUM_VLS_TO_U8];
 } ib_slvl_table_t;
 
-static inline void
-ib_slvl_get_i(ib_slvl_table_t *tbl, int i, uint8_t *vl)
+static inline void ib_slvl_get_i(ib_slvl_table_t * tbl, int i, uint8_t * vl)
 {
-	*vl = (tbl->vl_by_sl_num[i >> 1] >> ((!(i&1)) << 2)) & 0xf;
+	*vl = (tbl->vl_by_sl_num[i >> 1] >> ((!(i & 1)) << 2)) & 0xf;
 }
 
 #define IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK 32
@@ -607,18 +670,16 @@ typedef struct _ib_vl_arb_table {
 		uint8_t res_vl;
 		uint8_t weight;
 	} vl_entry[IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK];
-} __attribute__((packed)) ib_vl_arb_table_t;
+} ib_vl_arb_table_t;
 
-static inline void
-ib_vl_arb_get_vl(uint8_t res_vl, uint8_t *const vl )
+static inline void ib_vl_arb_get_vl(uint8_t res_vl, uint8_t * const vl)
 {
 	*vl = res_vl & 0x0F;
 }
 
-void
-mad_dump_sltovl(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_sltovl(char *buf, int bufsz, void *val, int valsz)
 {
-	ib_slvl_table_t* p_slvl_tbl = val;
+	ib_slvl_table_t *p_slvl_tbl = val;
 	uint8_t vl;
 	int i, n = 0;
 	n = snprintf(buf, bufsz, "|");
@@ -631,11 +692,10 @@ mad_dump_sltovl(char *buf, int bufsz, void *val, int valsz)
 	snprintf(buf + n, bufsz - n, "\n");
 }
 
-void
-mad_dump_vlarbitration(char *buf, int bufsz, void *val, int num)
+void mad_dump_vlarbitration(char *buf, int bufsz, void *val, int num)
 {
-	ib_vl_arb_table_t* p_vla_tbl = val;
-	unsigned i, n;
+	ib_vl_arb_table_t *p_vla_tbl = val;
+	int i, n;
 	uint8_t vl;
 
 	num /= sizeof(p_vla_tbl->vl_entry[0]);
@@ -663,8 +723,7 @@ mad_dump_vlarbitration(char *buf, int bufsz, void *val, int num)
 	snprintf(buf + n, bufsz - n, "\n");
 }
 
-static int
-_dump_fields(char *buf, int bufsz, void *data, int start, int end)
+static int _dump_fields(char *buf, int bufsz, void *data, int start, int end)
 {
 	char val[64];
 	char *s = buf;
@@ -672,7 +731,7 @@ _dump_fields(char *buf, int bufsz, void *data, int start, int end)
 
 	for (field = start; field < end && bufsz > 0; field++) {
 		mad_decode_field(data, field, val);
-		if (!mad_dump_field(field, s, bufsz, val))
+		if (!mad_dump_field(field, s, bufsz-1, val))
 			return -1;
 		n = strlen(s);
 		s += n;
@@ -682,11 +741,16 @@ _dump_fields(char *buf, int bufsz, void *data, int start, int end)
 		bufsz -= n;
 	}
 
-	return s - buf;
+	return (int)(s - buf);
 }
 
-void
-mad_dump_nodedesc(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_fields(char *buf, int bufsz, void *val, int valsz, int start,
+		     int end)
+{
+	_dump_fields(buf, bufsz, val, start, end);
+}
+
+void mad_dump_nodedesc(char *buf, int bufsz, void *val, int valsz)
 {
 	strncpy(buf, val, bufsz);
 
@@ -694,89 +758,380 @@ mad_dump_nodedesc(char *buf, int bufsz, void *val, int valsz)
 		buf[valsz] = 0;
 }
 
-void
-mad_dump_nodeinfo(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_nodeinfo(char *buf, int bufsz, void *val, int valsz)
 {
 	_dump_fields(buf, bufsz, val, IB_NODE_FIRST_F, IB_NODE_LAST_F);
 }
 
-void
-mad_dump_portinfo(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_portinfo(char *buf, int bufsz, void *val, int valsz)
 {
-	_dump_fields(buf, bufsz, val, IB_PORT_FIRST_F, IB_PORT_LAST_F);
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PORT_FIRST_F, IB_PORT_LAST_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val,
+		     IB_PORT_CAPMASK2_F, IB_PORT_LINK_SPEED_EXT_LAST_F);
 }
 
-void
-mad_dump_portstates(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_portstates(char *buf, int bufsz, void *val, int valsz)
 {
 	_dump_fields(buf, bufsz, val, IB_PORT_STATE_F, IB_PORT_LINK_DOWN_DEF_F);
 }
 
-void
-mad_dump_switchinfo(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_switchinfo(char *buf, int bufsz, void *val, int valsz)
 {
 	_dump_fields(buf, bufsz, val, IB_SW_FIRST_F, IB_SW_LAST_F);
 }
 
-void
-mad_dump_perfcounters(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_perfcounters(char *buf, int bufsz, void *val, int valsz)
 {
 	_dump_fields(buf, bufsz, val, IB_PC_FIRST_F, IB_PC_LAST_F);
 }
 
-void
-mad_dump_perfcounters_ext(char *buf, int bufsz, void *val, int valsz)
+void mad_dump_perfcounters_ext(char *buf, int bufsz, void *val, int valsz)
 {
 	_dump_fields(buf, bufsz, val, IB_PC_EXT_FIRST_F, IB_PC_EXT_LAST_F);
 }
 
-/************************/
+void mad_dump_perfcounters_xmt_sl(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_XMT_DATA_SL_FIRST_F,
+		     IB_PC_XMT_DATA_SL_LAST_F);
+}
+
+void mad_dump_perfcounters_rcv_sl(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
 
-char *
-_mad_dump_val(ib_field_t *f, char *buf, int bufsz, void *val)
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_RCV_DATA_SL_FIRST_F,
+		     IB_PC_RCV_DATA_SL_LAST_F);
+}
+
+void mad_dump_perfcounters_xmt_disc(char *buf, int bufsz, void *val, int valsz)
 {
-	f->def_dump_fn(buf, bufsz, val, ALIGN(f->bitlen, 8) / 8);
-	buf[bufsz - 1] = 0;
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
 
-	return buf;
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_XMT_INACT_DISC_F,
+		     IB_PC_XMT_DISC_LAST_F);
 }
 
-char *
-_mad_dump_field(ib_field_t *f, char *name, char *buf, int bufsz, void *val)
+void mad_dump_perfcounters_rcv_err(char *buf, int bufsz, void *val, int valsz)
 {
-	char dots[128];
-	int l, n;
+	int cnt;
 
-	if (bufsz <= 32)
-		return 0;		/* buf too small */
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
 
-	if (!name)
-		name = f->name;
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_RCV_LOCAL_PHY_ERR_F,
+		     IB_PC_RCV_ERR_LAST_F);
+}
 
-	l = strlen(name);
-	if (l < 32) {
-		memset(dots, '.', 32 - l);
-		dots[32 - l] = 0;
-	}
+void mad_dump_portsamples_control(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_PSC_OPCODE_F, IB_PSC_LAST_F);
+}
+
+void mad_dump_port_ext_speeds_counters(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_PESC_PORT_SELECT_F, IB_PESC_LAST_F);
+}
+
+void mad_dump_perfcounters_port_op_rcv_counters(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_OP_RCV_COUNTERS_FIRST_F,
+		     IB_PC_PORT_OP_RCV_COUNTERS_LAST_F);
+}
+
+void mad_dump_perfcounters_port_flow_ctl_counters(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_FLOW_CTL_COUNTERS_FIRST_F,
+		     IB_PC_PORT_FLOW_CTL_COUNTERS_LAST_F);
+}
+
+void mad_dump_perfcounters_port_vl_op_packet(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_VL_OP_PACKETS_FIRST_F,
+		     IB_PC_PORT_VL_OP_PACKETS_LAST_F);
+}
+
+void mad_dump_perfcounters_port_vl_op_data(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_VL_OP_DATA_FIRST_F,
+		     IB_PC_PORT_VL_OP_DATA_LAST_F);
+}
 
-	n = snprintf(buf, bufsz, "%s:%s", name, dots);
-	_mad_dump_val(f, buf + n, bufsz - n, val);
-	buf[bufsz - 1] = 0;
+void mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
 
-	return buf;
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_FIRST_F,
+		     IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_LAST_F);
 }
 
-int
-_mad_dump(ib_mad_dump_fn *fn, char *name, void *val, int valsz)
+void mad_dump_perfcounters_port_vl_xmit_wait_counters(char *buf, int bufsz, void *val, int valsz)
 {
-	ib_field_t f = { .def_dump_fn = fn, .bitlen = valsz * 8};
-	char buf[512];
+	int cnt;
 
-	return printf("%s\n", _mad_dump_field(&f, name, buf, sizeof buf, val));
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_FIRST_F,
+		     IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_LAST_F);
 }
 
-int
-_mad_print_field(ib_field_t *f, char *name, void *val, int valsz)
+void mad_dump_perfcounters_sw_port_vl_congestion(char *buf, int bufsz, void *val, int valsz)
 {
-	return _mad_dump(f->def_dump_fn, name ? name : f->name, val, valsz ? valsz : ALIGN(f->bitlen, 8) / 8);
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_SW_PORT_VL_CONGESTION_FIRST_F,
+		     IB_PC_SW_PORT_VL_CONGESTION_LAST_F);
+}
+
+void mad_dump_perfcounters_rcv_con_ctrl(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_RCV_CON_CTRL_FIRST_F,
+		     IB_PC_RCV_CON_CTRL_LAST_F);
+}
+
+
+void mad_dump_perfcounters_sl_rcv_fecn(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_SL_RCV_FECN_FIRST_F,
+		     IB_PC_SL_RCV_FECN_LAST_F);
+}
+
+void mad_dump_perfcounters_sl_rcv_becn(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_SL_RCV_BECN_FIRST_F,
+		     IB_PC_SL_RCV_BECN_LAST_F);
+}
+
+void mad_dump_perfcounters_xmit_con_ctrl(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_XMIT_CON_CTRL_FIRST_F,
+		     IB_PC_XMIT_CON_CTRL_LAST_F);
+}
+
+void mad_dump_perfcounters_vl_xmit_time_cong(char *buf, int bufsz, void *val, int valsz)
+{
+	int cnt;
+
+	cnt = _dump_fields(buf, bufsz, val, IB_PC_EXT_PORT_SELECT_F,
+			   IB_PC_EXT_XMT_BYTES_F);
+	if (cnt < 0)
+		return;
+
+	_dump_fields(buf + cnt, bufsz - cnt, val, IB_PC_VL_XMIT_TIME_CONG_FIRST_F,
+		     IB_PC_VL_XMIT_TIME_CONG_LAST_F);
+}
+
+void mad_dump_mlnx_ext_port_info(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_MLNX_EXT_PORT_STATE_CHG_ENABLE_F,
+		     IB_MLNX_EXT_PORT_LAST_F);
+}
+
+void mad_dump_cc_congestioninfo(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_INFO_FIRST_F,
+		     IB_CC_CONGESTION_INFO_LAST_F);
+}
+
+void mad_dump_cc_congestionkeyinfo(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_KEY_INFO_FIRST_F,
+		     IB_CC_CONGESTION_KEY_INFO_LAST_F);
+}
+
+void mad_dump_cc_congestionlog(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_LOG_FIRST_F,
+		     IB_CC_CONGESTION_LOG_LAST_F);
+}
+
+void mad_dump_cc_congestionlogswitch(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_LOG_SWITCH_FIRST_F,
+		     IB_CC_CONGESTION_LOG_SWITCH_LAST_F);
+}
+
+void mad_dump_cc_congestionlogentryswitch(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_LOG_ENTRY_SWITCH_FIRST_F,
+		     IB_CC_CONGESTION_LOG_ENTRY_SWITCH_LAST_F);
+}
+
+void mad_dump_cc_congestionlogca(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_LOG_CA_FIRST_F,
+		     IB_CC_CONGESTION_LOG_CA_LAST_F);
+}
+
+void mad_dump_cc_congestionlogentryca(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_LOG_ENTRY_CA_FIRST_F,
+		     IB_CC_CONGESTION_LOG_ENTRY_CA_LAST_F);
+}
+
+void mad_dump_cc_switchcongestionsetting(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_SWITCH_CONGESTION_SETTING_FIRST_F,
+		     IB_CC_SWITCH_CONGESTION_SETTING_LAST_F);
+}
+
+void mad_dump_cc_switchportcongestionsettingelement(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_FIRST_F,
+		     IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_LAST_F);
+}
+
+void mad_dump_cc_cacongestionsetting(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CA_CONGESTION_SETTING_FIRST_F,
+		     IB_CC_CA_CONGESTION_SETTING_LAST_F);
+}
+
+void mad_dump_cc_cacongestionentry(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CA_CONGESTION_ENTRY_FIRST_F,
+		     IB_CC_CA_CONGESTION_ENTRY_LAST_F);
+}
+
+void mad_dump_cc_congestioncontroltable(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_CONTROL_TABLE_FIRST_F,
+		     IB_CC_CONGESTION_CONTROL_TABLE_LAST_F);
+}
+
+void mad_dump_cc_congestioncontroltableentry(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_FIRST_F,
+		     IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_LAST_F);
+}
+
+void mad_dump_cc_timestamp(char *buf, int bufsz, void *val, int valsz)
+{
+	_dump_fields(buf, bufsz, val, IB_CC_TIMESTAMP_FIRST_F,
+		     IB_CC_TIMESTAMP_LAST_F);
+}
+
+void mad_dump_classportinfo(char *buf, int bufsz, void *val, int valsz)
+{
+	/* no FIRST_F and LAST_F for CPI field enums, must do a hack */
+	_dump_fields(buf, bufsz, val, IB_CPI_BASEVER_F, IB_CPI_TRAP_QKEY_F + 1);
+}
+
+void xdump(FILE * file, char *msg, void *p, int size)
+{
+#define HEX(x)  ((x) < 10 ? '0' + (x) : 'a' + ((x) -10))
+	uint8_t *cp = p;
+	int i;
+
+	if (msg)
+		fputs(msg, file);
+
+	for (i = 0; i < size;) {
+		fputc(HEX(*cp >> 4), file);
+		fputc(HEX(*cp & 0xf), file);
+		if (++i >= size)
+			break;
+		fputc(HEX(cp[1] >> 4), file);
+		fputc(HEX(cp[1] & 0xf), file);
+		if ((++i) % 16)
+			fputc(' ', file);
+		else
+			fputc('\n', file);
+		cp += 2;
+	}
+	if (i % 16)
+		fputc('\n', file);
 }
diff --git a/src/fields.c b/src/fields.c
index 6942e85..06bc9f0 100644
--- a/src/fields.c
+++ b/src/fields.c
@@ -1,5 +1,7 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
+ * Copyright (c) 2009-2011 Mellanox Technologies LTD.  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
@@ -33,15 +35,13 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
 
 /*
  * BITSOFFS and BE_OFFS are required due the fact that the bit offsets are inconsistently
@@ -54,11 +54,11 @@
 #define BE_OFFS(o, w)	(o), (w)
 #define BE_TO_BITSOFFS(o, w)	(((o) & ~31) | ((32 - ((o) & 31) - (w))))
 
-ib_field_t ib_mad_f [] = {
-	[0]	{0, 0},		/* IB_NO_FIELD - reserved as invalid */
+static const ib_field_t ib_mad_f[] = {
+	{0, 0},			/* IB_NO_FIELD - reserved as invalid */
 
-	[IB_GID_PREFIX_F]		{0, 64, "GidPrefix", mad_dump_rhex},
-	[IB_GID_GUID_F]			{64, 64, "GidGuid", mad_dump_rhex},
+	{0, 64, "GidPrefix", mad_dump_rhex},
+	{64, 64, "GidGuid", mad_dump_rhex},
 
 	/*
 	 * MAD: common MAD fields (IB spec 13.4.2)
@@ -68,320 +68,889 @@ ib_field_t ib_mad_f [] = {
 	 */
 
 	/* first MAD word (0-3 bytes) */
-	[IB_MAD_METHOD_F]		{BE_OFFS(0, 7), "MadMethod", mad_dump_hex}, /* TODO: add dumper */
-	[IB_MAD_RESPONSE_F] 		{BE_OFFS(7, 1), "MadIsResponse", mad_dump_uint}, /* TODO: add dumper */
-	[IB_MAD_CLASSVER_F] 		{BE_OFFS(8, 8), "MadClassVersion", mad_dump_uint},
-	[IB_MAD_MGMTCLASS_F] 		{BE_OFFS(16, 8), "MadMgmtClass", mad_dump_uint},  /* TODO: add dumper */
-	[IB_MAD_BASEVER_F] 		{BE_OFFS(24, 8), "MadBaseVersion", mad_dump_uint},
+	{BE_OFFS(0, 7), "MadMethod", mad_dump_hex},	/* TODO: add dumper */
+	{BE_OFFS(7, 1), "MadIsResponse", mad_dump_uint},	/* TODO: add dumper */
+	{BE_OFFS(8, 8), "MadClassVersion", mad_dump_uint},
+	{BE_OFFS(16, 8), "MadMgmtClass", mad_dump_uint},	/* TODO: add dumper */
+	{BE_OFFS(24, 8), "MadBaseVersion", mad_dump_uint},
 
 	/* second MAD word (4-7 bytes) */
-	[IB_MAD_STATUS_F] 		{BE_OFFS(48, 16), "MadStatus", mad_dump_hex}, /* TODO: add dumper */
+	{BE_OFFS(48, 16), "MadStatus", mad_dump_hex},	/* TODO: add dumper */
 
 	/* DR SMP only */
-	[IB_DRSMP_HOPCNT_F] 		{BE_OFFS(32, 8), "DrSmpHopCnt", mad_dump_uint},
-	[IB_DRSMP_HOPPTR_F] 		{BE_OFFS(40, 8), "DrSmpHopPtr", mad_dump_uint},
-	[IB_DRSMP_STATUS_F] 		{BE_OFFS(48, 15), "DrSmpStatus", mad_dump_hex}, /* TODO: add dumper */
-	[IB_DRSMP_DIRECTION_F] 		{BE_OFFS(63, 1), "DrSmpDirection", mad_dump_uint}, /* TODO: add dumper */
+	{BE_OFFS(32, 8), "DrSmpHopCnt", mad_dump_uint},
+	{BE_OFFS(40, 8), "DrSmpHopPtr", mad_dump_uint},
+	{BE_OFFS(48, 15), "DrSmpStatus", mad_dump_hex},	/* TODO: add dumper */
+	{BE_OFFS(63, 1), "DrSmpDirection", mad_dump_uint},	/* TODO: add dumper */
 
 	/* words 3,4,5,6 (8-23 bytes) */
-	[IB_MAD_TRID_F] 		{64, 64, "MadTRID", mad_dump_hex},
-	[IB_MAD_ATTRID_F] 		{BE_OFFS(144, 16), "MadAttr", mad_dump_hex}, /* TODO: add dumper */
-	[IB_MAD_ATTRMOD_F] 		{160, 32, "MadModifier", mad_dump_hex}, /* TODO: add dumper */
+	{64, 64, "MadTRID", mad_dump_hex},
+	{BE_OFFS(144, 16), "MadAttr", mad_dump_hex},	/* TODO: add dumper */
+	{160, 32, "MadModifier", mad_dump_hex},	/* TODO: add dumper */
 
 	/* word 7,8 (24-31 bytes) */
-	[IB_MAD_MKEY_F] 		{196, 64, "MadMkey", mad_dump_hex},
+	{192, 64, "MadMkey", mad_dump_hex},
 
 	/* word 9 (32-37 bytes) */
-	[IB_DRSMP_DRDLID_F] 		{BE_OFFS(256, 16), "DrSmpDLID", mad_dump_hex},
-	[IB_DRSMP_DRSLID_F] 		{BE_OFFS(272, 16), "DrSmpSLID", mad_dump_hex},
+	{BE_OFFS(256, 16), "DrSmpDLID", mad_dump_uint},
+	{BE_OFFS(272, 16), "DrSmpSLID", mad_dump_uint},
+
+	/* word 10,11 (36-43 bytes) */
+	{288, 64, "SaSMkey", mad_dump_hex},
 
 	/* word 12 (44-47 bytes) */
-	[IB_SA_ATTROFFS_F] 		{BE_OFFS(46*8, 16), "SaAttrOffs", mad_dump_uint},
+	{BE_OFFS(46 * 8, 16), "SaAttrOffs", mad_dump_uint},
 
 	/* word 13,14 (48-55 bytes) */
-	[IB_SA_COMPMASK_F] 		{48*8, 64, "SaCompMask", mad_dump_hex},
+	{48 * 8, 64, "SaCompMask", mad_dump_hex},
 
 	/* word 13,14 (56-255 bytes) */
-	[IB_SA_DATA_F] 			{56*8, (256-56)*8, "SaData", mad_dump_hex},
-
-	[IB_DRSMP_PATH_F] 		{1024, 512, "DrSmpPath", mad_dump_hex},
-	[IB_DRSMP_RPATH_F] 		{1536, 512, "DrSmpRetPath", mad_dump_hex},
-
-	[IB_GS_DATA_F] 			{64*8, (256-64) * 8, "GsData", mad_dump_hex},
-
-	/*
-	 * PortInfo fields:
-	 */
-	[IB_PORT_MKEY_F]		{0, 64, "Mkey", mad_dump_hex},
-	[IB_PORT_GID_PREFIX_F]		{64, 64, "GidPrefix", mad_dump_hex},
-	[IB_PORT_LID_F]			{BITSOFFS(128, 16), "Lid", mad_dump_hex},
-	[IB_PORT_SMLID_F]		{BITSOFFS(144, 16), "SMLid", mad_dump_hex},
-	[IB_PORT_CAPMASK_F]		{160, 32, "CapMask", mad_dump_portcapmask},
-	[IB_PORT_DIAG_F]		{BITSOFFS(192, 16), "DiagCode", mad_dump_hex},
-	[IB_PORT_MKEY_LEASE_F]		{BITSOFFS(208, 16), "MkeyLeasePeriod", mad_dump_uint},
-	[IB_PORT_LOCAL_PORT_F]		{BITSOFFS(224, 8), "LocalPort", mad_dump_uint},
-	[IB_PORT_LINK_WIDTH_ENABLED_F]	{BITSOFFS(232, 8), "LinkWidthEnabled", mad_dump_linkwidthen},
-	[IB_PORT_LINK_WIDTH_SUPPORTED_F]	{BITSOFFS(240, 8), "LinkWidthSupported", mad_dump_linkwidthsup},
-	[IB_PORT_LINK_WIDTH_ACTIVE_F]	{BITSOFFS(248, 8), "LinkWidthActive", mad_dump_linkwidth},
-	[IB_PORT_LINK_SPEED_SUPPORTED_F]	{BITSOFFS(256, 4), "LinkSpeedSupported", mad_dump_linkspeedsup},
-	[IB_PORT_STATE_F]		{BITSOFFS(260, 4), "LinkState", mad_dump_portstate},
-	[IB_PORT_PHYS_STATE_F]		{BITSOFFS(264, 4), "PhysLinkState", mad_dump_physportstate},
-	[IB_PORT_LINK_DOWN_DEF_F]	{BITSOFFS(268, 4), "LinkDownDefState", mad_dump_linkdowndefstate},
-	[IB_PORT_MKEY_PROT_BITS_F]	{BITSOFFS(272, 2), "ProtectBits", mad_dump_uint},
-	[IB_PORT_LMC_F]			{BITSOFFS(277, 3), "LMC", mad_dump_uint},
-	[IB_PORT_LINK_SPEED_ACTIVE_F]	{BITSOFFS(280, 4), "LinkSpeedActive", mad_dump_linkspeed},
-	[IB_PORT_LINK_SPEED_ENABLED_F]	{BITSOFFS(284, 4), "LinkSpeedEnabled", mad_dump_linkspeeden},
-	[IB_PORT_NEIGHBOR_MTU_F]	{BITSOFFS(288, 4), "NeighborMTU", mad_dump_mtu},
-	[IB_PORT_SMSL_F]		{BITSOFFS(292, 4), "SMSL", mad_dump_uint},
-	[IB_PORT_VL_CAP_F]		{BITSOFFS(296, 4), "VLCap", mad_dump_vlcap},
-	[IB_PORT_INIT_TYPE_F]		{BITSOFFS(300, 4), "InitType", mad_dump_hex},
-	[IB_PORT_VL_HIGH_LIMIT_F] 	{BITSOFFS(304, 8), "VLHighLimit", mad_dump_uint},
-	[IB_PORT_VL_ARBITRATION_HIGH_CAP_F]	{BITSOFFS(312, 8), "VLArbHighCap", mad_dump_uint},
-	[IB_PORT_VL_ARBITRATION_LOW_CAP_F]	{BITSOFFS(320, 8), "VLArbLowCap", mad_dump_uint},
-
-	[IB_PORT_INIT_TYPE_REPLY_F]	{BITSOFFS(328, 4), "InitReply", mad_dump_hex},
-	[IB_PORT_MTU_CAP_F]		{BITSOFFS(332, 4), "MtuCap", mad_dump_mtu},
-	[IB_PORT_VL_STALL_COUNT_F]	{BITSOFFS(336, 3), "VLStallCount", mad_dump_uint},
-	[IB_PORT_HOQ_LIFE_F]		{BITSOFFS(339, 5), "HoqLife", mad_dump_uint},
-	[IB_PORT_OPER_VLS_F]		{BITSOFFS(344, 4), "OperVLs", mad_dump_opervls},
-	[IB_PORT_PART_EN_INB_F]		{BITSOFFS(348, 1), "PartEnforceInb", mad_dump_uint},
-	[IB_PORT_PART_EN_OUTB_F]	{BITSOFFS(349, 1), "PartEnforceOutb", mad_dump_uint},
-	[IB_PORT_FILTER_RAW_INB_F]	{BITSOFFS(350, 1), "FilterRawInb", mad_dump_uint},
-	[IB_PORT_FILTER_RAW_OUTB_F]	{BITSOFFS(351, 1), "FilterRawOutb", mad_dump_uint},
-	[IB_PORT_MKEY_VIOL_F]		{BITSOFFS(352, 16), "MkeyViolations", mad_dump_uint},
-	[IB_PORT_PKEY_VIOL_F]		{BITSOFFS(368, 16), "PkeyViolations", mad_dump_uint},
-	[IB_PORT_QKEY_VIOL_F]		{BITSOFFS(384, 16), "QkeyViolations", mad_dump_uint},
-	[IB_PORT_GUID_CAP_F]		{BITSOFFS(400, 8), "GuidCap", mad_dump_uint},
-	[IB_PORT_CLIENT_REREG_F]	{BITSOFFS(408, 1), "ClientReregister", mad_dump_uint},
-	[IB_PORT_SUBN_TIMEOUT_F]	{BITSOFFS(411, 5), "SubnetTimeout", mad_dump_uint},
-	[IB_PORT_RESP_TIME_VAL_F]	{BITSOFFS(419, 5), "RespTimeVal", mad_dump_uint},
-	[IB_PORT_LOCAL_PHYS_ERR_F]	{BITSOFFS(424, 4), "LocalPhysErr", mad_dump_uint},
-	[IB_PORT_OVERRUN_ERR_F]		{BITSOFFS(428, 4), "OverrunErr", mad_dump_uint},
-	[IB_PORT_MAX_CREDIT_HINT_F]	{BITSOFFS(432, 16), "MaxCreditHint", mad_dump_uint},
-	[IB_PORT_LINK_ROUND_TRIP_F]	{BITSOFFS(456, 24), "RoundTrip", mad_dump_uint},
-
-	/*
-	 * NodeInfo fields:
-	 */
-	[IB_NODE_BASE_VERS_F]		{BITSOFFS(0,8), "BaseVers", mad_dump_uint},
-	[IB_NODE_CLASS_VERS_F]		{BITSOFFS(8,8), "ClassVers", mad_dump_uint},
-	[IB_NODE_TYPE_F]		{BITSOFFS(16,8), "NodeType", mad_dump_node_type},
-	[IB_NODE_NPORTS_F]		{BITSOFFS(24,8), "NumPorts", mad_dump_uint},
-	[IB_NODE_SYSTEM_GUID_F]		{32, 64, "SystemGuid", mad_dump_hex},
-	[IB_NODE_GUID_F]		{96, 64, "Guid", mad_dump_hex},
-	[IB_NODE_PORT_GUID_F]		{160, 64, "PortGuid", mad_dump_hex},
-	[IB_NODE_PARTITION_CAP_F]	{BITSOFFS(224,16), "PartCap", mad_dump_uint},
-	[IB_NODE_DEVID_F]		{BITSOFFS(240,16), "DevId", mad_dump_hex},
-	[IB_NODE_REVISION_F]		{256, 32, "Revision", mad_dump_hex},
-	[IB_NODE_LOCAL_PORT_F]		{BITSOFFS(288,8), "LocalPort", mad_dump_uint},
-	[IB_NODE_VENDORID_F]		{BITSOFFS(296,24), "VendorId", mad_dump_hex},
-
-	/*
-	 * SwitchInfo fields:
-	 */
-	[IB_SW_LINEAR_FDB_CAP_F]	{BITSOFFS(0, 16), "LinearFdbCap", mad_dump_uint},
-	[IB_SW_RANDOM_FDB_CAP_F]	{BITSOFFS(16, 16), "RandomFdbCap", mad_dump_uint},
-	[IB_SW_MCAST_FDB_CAP_F]		{BITSOFFS(32, 16), "McastFdbCap", mad_dump_uint},
-	[IB_SW_LINEAR_FDB_TOP_F]	{BITSOFFS(48, 16), "LinearFdbTop", mad_dump_uint},
-	[IB_SW_DEF_PORT_F]		{BITSOFFS(64, 8), "DefPort", mad_dump_uint},
-	[IB_SW_DEF_MCAST_PRIM_F]	{BITSOFFS(72, 8), "DefMcastPrimPort", mad_dump_uint},
-	[IB_SW_DEF_MCAST_NOT_PRIM_F]	{BITSOFFS(80, 8), "DefMcastNotPrimPort", mad_dump_uint},
-	[IB_SW_LIFE_TIME_F]		{BITSOFFS(88, 5), "LifeTime", mad_dump_uint},
-	[IB_SW_STATE_CHANGE_F]		{BITSOFFS(93, 1), "StateChange", mad_dump_uint},
-	[IB_SW_LIDS_PER_PORT_F]		{BITSOFFS(96,16), "LidsPerPort", mad_dump_uint},
-	[IB_SW_PARTITION_ENFORCE_CAP_F]	{BITSOFFS(112, 16), "PartEnforceCap", mad_dump_uint},
-	[IB_SW_PARTITION_ENF_INB_F]	{BITSOFFS(128, 1), "InboundPartEnf", mad_dump_uint},
-	[IB_SW_PARTITION_ENF_OUTB_F]	{BITSOFFS(129, 1), "OutboundPartEnf", mad_dump_uint},
-	[IB_SW_FILTER_RAW_INB_F]	{BITSOFFS(130, 1), "FilterRawInbound", mad_dump_uint},
-	[IB_SW_FILTER_RAW_OUTB_F]	{BITSOFFS(131, 1), "FilterRawOutbound", mad_dump_uint},
-	[IB_SW_ENHANCED_PORT0_F]	{BITSOFFS(132, 1), "EnhancedPort0", mad_dump_uint},
-
-	/*
-	 * SwitchLinearForwardingTable fields:
-	 */
-	[IB_LINEAR_FORW_TBL_F]		{0, 512, "LinearForwTbl", mad_dump_array},
-
-	/*
-	 * SwitchMulticastForwardingTable fields:
-	 */
-	[IB_MULTICAST_FORW_TBL_F]	{0, 512, "MulticastForwTbl", mad_dump_array},
+	{56 * 8, (256 - 56) * 8, "SaData", mad_dump_hex},
+
+	/* bytes 64 - 127 */
+	{0, 0},			/* IB_SM_DATA_F - reserved as invalid */
+
+	/* bytes 64 - 256 */
+	{64 * 8, (256 - 64) * 8, "GsData", mad_dump_hex},
+
+	/* bytes 128 - 191 */
+	{1024, 512, "DrSmpPath", mad_dump_hex},
+
+	/* bytes 192 - 255 */
+	{1536, 512, "DrSmpRetPath", mad_dump_hex},
 
 	/*
-	 * Notice/Trap fields
+	 * PortInfo fields
+	 */
+	{0, 64, "Mkey", mad_dump_hex},
+	{64, 64, "GidPrefix", mad_dump_hex},
+	{BITSOFFS(128, 16), "Lid", mad_dump_uint},
+	{BITSOFFS(144, 16), "SMLid", mad_dump_uint},
+	{160, 32, "CapMask", mad_dump_portcapmask},
+	{BITSOFFS(192, 16), "DiagCode", mad_dump_hex},
+	{BITSOFFS(208, 16), "MkeyLeasePeriod", mad_dump_uint},
+	{BITSOFFS(224, 8), "LocalPort", mad_dump_uint},
+	{BITSOFFS(232, 8), "LinkWidthEnabled", mad_dump_linkwidthen},
+	{BITSOFFS(240, 8), "LinkWidthSupported", mad_dump_linkwidthsup},
+	{BITSOFFS(248, 8), "LinkWidthActive", mad_dump_linkwidth},
+	{BITSOFFS(256, 4), "LinkSpeedSupported", mad_dump_linkspeedsup},
+	{BITSOFFS(260, 4), "LinkState", mad_dump_portstate},
+	{BITSOFFS(264, 4), "PhysLinkState", mad_dump_physportstate},
+	{BITSOFFS(268, 4), "LinkDownDefState", mad_dump_linkdowndefstate},
+	{BITSOFFS(272, 2), "ProtectBits", mad_dump_uint},
+	{BITSOFFS(277, 3), "LMC", mad_dump_uint},
+	{BITSOFFS(280, 4), "LinkSpeedActive", mad_dump_linkspeed},
+	{BITSOFFS(284, 4), "LinkSpeedEnabled", mad_dump_linkspeeden},
+	{BITSOFFS(288, 4), "NeighborMTU", mad_dump_mtu},
+	{BITSOFFS(292, 4), "SMSL", mad_dump_uint},
+	{BITSOFFS(296, 4), "VLCap", mad_dump_vlcap},
+	{BITSOFFS(300, 4), "InitType", mad_dump_hex},
+	{BITSOFFS(304, 8), "VLHighLimit", mad_dump_uint},
+	{BITSOFFS(312, 8), "VLArbHighCap", mad_dump_uint},
+	{BITSOFFS(320, 8), "VLArbLowCap", mad_dump_uint},
+	{BITSOFFS(328, 4), "InitReply", mad_dump_hex},
+	{BITSOFFS(332, 4), "MtuCap", mad_dump_mtu},
+	{BITSOFFS(336, 3), "VLStallCount", mad_dump_uint},
+	{BITSOFFS(339, 5), "HoqLife", mad_dump_uint},
+	{BITSOFFS(344, 4), "OperVLs", mad_dump_opervls},
+	{BITSOFFS(348, 1), "PartEnforceInb", mad_dump_uint},
+	{BITSOFFS(349, 1), "PartEnforceOutb", mad_dump_uint},
+	{BITSOFFS(350, 1), "FilterRawInb", mad_dump_uint},
+	{BITSOFFS(351, 1), "FilterRawOutb", mad_dump_uint},
+	{BITSOFFS(352, 16), "MkeyViolations", mad_dump_uint},
+	{BITSOFFS(368, 16), "PkeyViolations", mad_dump_uint},
+	{BITSOFFS(384, 16), "QkeyViolations", mad_dump_uint},
+	{BITSOFFS(400, 8), "GuidCap", mad_dump_uint},
+	{BITSOFFS(408, 1), "ClientReregister", mad_dump_uint},
+	{BITSOFFS(409, 1), "McastPkeyTrapSuppressionEnabled", mad_dump_uint},
+	{BITSOFFS(411, 5), "SubnetTimeout", mad_dump_uint},
+	{BITSOFFS(419, 5), "RespTimeVal", mad_dump_uint},
+	{BITSOFFS(424, 4), "LocalPhysErr", mad_dump_uint},
+	{BITSOFFS(428, 4), "OverrunErr", mad_dump_uint},
+	{BITSOFFS(432, 16), "MaxCreditHint", mad_dump_uint},
+	{BITSOFFS(456, 24), "RoundTrip", mad_dump_uint},
+	{0, 0},			/* IB_PORT_LAST_F */
+
+	/*
+	 * NodeInfo fields
 	 */
-	[IB_NOTICE_IS_GENERIC_F]  	{BITSOFFS(0, 1), "NoticeIsGeneric", mad_dump_uint},
-	[IB_NOTICE_TYPE_F]        	{BITSOFFS(1, 7), "NoticeType", mad_dump_uint},
-	[IB_NOTICE_PRODUCER_F]    	{BITSOFFS(8, 24), "NoticeProducerType", mad_dump_node_type},
-	[IB_NOTICE_TRAP_NUMBER_F] 	{BITSOFFS(32, 16), "NoticeTrapNumber", mad_dump_uint},
-	[IB_NOTICE_ISSUER_LID_F]  	{BITSOFFS(48, 16), "NoticeIssuerLID", mad_dump_uint},
-	[IB_NOTICE_TOGGLE_F]      	{BITSOFFS(64, 1), "NoticeToggle", mad_dump_uint},
-	[IB_NOTICE_COUNT_F]       	{BITSOFFS(65, 15), "NoticeCount", mad_dump_uint},
-	[IB_NOTICE_DATA_DETAILS_F]    	{80, 432, "NoticeDataDetails", mad_dump_array},
-	[IB_NOTICE_DATA_LID_F]    	{BITSOFFS(80, 16), "NoticeDataLID", mad_dump_uint},
-	[IB_NOTICE_DATA_144_LID_F]    	{BITSOFFS(96, 16), "NoticeDataTrap144LID", mad_dump_uint},
-	[IB_NOTICE_DATA_144_CAPMASK_F]  {BITSOFFS(128, 32), "NoticeDataTrap144CapMask", mad_dump_uint},
+	{BITSOFFS(0, 8), "BaseVers", mad_dump_uint},
+	{BITSOFFS(8, 8), "ClassVers", mad_dump_uint},
+	{BITSOFFS(16, 8), "NodeType", mad_dump_node_type},
+	{BITSOFFS(24, 8), "NumPorts", mad_dump_uint},
+	{32, 64, "SystemGuid", mad_dump_hex},
+	{96, 64, "Guid", mad_dump_hex},
+	{160, 64, "PortGuid", mad_dump_hex},
+	{BITSOFFS(224, 16), "PartCap", mad_dump_uint},
+	{BITSOFFS(240, 16), "DevId", mad_dump_hex},
+	{256, 32, "Revision", mad_dump_hex},
+	{BITSOFFS(288, 8), "LocalPort", mad_dump_uint},
+	{BITSOFFS(296, 24), "VendorId", mad_dump_hex},
+	{0, 0},			/* IB_NODE_LAST_F */
 
 	/*
-	 * NodeDescription fields:
+	 * SwitchInfo fields
 	 */
-	[IB_NODE_DESC_F]		{0, 64*8, "NodeDesc", mad_dump_string},
+	{BITSOFFS(0, 16), "LinearFdbCap", mad_dump_uint},
+	{BITSOFFS(16, 16), "RandomFdbCap", mad_dump_uint},
+	{BITSOFFS(32, 16), "McastFdbCap", mad_dump_uint},
+	{BITSOFFS(48, 16), "LinearFdbTop", mad_dump_uint},
+	{BITSOFFS(64, 8), "DefPort", mad_dump_uint},
+	{BITSOFFS(72, 8), "DefMcastPrimPort", mad_dump_uint},
+	{BITSOFFS(80, 8), "DefMcastNotPrimPort", mad_dump_uint},
+	{BITSOFFS(88, 5), "LifeTime", mad_dump_uint},
+	{BITSOFFS(93, 1), "StateChange", mad_dump_uint},
+	{BITSOFFS(94, 2), "OptSLtoVLMapping", mad_dump_uint},
+	{BITSOFFS(96, 16), "LidsPerPort", mad_dump_uint},
+	{BITSOFFS(112, 16), "PartEnforceCap", mad_dump_uint},
+	{BITSOFFS(128, 1), "InboundPartEnf", mad_dump_uint},
+	{BITSOFFS(129, 1), "OutboundPartEnf", mad_dump_uint},
+	{BITSOFFS(130, 1), "FilterRawInbound", mad_dump_uint},
+	{BITSOFFS(131, 1), "FilterRawOutbound", mad_dump_uint},
+	{BITSOFFS(132, 1), "EnhancedPort0", mad_dump_uint},
+	{BITSOFFS(144, 16), "MulticastFDBTop", mad_dump_hex},
+	{0, 0},			/* IB_SW_LAST_F */
+
+	/*
+	 * SwitchLinearForwardingTable fields
+	 */
+	{0, 512, "LinearForwTbl", mad_dump_array},
+
+	/*
+	 * SwitchMulticastForwardingTable fields
+	 */
+	{0, 512, "MulticastForwTbl", mad_dump_array},
+
+	/*
+	 * NodeDescription fields
+	 */
+	{0, 64 * 8, "NodeDesc", mad_dump_string},
+
+	/*
+	 * Notice/Trap fields
+	 */
+	{BITSOFFS(0, 1), "NoticeIsGeneric", mad_dump_uint},
+	{BITSOFFS(1, 7), "NoticeType", mad_dump_uint},
+	{BITSOFFS(8, 24), "NoticeProducerType", mad_dump_node_type},
+	{BITSOFFS(32, 16), "NoticeTrapNumber", mad_dump_uint},
+	{BITSOFFS(48, 16), "NoticeIssuerLID", mad_dump_uint},
+	{BITSOFFS(64, 1), "NoticeToggle", mad_dump_uint},
+	{BITSOFFS(65, 15), "NoticeCount", mad_dump_uint},
+	{80, 432, "NoticeDataDetails", mad_dump_array},
+	{BITSOFFS(80, 16), "NoticeDataLID", mad_dump_uint},
+	{BITSOFFS(96, 16), "NoticeDataTrap144LID", mad_dump_uint},
+	{BITSOFFS(128, 32), "NoticeDataTrap144CapMask", mad_dump_uint},
 
 	/*
 	 * Port counters
 	 */
-	[IB_PC_PORT_SELECT_F] 		{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
-	[IB_PC_COUNTER_SELECT_F] 	{BITSOFFS(16, 16), "CounterSelect", mad_dump_hex},
-	[IB_PC_ERR_SYM_F] 		{BITSOFFS(32, 16), "SymbolErrors", mad_dump_uint},
-	[IB_PC_LINK_RECOVERS_F] 	{BITSOFFS(48, 8), "LinkRecovers", mad_dump_uint},
-	[IB_PC_LINK_DOWNED_F] 		{BITSOFFS(56, 8), "LinkDowned", mad_dump_uint},
-	[IB_PC_ERR_RCV_F] 		{BITSOFFS(64, 16), "RcvErrors", mad_dump_uint},
-	[IB_PC_ERR_PHYSRCV_F] 		{BITSOFFS(80, 16), "RcvRemotePhysErrors", mad_dump_uint},
-	[IB_PC_ERR_SWITCH_REL_F]	{BITSOFFS(96, 16), "RcvSwRelayErrors", mad_dump_uint},
-	[IB_PC_XMT_DISCARDS_F] 		{BITSOFFS(112, 16), "XmtDiscards", mad_dump_uint},
-	[IB_PC_ERR_XMTCONSTR_F] 	{BITSOFFS(128, 8), "XmtConstraintErrors", mad_dump_uint},
-	[IB_PC_ERR_RCVCONSTR_F] 	{BITSOFFS(136, 8), "RcvConstraintErrors", mad_dump_uint},
-	[IB_PC_ERR_LOCALINTEG_F] 	{BITSOFFS(152, 4), "LinkIntegrityErrors", mad_dump_uint},
-	[IB_PC_ERR_EXCESS_OVR_F] 	{BITSOFFS(156, 4), "ExcBufOverrunErrors", mad_dump_uint},
-	[IB_PC_VL15_DROPPED_F] 		{BITSOFFS(176, 16), "VL15Dropped", mad_dump_uint},
-	[IB_PC_XMT_BYTES_F] 		{192, 32, "XmtData", mad_dump_uint},
-	[IB_PC_RCV_BYTES_F] 		{224, 32, "RcvData", mad_dump_uint},
-	[IB_PC_XMT_PKTS_F] 		{256, 32, "XmtPkts", mad_dump_uint},
-	[IB_PC_RCV_PKTS_F] 		{288, 32, "RcvPkts", mad_dump_uint},
+	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
+	{BITSOFFS(16, 16), "CounterSelect", mad_dump_hex},
+	{BITSOFFS(32, 16), "SymbolErrorCounter", mad_dump_uint},
+	{BITSOFFS(48, 8), "LinkErrorRecoveryCounter", mad_dump_uint},
+	{BITSOFFS(56, 8), "LinkDownedCounter", mad_dump_uint},
+	{BITSOFFS(64, 16), "PortRcvErrors", mad_dump_uint},
+	{BITSOFFS(80, 16), "PortRcvRemotePhysicalErrors", mad_dump_uint},
+	{BITSOFFS(96, 16), "PortRcvSwitchRelayErrors", mad_dump_uint},
+	{BITSOFFS(112, 16), "PortXmitDiscards", mad_dump_uint},
+	{BITSOFFS(128, 8), "PortXmitConstraintErrors", mad_dump_uint},
+	{BITSOFFS(136, 8), "PortRcvConstraintErrors", mad_dump_uint},
+	{BITSOFFS(144, 8), "CounterSelect2", mad_dump_hex},
+	{BITSOFFS(152, 4), "LocalLinkIntegrityErrors", mad_dump_uint},
+	{BITSOFFS(156, 4), "ExcessiveBufferOverrunErrors", mad_dump_uint},
+	{BITSOFFS(176, 16), "VL15Dropped", mad_dump_uint},
+	{192, 32, "PortXmitData", mad_dump_uint},
+	{224, 32, "PortRcvData", mad_dump_uint},
+	{256, 32, "PortXmitPkts", mad_dump_uint},
+	{288, 32, "PortRcvPkts", mad_dump_uint},
+	{320, 32, "PortXmitWait", mad_dump_uint},
+	{0, 0},			/* IB_PC_LAST_F */
 
 	/*
 	 * SMInfo
 	 */
-	[IB_SMINFO_GUID_F]		{0, 64, "SmInfoGuid", mad_dump_hex},
-	[IB_SMINFO_KEY_F]		{64, 64, "SmInfoKey", mad_dump_hex},
-	[IB_SMINFO_ACT_F]		{128, 32, "SmActivity", mad_dump_uint},
-	[IB_SMINFO_PRIO_F]		{BITSOFFS(160, 4), "SmPriority", mad_dump_uint},
-	[IB_SMINFO_STATE_F]		{BITSOFFS(164, 4), "SmState", mad_dump_uint},
+	{0, 64, "SmInfoGuid", mad_dump_hex},
+	{64, 64, "SmInfoKey", mad_dump_hex},
+	{128, 32, "SmActivity", mad_dump_uint},
+	{BITSOFFS(160, 4), "SmPriority", mad_dump_uint},
+	{BITSOFFS(164, 4), "SmState", mad_dump_uint},
 
 	/*
 	 * SA RMPP
 	 */
-	[IB_SA_RMPP_VERS_F]		{BE_OFFS(24*8+24, 8), "RmppVers", mad_dump_uint},
-	[IB_SA_RMPP_TYPE_F]		{BE_OFFS(24*8+16, 8), "RmppType", mad_dump_uint},
-	[IB_SA_RMPP_RESP_F]		{BE_OFFS(24*8+11, 5), "RmppResp", mad_dump_uint},
-	[IB_SA_RMPP_FLAGS_F]		{BE_OFFS(24*8+8, 3), "RmppFlags", mad_dump_hex},
-	[IB_SA_RMPP_STATUS_F]		{BE_OFFS(24*8+0, 8), "RmppStatus", mad_dump_hex},
+	{BE_OFFS(24 * 8 + 24, 8), "RmppVers", mad_dump_uint},
+	{BE_OFFS(24 * 8 + 16, 8), "RmppType", mad_dump_uint},
+	{BE_OFFS(24 * 8 + 11, 5), "RmppResp", mad_dump_uint},
+	{BE_OFFS(24 * 8 + 8, 3), "RmppFlags", mad_dump_hex},
+	{BE_OFFS(24 * 8 + 0, 8), "RmppStatus", mad_dump_hex},
 
 	/* data1 */
-	[IB_SA_RMPP_D1_F]		{28*8, 32, "RmppData1", mad_dump_hex},
-	[IB_SA_RMPP_SEGNUM_F]		{28*8, 32, "RmppSegNum", mad_dump_uint},
+	{28 * 8, 32, "RmppData1", mad_dump_hex},
+	{28 * 8, 32, "RmppSegNum", mad_dump_uint},
 	/* data2 */
-	[IB_SA_RMPP_D2_F]		{32*8, 32, "RmppData2", mad_dump_hex},
-	[IB_SA_RMPP_LEN_F]		{32*8, 32, "RmppPayload", mad_dump_uint},
-	[IB_SA_RMPP_NEWWIN_F]		{32*8, 32, "RmppNewWin", mad_dump_uint},
+	{32 * 8, 32, "RmppData2", mad_dump_hex},
+	{32 * 8, 32, "RmppPayload", mad_dump_uint},
+	{32 * 8, 32, "RmppNewWin", mad_dump_uint},
 
 	/*
-	 * SA Path rec
+	 * SA Get Multi Path
 	 */
-	[IB_SA_PR_DGID_F]		{64, 128, "PathRecDGid", mad_dump_array},
-	[IB_SA_PR_SGID_F]		{192, 128, "PathRecSGid", mad_dump_array},
-	[IB_SA_PR_DLID_F]		{BITSOFFS(320,16), "PathRecDLid", mad_dump_hex},
-	[IB_SA_PR_SLID_F]		{BITSOFFS(336,16), "PathRecSLid", mad_dump_hex},
-	[IB_SA_PR_NPATH_F]		{BITSOFFS(393,7), "PathRecNumPath", mad_dump_uint},
+	{BITSOFFS(41, 7), "MultiPathNumPath", mad_dump_uint},
+	{BITSOFFS(120, 8), "MultiPathNumSrc", mad_dump_uint},
+	{BITSOFFS(128, 8), "MultiPathNumDest", mad_dump_uint},
+	{192, 128, "MultiPathGid", mad_dump_array},
 
 	/*
-	 * SA Get Multi Path
+	 * SA Path rec
 	 */
-	[IB_SA_MP_NPATH_F]		{BITSOFFS(41,7), "MultiPathNumPath", mad_dump_uint},
-	[IB_SA_MP_NSRC_F]		{BITSOFFS(120,8), "MultiPathNumSrc", mad_dump_uint},
-	[IB_SA_MP_NDEST_F]		{BITSOFFS(128,8), "MultiPathNumDest", mad_dump_uint},
-	[IB_SA_MP_GID0_F]		{192, 128, "MultiPathGid", mad_dump_array},
+	{64, 128, "PathRecDGid", mad_dump_array},
+	{192, 128, "PathRecSGid", mad_dump_array},
+	{BITSOFFS(320, 16), "PathRecDLid", mad_dump_uint},
+	{BITSOFFS(336, 16), "PathRecSLid", mad_dump_uint},
+	{BITSOFFS(393, 7), "PathRecNumPath", mad_dump_uint},
+	{BITSOFFS(428, 4), "PathRecSL", mad_dump_uint},
 
 	/*
 	 * MC Member rec
 	 */
-	[IB_SA_MCM_MGID_F]		{0, 128, "McastMemMGid", mad_dump_array},
-	[IB_SA_MCM_PORTGID_F]		{128, 128, "McastMemPortGid", mad_dump_array},
-	[IB_SA_MCM_QKEY_F]		{256, 32, "McastMemQkey", mad_dump_hex},
-	[IB_SA_MCM_MLID_F]		{BITSOFFS(288, 16), "McastMemMLid", mad_dump_hex},
-	[IB_SA_MCM_MTU_F]		{BITSOFFS(306, 6), "McastMemMTU", mad_dump_uint},
-	[IB_SA_MCM_TCLASS_F]		{BITSOFFS(312, 8), "McastMemTClass", mad_dump_uint},
-	[IB_SA_MCM_PKEY_F]		{BITSOFFS(320, 16), "McastMemPkey", mad_dump_uint},
-	[IB_SA_MCM_RATE_F]		{BITSOFFS(338, 6), "McastMemRate", mad_dump_uint},
-	[IB_SA_MCM_SL_F]		{BITSOFFS(352, 4), "McastMemSL", mad_dump_uint},
-	[IB_SA_MCM_FLOW_LABEL_F]	{BITSOFFS(356, 20), "McastMemFlowLbl", mad_dump_uint},
-	[IB_SA_MCM_JOIN_STATE_F]	{BITSOFFS(388, 4), "McastMemJoinState", mad_dump_uint},
-	[IB_SA_MCM_PROXY_JOIN_F]	{BITSOFFS(392, 1), "McastMemProxyJoin", mad_dump_uint},
+	{0, 128, "McastMemMGid", mad_dump_array},
+	{128, 128, "McastMemPortGid", mad_dump_array},
+	{256, 32, "McastMemQkey", mad_dump_hex},
+	{BITSOFFS(288, 16), "McastMemMLid", mad_dump_hex},
+	{BITSOFFS(352, 4), "McastMemSL", mad_dump_uint},
+	{BITSOFFS(306, 6), "McastMemMTU", mad_dump_uint},
+	{BITSOFFS(338, 6), "McastMemRate", mad_dump_uint},
+	{BITSOFFS(312, 8), "McastMemTClass", mad_dump_uint},
+	{BITSOFFS(320, 16), "McastMemPkey", mad_dump_uint},
+	{BITSOFFS(356, 20), "McastMemFlowLbl", mad_dump_uint},
+	{BITSOFFS(388, 4), "McastMemJoinState", mad_dump_uint},
+	{BITSOFFS(392, 1), "McastMemProxyJoin", mad_dump_uint},
 
 	/*
 	 * Service record
 	 */
-	[IB_SA_SR_ID_F]			{0, 64, "ServRecID", mad_dump_hex},
-	[IB_SA_SR_GID_F]		{64, 128, "ServRecGid", mad_dump_array},
-	[IB_SA_SR_PKEY_F]		{BITSOFFS(192, 16), "ServRecPkey", mad_dump_hex},
-	[IB_SA_SR_LEASE_F]		{224, 32, "ServRecLease", mad_dump_hex},
-	[IB_SA_SR_KEY_F]		{256, 128, "ServRecKey", mad_dump_hex},
-	[IB_SA_SR_NAME_F]		{384, 512, "ServRecName", mad_dump_string},
-	[IB_SA_SR_DATA_F]		{896, 512, "ServRecData", mad_dump_array},	/* ATS for example */
+	{0, 64, "ServRecID", mad_dump_hex},
+	{64, 128, "ServRecGid", mad_dump_array},
+	{BITSOFFS(192, 16), "ServRecPkey", mad_dump_hex},
+	{224, 32, "ServRecLease", mad_dump_hex},
+	{256, 128, "ServRecKey", mad_dump_hex},
+	{384, 512, "ServRecName", mad_dump_string},
+	{896, 512, "ServRecData", mad_dump_array},	/* ATS for example */
 
 	/*
 	 * ATS SM record - within SA_SR_DATA
 	 */
-	[IB_ATS_SM_NODE_ADDR_F]		{12*8, 32, "ATSNodeAddr", mad_dump_hex},
-	[IB_ATS_SM_MAGIC_KEY_F]		{BITSOFFS(16*8, 16), "ATSMagicKey", mad_dump_hex},
-	[IB_ATS_SM_NODE_TYPE_F]		{BITSOFFS(18*8, 16), "ATSNodeType", mad_dump_hex},
-	[IB_ATS_SM_NODE_NAME_F]		{32*8, 32*8, "ATSNodeName", mad_dump_string},
+	{12 * 8, 32, "ATSNodeAddr", mad_dump_hex},
+	{BITSOFFS(16 * 8, 16), "ATSMagicKey", mad_dump_hex},
+	{BITSOFFS(18 * 8, 16), "ATSNodeType", mad_dump_hex},
+	{32 * 8, 32 * 8, "ATSNodeName", mad_dump_string},
 
 	/*
 	 * SLTOVL MAPPING TABLE
 	 */
-	[IB_SLTOVL_MAPPING_TABLE_F]	{0, 64, "SLToVLMap", mad_dump_hex},
+	{0, 64, "SLToVLMap", mad_dump_hex},
 
 	/*
 	 * VL ARBITRATION TABLE
 	 */
-	[IB_VL_ARBITRATION_TABLE_F]	{0, 512, "VLArbTbl", mad_dump_array},
+	{0, 512, "VLArbTbl", mad_dump_array},
 
 	/*
 	 * IB vendor classes range 2
 	 */
-	[IB_VEND2_OUI_F]		{BE_OFFS(36*8, 24), "OUI", mad_dump_array},
-	[IB_VEND2_DATA_F]		{40*8, (256-40)*8, "Vendor2Data", mad_dump_array},
+	{BE_OFFS(36 * 8, 24), "OUI", mad_dump_array},
+	{40 * 8, (256 - 40) * 8, "Vendor2Data", mad_dump_array},
 
 	/*
 	 * Extended port counters
 	 */
-	[IB_PC_EXT_PORT_SELECT_F]	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
-	[IB_PC_EXT_COUNTER_SELECT_F]	{BITSOFFS(16, 16), "CounterSelect", mad_dump_hex},
-	[IB_PC_EXT_XMT_BYTES_F]		{64, 64, "PortXmitData", mad_dump_uint},
-	[IB_PC_EXT_RCV_BYTES_F]		{128, 64, "PortRcvData", mad_dump_uint},
-	[IB_PC_EXT_XMT_PKTS_F]		{192, 64, "PortXmitPkts", mad_dump_uint},
-	[IB_PC_EXT_RCV_PKTS_F]		{256, 64, "PortRcvPkts", mad_dump_uint},
-	[IB_PC_EXT_XMT_UPKTS_F]		{320, 64, "PortUnicastXmitPkts", mad_dump_uint},
-	[IB_PC_EXT_RCV_UPKTS_F]		{384, 64, "PortUnicastRcvPkts", mad_dump_uint},
-	[IB_PC_EXT_XMT_MPKTS_F]		{448, 64, "PortMulticastXmitPkts", mad_dump_uint},
-	[IB_PC_EXT_RCV_MPKTS_F]		{512, 64, "PortMulticastRcvPkts", mad_dump_uint},
+	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
+	{BITSOFFS(16, 16), "CounterSelect", mad_dump_hex},
+	{64, 64, "PortXmitData", mad_dump_uint},
+	{128, 64, "PortRcvData", mad_dump_uint},
+	{192, 64, "PortXmitPkts", mad_dump_uint},
+	{256, 64, "PortRcvPkts", mad_dump_uint},
+	{320, 64, "PortUnicastXmitPkts", mad_dump_uint},
+	{384, 64, "PortUnicastRcvPkts", mad_dump_uint},
+	{448, 64, "PortMulticastXmitPkts", mad_dump_uint},
+	{512, 64, "PortMulticastRcvPkts", mad_dump_uint},
+	{0, 0},			/* IB_PC_EXT_LAST_F */
 
 	/*
 	 * GUIDInfo fields
 	 */
-	[IB_GUID_GUID0_F]		{0, 64, "GUID0", mad_dump_hex},
+	{0, 64, "GUID0", mad_dump_hex},
+
+	/*
+	 * ClassPortInfo fields
+	 */
+	{BITSOFFS(0, 8), "BaseVersion", mad_dump_uint},
+	{BITSOFFS(8, 8), "ClassVersion", mad_dump_uint},
+	{BITSOFFS(16, 16), "CapabilityMask", mad_dump_hex},
+	{BITSOFFS(32, 27), "CapabilityMask2", mad_dump_hex},
+	{BITSOFFS(59, 5), "RespTimeVal", mad_dump_uint},
+	{64, 128, "RedirectGID", mad_dump_array},
+	{BITSOFFS(192, 8), "RedirectTC", mad_dump_hex},
+	{BITSOFFS(200, 4), "RedirectSL", mad_dump_uint},
+	{BITSOFFS(204, 20), "RedirectFL", mad_dump_hex},
+	{BITSOFFS(224, 16), "RedirectLID", mad_dump_uint},
+	{BITSOFFS(240, 16), "RedirectPKey", mad_dump_hex},
+	{BITSOFFS(264, 24), "RedirectQP", mad_dump_hex},
+	{288, 32, "RedirectQKey", mad_dump_hex},
+	{320, 128, "TrapGID", mad_dump_array},
+	{BITSOFFS(448, 8), "TrapTC", mad_dump_hex},
+	{BITSOFFS(456, 4), "TrapSL", mad_dump_uint},
+	{BITSOFFS(460, 20), "TrapFL", mad_dump_hex},
+	{BITSOFFS(480, 16), "TrapLID", mad_dump_uint},
+	{BITSOFFS(496, 16), "TrapPKey", mad_dump_hex},
+	{BITSOFFS(512, 8), "TrapHL", mad_dump_uint},
+	{BITSOFFS(520, 24), "TrapQP", mad_dump_hex},
+	{544, 32, "TrapQKey", mad_dump_hex},
+
+	/*
+	 * PortXmitDataSL fields
+	 */
+	{32, 32, "XmtDataSL0", mad_dump_uint},
+	{64, 32, "XmtDataSL1", mad_dump_uint},
+	{96, 32, "XmtDataSL2", mad_dump_uint},
+	{128, 32, "XmtDataSL3", mad_dump_uint},
+	{160, 32, "XmtDataSL4", mad_dump_uint},
+	{192, 32, "XmtDataSL5", mad_dump_uint},
+	{224, 32, "XmtDataSL6", mad_dump_uint},
+	{256, 32, "XmtDataSL7", mad_dump_uint},
+	{288, 32, "XmtDataSL8", mad_dump_uint},
+	{320, 32, "XmtDataSL9", mad_dump_uint},
+	{352, 32, "XmtDataSL10", mad_dump_uint},
+	{384, 32, "XmtDataSL11", mad_dump_uint},
+	{416, 32, "XmtDataSL12", mad_dump_uint},
+	{448, 32, "XmtDataSL13", mad_dump_uint},
+	{480, 32, "XmtDataSL14", mad_dump_uint},
+	{512, 32, "XmtDataSL15", mad_dump_uint},
+	{0, 0},			/* IB_PC_XMT_DATA_SL_LAST_F */
+
+	/*
+	 * PortRcvDataSL fields
+	 */
+	{32, 32, "RcvDataSL0", mad_dump_uint},
+	{64, 32, "RcvDataSL1", mad_dump_uint},
+	{96, 32, "RcvDataSL2", mad_dump_uint},
+	{128, 32, "RcvDataSL3", mad_dump_uint},
+	{160, 32, "RcvDataSL4", mad_dump_uint},
+	{192, 32, "RcvDataSL5", mad_dump_uint},
+	{224, 32, "RcvDataSL6", mad_dump_uint},
+	{256, 32, "RcvDataSL7", mad_dump_uint},
+	{288, 32, "RcvDataSL8", mad_dump_uint},
+	{320, 32, "RcvDataSL9", mad_dump_uint},
+	{352, 32, "RcvDataSL10", mad_dump_uint},
+	{384, 32, "RcvDataSL11", mad_dump_uint},
+	{416, 32, "RcvDataSL12", mad_dump_uint},
+	{448, 32, "RcvDataSL13", mad_dump_uint},
+	{480, 32, "RcvDataSL14", mad_dump_uint},
+	{512, 32, "RcvDataSL15", mad_dump_uint},
+	{0, 0},			/* IB_PC_RCV_DATA_SL_LAST_F */
+
+	/*
+	 * PortXmitDiscardDetails fields
+	 */
+	{BITSOFFS(32, 16), "PortInactiveDiscards", mad_dump_uint},
+	{BITSOFFS(48, 16), "PortNeighborMTUDiscards", mad_dump_uint},
+	{BITSOFFS(64, 16), "PortSwLifetimeLimitDiscards", mad_dump_uint},
+	{BITSOFFS(80, 16), "PortSwHOQLifetimeLimitDiscards", mad_dump_uint},
+	{0, 0},			/* IB_PC_XMT_DISC_LAST_F */
+
+	/*
+	 * PortRcvErrorDetails fields
+	 */
+	{BITSOFFS(32, 16), "PortLocalPhysicalErrors", mad_dump_uint},
+	{BITSOFFS(48, 16), "PortMalformedPktErrors", mad_dump_uint},
+	{BITSOFFS(64, 16), "PortBufferOverrunErrors", mad_dump_uint},
+	{BITSOFFS(80, 16), "PortDLIDMappingErrors", mad_dump_uint},
+	{BITSOFFS(96, 16), "PortVLMappingErrors", mad_dump_uint},
+	{BITSOFFS(112, 16), "PortLoopingErrors", mad_dump_uint},
+	{0, 0},                 /* IB_PC_RCV_ERR_LAST_F */
+
+	/*
+	 * PortSamplesControl fields
+	 */
+	{BITSOFFS(0, 8), "OpCode", mad_dump_hex},
+	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
+	{BITSOFFS(16, 8), "Tick", mad_dump_hex},
+	{BITSOFFS(29, 3), "CounterWidth", mad_dump_uint},
+	{BITSOFFS(34, 3), "CounterMask0", mad_dump_hex},
+	{BITSOFFS(37, 27), "CounterMasks1to9", mad_dump_hex},
+	{BITSOFFS(65, 15), "CounterMasks10to14", mad_dump_hex},
+	{BITSOFFS(80, 8), "SampleMechanisms", mad_dump_uint},
+	{BITSOFFS(94, 2), "SampleStatus", mad_dump_uint},
+	{96, 64, "OptionMask", mad_dump_hex},
+	{160, 64, "VendorMask", mad_dump_hex},
+	{224, 32, "SampleStart", mad_dump_uint},
+	{256, 32, "SampleInterval", mad_dump_uint},
+	{BITSOFFS(288, 16), "Tag", mad_dump_hex},
+	{BITSOFFS(304, 16), "CounterSelect0", mad_dump_hex},
+	{BITSOFFS(320, 16), "CounterSelect1", mad_dump_hex},
+	{BITSOFFS(336, 16), "CounterSelect2", mad_dump_hex},
+	{BITSOFFS(352, 16), "CounterSelect3", mad_dump_hex},
+	{BITSOFFS(368, 16), "CounterSelect4", mad_dump_hex},
+	{BITSOFFS(384, 16), "CounterSelect5", mad_dump_hex},
+	{BITSOFFS(400, 16), "CounterSelect6", mad_dump_hex},
+	{BITSOFFS(416, 16), "CounterSelect7", mad_dump_hex},
+	{BITSOFFS(432, 16), "CounterSelect8", mad_dump_hex},
+	{BITSOFFS(448, 16), "CounterSelect9", mad_dump_hex},
+	{BITSOFFS(464, 16), "CounterSelect10", mad_dump_hex},
+	{BITSOFFS(480, 16), "CounterSelect11", mad_dump_hex},
+	{BITSOFFS(496, 16), "CounterSelect12", mad_dump_hex},
+	{BITSOFFS(512, 16), "CounterSelect13", mad_dump_hex},
+	{BITSOFFS(528, 16), "CounterSelect14", mad_dump_hex},
+	{576, 64, "SamplesOnlyOptionMask", mad_dump_hex},
+	{0, 0},			/* IB_PSC_LAST_F */
+
+	/* GUIDInfo fields */
+	{0, 64, "GUID0", mad_dump_hex},
+	{64, 64, "GUID1", mad_dump_hex},
+	{128, 64, "GUID2", mad_dump_hex},
+	{192, 64, "GUID3", mad_dump_hex},
+	{256, 64, "GUID4", mad_dump_hex},
+	{320, 64, "GUID5", mad_dump_hex},
+	{384, 64, "GUID6", mad_dump_hex},
+	{448, 64, "GUID7", mad_dump_hex},
+
+	/* GUID Info Record */
+	{BITSOFFS(0, 16), "Lid", mad_dump_uint},
+	{BITSOFFS(16, 8), "BlockNum", mad_dump_uint},
+	{64, 64, "Guid0", mad_dump_hex},
+	{128, 64, "Guid1", mad_dump_hex},
+	{192, 64, "Guid2", mad_dump_hex},
+	{256, 64, "Guid3", mad_dump_hex},
+	{320, 64, "Guid4", mad_dump_hex},
+	{384, 64, "Guid5", mad_dump_hex},
+	{448, 64, "Guid6", mad_dump_hex},
+	{512, 64, "Guid7", mad_dump_hex},
+
+	/*
+	 * More PortInfo fields
+	 */
+	{BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex},
+	{BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext},
+	{BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup},
+	{BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
+	{0, 0},			/* IB_PORT_LINK_SPEED_EXT_LAST_F */
+
+	/*
+	 * PortExtendedSpeedsCounters fields
+	 */
+	{BITSOFFS(8, 8), "PortSelect", mad_dump_uint},
+	{64, 64, "CounterSelect", mad_dump_hex},
+	{BITSOFFS(128, 16), "SyncHeaderErrorCounter", mad_dump_uint},
+	{BITSOFFS(144, 16), "UnknownBlockCounter", mad_dump_uint},
+	{BITSOFFS(160, 16), "ErrorDetectionCounterLane0", mad_dump_uint},
+	{BITSOFFS(176, 16), "ErrorDetectionCounterLane1", mad_dump_uint},
+	{BITSOFFS(192, 16), "ErrorDetectionCounterLane2", mad_dump_uint},
+	{BITSOFFS(208, 16), "ErrorDetectionCounterLane3", mad_dump_uint},
+	{BITSOFFS(224, 16), "ErrorDetectionCounterLane4", mad_dump_uint},
+	{BITSOFFS(240, 16), "ErrorDetectionCounterLane5", mad_dump_uint},
+	{BITSOFFS(256, 16), "ErrorDetectionCounterLane6", mad_dump_uint},
+	{BITSOFFS(272, 16), "ErrorDetectionCounterLane7", mad_dump_uint},
+	{BITSOFFS(288, 16), "ErrorDetectionCounterLane8", mad_dump_uint},
+	{BITSOFFS(304, 16), "ErrorDetectionCounterLane9", mad_dump_uint},
+	{BITSOFFS(320, 16), "ErrorDetectionCounterLane10", mad_dump_uint},
+	{BITSOFFS(336, 16), "ErrorDetectionCounterLane11", mad_dump_uint},
+	{352, 32, "FECCorrectableBlockCtrLane0", mad_dump_uint},
+	{384, 32, "FECCorrectableBlockCtrLane1", mad_dump_uint},
+	{416, 32, "FECCorrectableBlockCtrLane2", mad_dump_uint},
+	{448, 32, "FECCorrectableBlockCtrLane3", mad_dump_uint},
+	{480, 32, "FECCorrectableBlockCtrLane4", mad_dump_uint},
+	{512, 32, "FECCorrectableBlockCtrLane5", mad_dump_uint},
+	{544, 32, "FECCorrectableBlockCtrLane6", mad_dump_uint},
+	{576, 32, "FECCorrectableBlockCtrLane7", mad_dump_uint},
+	{608, 32, "FECCorrectableBlockCtrLane8", mad_dump_uint},
+	{640, 32, "FECCorrectableBlockCtrLane9", mad_dump_uint},
+	{672, 32, "FECCorrectableBlockCtrLane10", mad_dump_uint},
+	{704, 32, "FECCorrectableBlockCtrLane11", mad_dump_uint},
+	{736, 32, "FECUncorrectableBlockCtrLane0", mad_dump_uint},
+	{768, 32, "FECUncorrectableBlockCtrLane1", mad_dump_uint},
+	{800, 32, "FECUncorrectableBlockCtrLane2", mad_dump_uint},
+	{832, 32, "FECUncorrectableBlockCtrLane3", mad_dump_uint},
+	{864, 32, "FECUncorrectableBlockCtrLane4", mad_dump_uint},
+	{896, 32, "FECUncorrectableBlockCtrLane5", mad_dump_uint},
+	{928, 32, "FECUncorrectableBlockCtrLane6", mad_dump_uint},
+	{960, 32, "FECUncorrectableBlockCtrLane7", mad_dump_uint},
+	{992, 32, "FECUncorrectableBlockCtrLane8", mad_dump_uint},
+	{1024, 32, "FECUncorrectableBlockCtrLane9", mad_dump_uint},
+	{1056, 32, "FECUncorrectableBlockCtrLane10", mad_dump_uint},
+	{1088, 32, "FECUncorrectableBlockCtrLane11", mad_dump_uint},
+	{0, 0},			/* IB_PESC_LAST_F */
+
+	/*
+	 * PortOpRcvCounters fields
+	 */
+	{32, 32, "PortOpRcvPkts", mad_dump_uint},
+	{64, 32, "PortOpRcvData", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_OP_RCV_COUNTERS_LAST_F */
+
+	/*
+	 * PortFlowCtlCounters fields
+	 */
+	{32, 32, "PortXmitFlowPkts", mad_dump_uint},
+	{64, 32, "PortRcvFlowPkts", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_FLOW_CTL_COUNTERS_LAST_F */
+
+	/*
+	 * PortVLOpPackets fields
+	 */
+	{BITSOFFS(32, 16), "PortVLOpPackets0", mad_dump_uint},
+	{BITSOFFS(48, 16), "PortVLOpPackets1", mad_dump_uint},
+	{BITSOFFS(64, 16), "PortVLOpPackets2", mad_dump_uint},
+	{BITSOFFS(80, 16), "PortVLOpPackets3", mad_dump_uint},
+	{BITSOFFS(96, 16), "PortVLOpPackets4", mad_dump_uint},
+	{BITSOFFS(112, 16), "PortVLOpPackets5", mad_dump_uint},
+	{BITSOFFS(128, 16), "PortVLOpPackets6", mad_dump_uint},
+	{BITSOFFS(144, 16), "PortVLOpPackets7", mad_dump_uint},
+	{BITSOFFS(160, 16), "PortVLOpPackets8", mad_dump_uint},
+	{BITSOFFS(176, 16), "PortVLOpPackets9", mad_dump_uint},
+	{BITSOFFS(192, 16), "PortVLOpPackets10", mad_dump_uint},
+	{BITSOFFS(208, 16), "PortVLOpPackets11", mad_dump_uint},
+	{BITSOFFS(224, 16), "PortVLOpPackets12", mad_dump_uint},
+	{BITSOFFS(240, 16), "PortVLOpPackets13", mad_dump_uint},
+	{BITSOFFS(256, 16), "PortVLOpPackets14", mad_dump_uint},
+	{BITSOFFS(272, 16), "PortVLOpPackets15", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_VL_OP_PACKETS_LAST_F */
+
+	/*
+	 * PortVLOpData fields
+	 */
+	{32, 32, "PortVLOpData0", mad_dump_uint},
+	{64, 32, "PortVLOpData1", mad_dump_uint},
+	{96, 32, "PortVLOpData2", mad_dump_uint},
+	{128, 32, "PortVLOpData3", mad_dump_uint},
+	{160, 32, "PortVLOpData4", mad_dump_uint},
+	{192, 32, "PortVLOpData5", mad_dump_uint},
+	{224, 32, "PortVLOpData6", mad_dump_uint},
+	{256, 32, "PortVLOpData7", mad_dump_uint},
+	{288, 32, "PortVLOpData8", mad_dump_uint},
+	{320, 32, "PortVLOpData9", mad_dump_uint},
+	{352, 32, "PortVLOpData10", mad_dump_uint},
+	{384, 32, "PortVLOpData11", mad_dump_uint},
+	{416, 32, "PortVLOpData12", mad_dump_uint},
+	{448, 32, "PortVLOpData13", mad_dump_uint},
+	{480, 32, "PortVLOpData14", mad_dump_uint},
+	{512, 32, "PortVLOpData15", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_VL_OP_DATA_LAST_F */
+
+	/*
+	 * PortVLXmitFlowCtlUpdateErrors fields
+	 */
+	{BITSOFFS(32, 2), "PortVLXmitFlowCtlUpdateErrors0", mad_dump_uint},
+	{BITSOFFS(34, 2), "PortVLXmitFlowCtlUpdateErrors1", mad_dump_uint},
+	{BITSOFFS(36, 2), "PortVLXmitFlowCtlUpdateErrors2", mad_dump_uint},
+	{BITSOFFS(38, 2), "PortVLXmitFlowCtlUpdateErrors3", mad_dump_uint},
+	{BITSOFFS(40, 2), "PortVLXmitFlowCtlUpdateErrors4", mad_dump_uint},
+	{BITSOFFS(42, 2), "PortVLXmitFlowCtlUpdateErrors5", mad_dump_uint},
+	{BITSOFFS(44, 2), "PortVLXmitFlowCtlUpdateErrors6", mad_dump_uint},
+	{BITSOFFS(46, 2), "PortVLXmitFlowCtlUpdateErrors7", mad_dump_uint},
+	{BITSOFFS(48, 2), "PortVLXmitFlowCtlUpdateErrors8", mad_dump_uint},
+	{BITSOFFS(50, 2), "PortVLXmitFlowCtlUpdateErrors9", mad_dump_uint},
+	{BITSOFFS(52, 2), "PortVLXmitFlowCtlUpdateErrors10", mad_dump_uint},
+	{BITSOFFS(54, 2), "PortVLXmitFlowCtlUpdateErrors11", mad_dump_uint},
+	{BITSOFFS(56, 2), "PortVLXmitFlowCtlUpdateErrors12", mad_dump_uint},
+	{BITSOFFS(58, 2), "PortVLXmitFlowCtlUpdateErrors13", mad_dump_uint},
+	{BITSOFFS(60, 2), "PortVLXmitFlowCtlUpdateErrors14", mad_dump_uint},
+	{BITSOFFS(62, 2), "PortVLXmitFlowCtlUpdateErrors15", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_VL_XMIT_FLOW_CTL_UPDATE_ERRORS_LAST_F */
+
+	/*
+	 * PortVLXmitWaitCounters fields
+	 */
+	{BITSOFFS(32, 16), "PortVLXmitWait0", mad_dump_uint},
+	{BITSOFFS(48, 16), "PortVLXmitWait1", mad_dump_uint},
+	{BITSOFFS(64, 16), "PortVLXmitWait2", mad_dump_uint},
+	{BITSOFFS(80, 16), "PortVLXmitWait3", mad_dump_uint},
+	{BITSOFFS(96, 16), "PortVLXmitWait4", mad_dump_uint},
+	{BITSOFFS(112, 16), "PortVLXmitWait5", mad_dump_uint},
+	{BITSOFFS(128, 16), "PortVLXmitWait6", mad_dump_uint},
+	{BITSOFFS(144, 16), "PortVLXmitWait7", mad_dump_uint},
+	{BITSOFFS(160, 16), "PortVLXmitWait8", mad_dump_uint},
+	{BITSOFFS(176, 16), "PortVLXmitWait9", mad_dump_uint},
+	{BITSOFFS(192, 16), "PortVLXmitWait10", mad_dump_uint},
+	{BITSOFFS(208, 16), "PortVLXmitWait11", mad_dump_uint},
+	{BITSOFFS(224, 16), "PortVLXmitWait12", mad_dump_uint},
+	{BITSOFFS(240, 16), "PortVLXmitWait13", mad_dump_uint},
+	{BITSOFFS(256, 16), "PortVLXmitWait14", mad_dump_uint},
+	{BITSOFFS(272, 16), "PortVLXmitWait15", mad_dump_uint},
+	{0, 0},			/* IB_PC_PORT_VL_XMIT_WAIT_COUNTERS_LAST_F */
+
+	/*
+	 * SwPortVLCongestion fields
+	 */
+	{BITSOFFS(32, 16), "SWPortVLCongestion0", mad_dump_uint},
+	{BITSOFFS(48, 16), "SWPortVLCongestion1", mad_dump_uint},
+	{BITSOFFS(64, 16), "SWPortVLCongestion2", mad_dump_uint},
+	{BITSOFFS(80, 16), "SWPortVLCongestion3", mad_dump_uint},
+	{BITSOFFS(96, 16), "SWPortVLCongestion4", mad_dump_uint},
+	{BITSOFFS(112, 16), "SWPortVLCongestion5", mad_dump_uint},
+	{BITSOFFS(128, 16), "SWPortVLCongestion6", mad_dump_uint},
+	{BITSOFFS(144, 16), "SWPortVLCongestion7", mad_dump_uint},
+	{BITSOFFS(160, 16), "SWPortVLCongestion8", mad_dump_uint},
+	{BITSOFFS(176, 16), "SWPortVLCongestion9", mad_dump_uint},
+	{BITSOFFS(192, 16), "SWPortVLCongestion10", mad_dump_uint},
+	{BITSOFFS(208, 16), "SWPortVLCongestion11", mad_dump_uint},
+	{BITSOFFS(224, 16), "SWPortVLCongestion12", mad_dump_uint},
+	{BITSOFFS(240, 16), "SWPortVLCongestion13", mad_dump_uint},
+	{BITSOFFS(256, 16), "SWPortVLCongestion14", mad_dump_uint},
+	{BITSOFFS(272, 16), "SWPortVLCongestion15", mad_dump_uint},
+	{0, 0},			/* IB_PC_SW_PORT_VL_CONGESTION_LAST_F */
+
+	/*
+	 * PortRcvConCtrl fields
+	 */
+	{32, 32, "PortPktRcvFECN", mad_dump_uint},
+	{64, 32, "PortPktRcvBECN", mad_dump_uint},
+	{0, 0},			/* IB_PC_RCV_CON_CTRL_LAST_F */
+
+	/*
+	 * PortSLRcvFECN fields
+	 */
+	{32, 32, "PortSLRcvFECN0", mad_dump_uint},
+	{64, 32, "PortSLRcvFECN1", mad_dump_uint},
+	{96, 32, "PortSLRcvFECN2", mad_dump_uint},
+	{128, 32, "PortSLRcvFECN3", mad_dump_uint},
+	{160, 32, "PortSLRcvFECN4", mad_dump_uint},
+	{192, 32, "PortSLRcvFECN5", mad_dump_uint},
+	{224, 32, "PortSLRcvFECN6", mad_dump_uint},
+	{256, 32, "PortSLRcvFECN7", mad_dump_uint},
+	{288, 32, "PortSLRcvFECN8", mad_dump_uint},
+	{320, 32, "PortSLRcvFECN9", mad_dump_uint},
+	{352, 32, "PortSLRcvFECN10", mad_dump_uint},
+	{384, 32, "PortSLRcvFECN11", mad_dump_uint},
+	{416, 32, "PortSLRcvFECN12", mad_dump_uint},
+	{448, 32, "PortSLRcvFECN13", mad_dump_uint},
+	{480, 32, "PortSLRcvFECN14", mad_dump_uint},
+	{512, 32, "PortSLRcvFECN15", mad_dump_uint},
+	{0, 0},			/* IB_PC_SL_RCV_FECN_LAST_F */
+
+	/*
+	 * PortSLRcvBECN fields
+	 */
+	{32, 32, "PortSLRcvBECN0", mad_dump_uint},
+	{64, 32, "PortSLRcvBECN1", mad_dump_uint},
+	{96, 32, "PortSLRcvBECN2", mad_dump_uint},
+	{128, 32, "PortSLRcvBECN3", mad_dump_uint},
+	{160, 32, "PortSLRcvBECN4", mad_dump_uint},
+	{192, 32, "PortSLRcvBECN5", mad_dump_uint},
+	{224, 32, "PortSLRcvBECN6", mad_dump_uint},
+	{256, 32, "PortSLRcvBECN7", mad_dump_uint},
+	{288, 32, "PortSLRcvBECN8", mad_dump_uint},
+	{320, 32, "PortSLRcvBECN9", mad_dump_uint},
+	{352, 32, "PortSLRcvBECN10", mad_dump_uint},
+	{384, 32, "PortSLRcvBECN11", mad_dump_uint},
+	{416, 32, "PortSLRcvBECN12", mad_dump_uint},
+	{448, 32, "PortSLRcvBECN13", mad_dump_uint},
+	{480, 32, "PortSLRcvBECN14", mad_dump_uint},
+	{512, 32, "PortSLRcvBECN15", mad_dump_uint},
+	{0, 0},			/* IB_PC_SL_RCV_BECN_LAST_F */
+
+	/*
+	 * PortXmitConCtrl fields
+	 */
+	{32, 32, "PortXmitTimeCong", mad_dump_uint},
+	{0, 0},			/* IB_PC_XMIT_CON_CTRL_LAST_F */
+
+	/*
+	 * PortVLXmitTimeCong fields
+	 */
+	{32, 32, "PortVLXmitTimeCong0", mad_dump_uint},
+	{64, 32, "PortVLXmitTimeCong1", mad_dump_uint},
+	{96, 32, "PortVLXmitTimeCong2", mad_dump_uint},
+	{128, 32, "PortVLXmitTimeCong3", mad_dump_uint},
+	{160, 32, "PortVLXmitTimeCong4", mad_dump_uint},
+	{192, 32, "PortVLXmitTimeCong5", mad_dump_uint},
+	{224, 32, "PortVLXmitTimeCong6", mad_dump_uint},
+	{256, 32, "PortVLXmitTimeCong7", mad_dump_uint},
+	{288, 32, "PortVLXmitTimeCong8", mad_dump_uint},
+	{320, 32, "PortVLXmitTimeCong9", mad_dump_uint},
+	{352, 32, "PortVLXmitTimeCong10", mad_dump_uint},
+	{384, 32, "PortVLXmitTimeCong11", mad_dump_uint},
+	{416, 32, "PortVLXmitTimeCong12", mad_dump_uint},
+	{448, 32, "PortVLXmitTimeCong13", mad_dump_uint},
+	{480, 32, "PortVLXmitTimeCong14", mad_dump_uint},
+	{0, 0},			/* IB_PC_VL_XMIT_TIME_CONG_LAST_F */
+
+	/*
+	 * Mellanox ExtendedPortInfo fields
+	 */
+	{BITSOFFS(24, 8), "StateChangeEnable", mad_dump_hex},
+	{BITSOFFS(56, 8), "LinkSpeedSupported", mad_dump_hex},
+	{BITSOFFS(88, 8), "LinkSpeedEnabled", mad_dump_hex},
+	{BITSOFFS(120, 8), "LinkSpeedActive", mad_dump_hex},
+	{0, 0},			/* IB_MLNX_EXT_PORT_LAST_F */
+
+	/*
+	 * Congestion Control Mad fields
+	 * bytes 24-31 of congestion control mad
+	 */
+	{192, 64, "CC_Key", mad_dump_hex},	/* IB_CC_CCKEY_F */
+
+	/*
+	 * CongestionInfo fields
+	 */
+	{BITSOFFS(0, 16), "CongestionInfo", mad_dump_hex},
+	{BITSOFFS(16, 8), "ControlTableCap", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_INFO_LAST_F */
+
+	/*
+	 * CongestionKeyInfo fields
+	 */
+	{0, 64, "CC_Key", mad_dump_hex},
+	{BITSOFFS(64, 1), "CC_KeyProtectBit", mad_dump_uint},
+	{BITSOFFS(80, 16), "CC_KeyLeasePeriod", mad_dump_uint},
+	{BITSOFFS(96, 16), "CC_KeyViolations", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_KEY_INFO_LAST_F */
+
+	/*
+	 * CongestionLog (common) fields
+	 */
+	{BITSOFFS(0, 8), "LogType", mad_dump_uint},
+	{BITSOFFS(8, 8), "CongestionFlags", mad_dump_hex},
+	{0, 0},			/* IB_CC_CONGESTION_LOG_LAST_F */
+
+	/*
+	 * CongestionLog (Switch) fields
+	 */
+	{BITSOFFS(16, 16), "LogEventsCounter", mad_dump_uint},
+	{32, 32, "CurrentTimeStamp", mad_dump_uint},
+	{64, 256, "PortMap", mad_dump_array},
+	{0, 0},			/* IB_CC_CONGESTION_LOG_SWITCH_LAST_F */
+
+	/*
+	 * CongestionLogEvent (Switch) fields
+	 */
+	{BITSOFFS(0, 16), "SLID", mad_dump_uint},
+	{BITSOFFS(16, 16), "DLID", mad_dump_uint},
+	{BITSOFFS(32, 4), "SL", mad_dump_uint},
+	{64, 32, "Timestamp", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_LOG_ENTRY_SWITCH_LAST_F */
+
+	/*
+	 * CongestionLog (CA) fields
+	 */
+	{BITSOFFS(16, 16), "ThresholdEventCounter", mad_dump_uint},
+	{BITSOFFS(32, 16), "ThresholdCongestionEventMap", mad_dump_hex},
+	/* XXX: Q3/2010 errata lists offset 48, but that means field is not
+	 * world aligned.  Assume will be aligned to offset 64 later.
+	 */
+	{BITSOFFS(64, 32), "CurrentTimeStamp", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_LOG_CA_LAST_F */
+
+	/*
+	 * CongestionLogEvent (CA) fields
+	 */
+	{BITSOFFS(0, 24), "Local_QP_CN_Entry", mad_dump_uint},
+	{BITSOFFS(24, 4), "SL_CN_Entry", mad_dump_uint},
+	{BITSOFFS(28, 4), "Service_Type_CN_Entry", mad_dump_hex},
+	{BITSOFFS(32, 24), "Remote_QP_Number_CN_Entry", mad_dump_uint},
+	{BITSOFFS(64, 16), "Local_LID_CN", mad_dump_uint},
+	{BITSOFFS(80, 16), "Remote_LID_CN_Entry", mad_dump_uint},
+	{BITSOFFS(96, 32), "Timestamp_CN_Entry", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_LOG_ENTRY_CA_LAST_F */
+
+	/*
+	 * SwitchCongestionSetting fields
+	 */
+	{0, 32, "Control_Map", mad_dump_hex},
+	{32, 256, "Victim_Mask", mad_dump_array},
+	{288, 256, "Credit_Mask", mad_dump_array},
+	{BITSOFFS(544, 4), "Threshold", mad_dump_uint},
+	{BITSOFFS(552, 8), "Packet_Size", mad_dump_uint},
+	{BITSOFFS(560, 4), "CS_Threshold", mad_dump_uint},
+	{BITSOFFS(576, 16), "CS_ReturnDelay", mad_dump_hex}, /* TODO: CCT dump */
+	{BITSOFFS(592, 16), "Marking_Rate", mad_dump_uint},
+	{0, 0},			/* IB_CC_SWITCH_CONGESTION_SETTING_LAST_F */
+
+	/*
+	 * SwitchPortCongestionSettingElement fields
+	 */
+	{BITSOFFS(0, 1), "Valid", mad_dump_uint},
+	{BITSOFFS(1, 1), "Control_Type", mad_dump_uint},
+	{BITSOFFS(4, 4), "Threshold", mad_dump_hex},
+	{BITSOFFS(8, 8), "Packet_Size", mad_dump_uint},
+	{BITSOFFS(16, 16), "Cong_Parm_Marking_Rate", mad_dump_uint},
+	{0, 0},			/* IB_CC_SWITCH_PORT_CONGESTION_SETTING_ELEMENT_LAST_F */
+
+	/*
+	 * CACongestionSetting fields
+	 */
+	{BITSOFFS(0, 16), "Port_Control", mad_dump_hex},
+	{BITSOFFS(16, 16), "Control_Map", mad_dump_hex},
+	{0, 0},			/* IB_CC_CA_CONGESTION_SETTING_LAST_F */
+
+	/*
+	 * CACongestionEntry fields
+	 */
+	{BITSOFFS(0, 16), "CCTI_Timer", mad_dump_uint},
+	{BITSOFFS(16, 8), "CCTI_Increase", mad_dump_uint},
+	{BITSOFFS(24, 8), "Trigger_Threshold", mad_dump_uint},
+	{BITSOFFS(32, 8), "CCTI_Min", mad_dump_uint},
+	{0, 0},			/* IB_CC_CA_CONGESTION_SETTING_ENTRY_LAST_F */
+
+	/*
+	 * CongestionControlTable fields
+	 */
+	{BITSOFFS(0, 16), "CCTI_Limit", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_CONTROL_TABLE_LAST_F */
+
+	/*
+	 * CongestionControlTableEntry fields
+	 */
+	{BITSOFFS(0, 2), "CCT_Shift", mad_dump_uint},
+	{BITSOFFS(2, 14), "CCT_Multiplier", mad_dump_uint},
+	{0, 0},			/* IB_CC_CONGESTION_CONTROL_TABLE_ENTRY_LAST_F */
+
+	/*
+	 * Timestamp fields
+	 */
+	{0, 32, "Timestamp", mad_dump_uint},
+	{0, 0}, /* IB_CC_TIMESTAMP_LAST_F */
+
+	/* Node Record */
+	{BITSOFFS(0, 16), "Lid", mad_dump_uint},
+	{BITSOFFS(32, 8), "BaseVers", mad_dump_uint},
+	{BITSOFFS(40, 8), "ClassVers", mad_dump_uint},
+	{BITSOFFS(48, 8), "NodeType", mad_dump_node_type},
+	{BITSOFFS(56, 8), "NumPorts", mad_dump_uint},
+	{64, 64, "SystemGuid", mad_dump_hex},
+	{128, 64, "Guid", mad_dump_hex},
+	{192, 64, "PortGuid", mad_dump_hex},
+	{BITSOFFS(256, 16), "PartCap", mad_dump_uint},
+	{BITSOFFS(272, 16), "DevId", mad_dump_hex},
+	{288, 32, "Revision", mad_dump_hex},
+	{BITSOFFS(320, 8), "LocalPort", mad_dump_uint},
+	{BITSOFFS(328, 24), "VendorId", mad_dump_hex},
+	{352, 64 * 8, "NodeDesc", mad_dump_string},
+	{0, 0}, /* IB_SA_NR_LAST_F */
+
+	{0, 0}			/* IB_FIELD_LAST_ */
 
 };
 
-void
-_set_field64(void *buf, int base_offs, ib_field_t *f, uint64_t val)
+static void _set_field64(void *buf, int base_offs, const ib_field_t * f,
+			 uint64_t val)
 {
 	uint64_t nval;
 
 	nval = htonll(val);
-	memcpy((char *)buf + base_offs + f->bitoffs / 8, &nval, sizeof(uint64_t));
+	memcpy((char *)buf + base_offs + f->bitoffs / 8, &nval,
+	       sizeof(uint64_t));
 }
 
-uint64_t
-_get_field64(void *buf, int base_offs, ib_field_t *f)
+static uint64_t _get_field64(void *buf, int base_offs, const ib_field_t * f)
 {
 	uint64_t val;
-	memcpy(&val, ((char *)buf + base_offs + f->bitoffs / 8), sizeof(uint64_t));
+	memcpy(&val, ((char *)buf + base_offs + f->bitoffs / 8),
+	       sizeof(uint64_t));
 	return ntohll(val);
 }
 
-void
-_set_field(void *buf, int base_offs, ib_field_t *f, uint32_t val)
+static void _set_field(void *buf, int base_offs, const ib_field_t * f,
+		       uint32_t val)
 {
 	int prebits = (8 - (f->bitoffs & 7)) & 7;
 	int postbits = (f->bitoffs + f->bitlen) & 7;
@@ -390,74 +959,226 @@ _set_field(void *buf, int base_offs, ib_field_t *f, uint32_t val)
 	char *p = (char *)buf;
 
 	if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8) {
-		p[3^idx] &= ~((((1 << f->bitlen) - 1)) << (f->bitoffs & 7));
-		p[3^idx] |= (val & ((1 << f->bitlen) - 1)) << (f->bitoffs & 7);
+		p[3 ^ idx] &= ~((((1 << f->bitlen) - 1)) << (f->bitoffs & 7));
+		p[3 ^ idx] |=
+		    (val & ((1 << f->bitlen) - 1)) << (f->bitoffs & 7);
 		return;
 	}
 
-	if (prebits) {	/* val lsb in byte msb */
-		p[3^idx] &= (1 << (8 - prebits)) - 1;
-		p[3^idx++] |= (val & ((1 << prebits) - 1)) << (8 - prebits);
+	if (prebits) {		/* val lsb in byte msb */
+		p[3 ^ idx] &= (1 << (8 - prebits)) - 1;
+		p[3 ^ idx++] |= (val & ((1 << prebits) - 1)) << (8 - prebits);
 		val >>= prebits;
 	}
 
 	/* BIG endian byte order */
 	for (; bytelen--; val >>= 8)
-		p[3^idx++] = val & 0xff;
+		p[3 ^ idx++] = val & 0xff;
 
-	if (postbits) {	/* val msb in byte lsb */
-		p[3^idx] &= ~((1 << postbits) - 1);
-		p[3^idx] |= val;
+	if (postbits) {		/* val msb in byte lsb */
+		p[3 ^ idx] &= ~((1 << postbits) - 1);
+		p[3 ^ idx] |= val;
 	}
 }
 
-uint32_t
-_get_field(void *buf, int base_offs, ib_field_t *f)
+static uint32_t _get_field(void *buf, int base_offs, const ib_field_t * f)
 {
 	int prebits = (8 - (f->bitoffs & 7)) & 7;
 	int postbits = (f->bitoffs + f->bitlen) & 7;
 	int bytelen = f->bitlen / 8;
 	unsigned idx = base_offs + f->bitoffs / 8;
-	uint8_t *p = (uint8_t *)buf;
+	uint8_t *p = (uint8_t *) buf;
 	uint32_t val = 0, v = 0, i;
 
 	if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8)
-		return (p[3^idx] >> (f->bitoffs & 7)) & ((1 << f->bitlen) - 1);
+		return (p[3 ^ idx] >> (f->bitoffs & 7)) & ((1 << f->bitlen) -
+							   1);
 
-	if (prebits)	/* val lsb from byte msb */
-		v = p[3^idx++] >> (8 - prebits);
+	if (prebits)		/* val lsb from byte msb */
+		v = p[3 ^ idx++] >> (8 - prebits);
 
-	if (postbits) {	/* val msb from byte lsb */
+	if (postbits) {		/* val msb from byte lsb */
 		i = base_offs + (f->bitoffs + f->bitlen) / 8;
-		val = (p[3^i] & ((1 << postbits) - 1));
+		val = (p[3 ^ i] & ((1 << postbits) - 1));
 	}
 
 	/* BIG endian byte order */
 	for (idx += bytelen - 1; bytelen--; idx--)
-		val = (val << 8) | p[3^idx];
+		val = (val << 8) | p[3 ^ idx];
 
 	return (val << prebits) | v;
 }
 
 /* field must be byte aligned */
-void
-_set_array(void *buf, int base_offs, ib_field_t *f, void *val)
+static void _set_array(void *buf, int base_offs, const ib_field_t * f,
+		       void *val)
 {
 	int bitoffs = f->bitoffs;
 
 	if (f->bitlen < 32)
 		bitoffs = BE_TO_BITSOFFS(bitoffs, f->bitlen);
 
-	memcpy((uint8_t *)buf + base_offs + bitoffs / 8, val, f->bitlen / 8);
+	memcpy((uint8_t *) buf + base_offs + bitoffs / 8, val, f->bitlen / 8);
 }
 
-void
-_get_array(void *buf, int base_offs, ib_field_t *f, void *val)
+static void _get_array(void *buf, int base_offs, const ib_field_t * f,
+		       void *val)
 {
 	int bitoffs = f->bitoffs;
 
 	if (f->bitlen < 32)
 		bitoffs = BE_TO_BITSOFFS(bitoffs, f->bitlen);
 
-	memcpy(val, (uint8_t *)buf + base_offs + bitoffs / 8, f->bitlen / 8);
+	memcpy(val, (uint8_t *) buf + base_offs + bitoffs / 8, f->bitlen / 8);
+}
+
+uint32_t mad_get_field(void *buf, int base_offs, enum MAD_FIELDS field)
+{
+	return _get_field(buf, base_offs, ib_mad_f + field);
+}
+
+void mad_set_field(void *buf, int base_offs, enum MAD_FIELDS field,
+		   uint32_t val)
+{
+	_set_field(buf, base_offs, ib_mad_f + field, val);
+}
+
+uint64_t mad_get_field64(void *buf, int base_offs, enum MAD_FIELDS field)
+{
+	return _get_field64(buf, base_offs, ib_mad_f + field);
+}
+
+void mad_set_field64(void *buf, int base_offs, enum MAD_FIELDS field,
+		     uint64_t val)
+{
+	_set_field64(buf, base_offs, ib_mad_f + field, val);
+}
+
+void mad_set_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val)
+{
+	_set_array(buf, base_offs, ib_mad_f + field, val);
+}
+
+void mad_get_array(void *buf, int base_offs, enum MAD_FIELDS field, void *val)
+{
+	_get_array(buf, base_offs, ib_mad_f + field, val);
+}
+
+void mad_decode_field(uint8_t * buf, enum MAD_FIELDS field, void *val)
+{
+	const ib_field_t *f = ib_mad_f + field;
+
+	if (!field) {
+		*(int *)val = *(int *)buf;
+		return;
+	}
+	if (f->bitlen <= 32) {
+		*(uint32_t *) val = _get_field(buf, 0, f);
+		return;
+	}
+	if (f->bitlen == 64) {
+		*(uint64_t *) val = _get_field64(buf, 0, f);
+		return;
+	}
+	_get_array(buf, 0, f, val);
+}
+
+void mad_encode_field(uint8_t * buf, enum MAD_FIELDS field, void *val)
+{
+	const ib_field_t *f = ib_mad_f + field;
+
+	if (!field) {
+		*(int *)buf = *(int *)val;
+		return;
+	}
+	if (f->bitlen <= 32) {
+		_set_field(buf, 0, f, *(uint32_t *) val);
+		return;
+	}
+	if (f->bitlen == 64) {
+		_set_field64(buf, 0, f, *(uint64_t *) val);
+		return;
+	}
+	_set_array(buf, 0, f, val);
+}
+
+/************************/
+
+static char *_mad_dump_val(const ib_field_t * f, char *buf, int bufsz,
+			   void *val)
+{
+	f->def_dump_fn(buf, bufsz, val, ALIGN(f->bitlen, 8) / 8);
+	buf[bufsz - 1] = 0;
+
+	return buf;
+}
+
+static char *_mad_dump_field(const ib_field_t * f, const char *name, char *buf,
+			     int bufsz, void *val)
+{
+	char dots[128];
+	int l, n;
+
+	if (bufsz <= 32)
+		return NULL;	/* buf too small */
+
+	if (!name)
+		name = f->name;
+
+	l = strlen(name);
+	if (l < 32) {
+		memset(dots, '.', 32 - l);
+		dots[32 - l] = 0;
+	}
+
+	n = snprintf(buf, bufsz, "%s:%s", name, dots);
+	_mad_dump_val(f, buf + n, bufsz - n, val);
+	buf[bufsz - 1] = 0;
+
+	return buf;
+}
+
+static int _mad_dump(ib_mad_dump_fn * fn, const char *name, void *val,
+		     int valsz)
+{
+	ib_field_t f;
+	char buf[512];
+
+	f.def_dump_fn = fn;
+	f.bitlen = valsz * 8;
+
+	return printf("%s\n", _mad_dump_field(&f, name, buf, sizeof buf, val));
+}
+
+static int _mad_print_field(const ib_field_t * f, const char *name, void *val,
+			    int valsz)
+{
+	return _mad_dump(f->def_dump_fn, name ? name : f->name, val,
+			 valsz ? valsz : ALIGN(f->bitlen, 8) / 8);
+}
+
+int mad_print_field(enum MAD_FIELDS field, const char *name, void *val)
+{
+	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
+		return -1;
+	return _mad_print_field(ib_mad_f + field, name, val, 0);
+}
+
+char *mad_dump_field(enum MAD_FIELDS field, char *buf, int bufsz, void *val)
+{
+	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
+		return NULL;
+	return _mad_dump_field(ib_mad_f + field, 0, buf, bufsz, val);
+}
+
+char *mad_dump_val(enum MAD_FIELDS field, char *buf, int bufsz, void *val)
+{
+	if (field <= IB_NO_FIELD || field >= IB_FIELD_LAST_)
+		return NULL;
+	return _mad_dump_val(ib_mad_f + field, buf, bufsz, val);
+}
+
+const char *mad_field_name(enum MAD_FIELDS field)
+{
+	return (ib_mad_f[field].name);
 }
diff --git a/src/gs.c b/src/gs.c
index 89c927e..5541b6b 100644
--- a/src/gs.c
+++ b/src/gs.c
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2011 Mellanox Technologies LTD.  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
@@ -33,36 +34,36 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
+#include <errno.h>
 
 #include <infiniband/umad.h>
-#include "mad.h"
+#include <infiniband/mad.h>
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-static uint8_t *
-pma_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-	      unsigned timeout, unsigned id, const void *srcport)
+uint8_t *pma_query_via(void *rcvbuf, ib_portid_t * dest, int port,
+		       unsigned timeout, unsigned id,
+		       const struct ibmad_port * srcport)
 {
-	ib_rpc_t rpc = {0};
+	ib_rpc_v1_t rpc = { 0 };
+	ib_rpc_t *rpcold = (ib_rpc_t *)(void *)&rpc;
 	int lid = dest->lid;
+	void *p_ret;
 
-	DEBUG("lid %d port %d", lid, port);
+	DEBUG("lid %u port %d", lid, port);
 
 	if (lid == -1) {
 		IBWARN("only lid routed is supported");
-		return 0;
+		return NULL;
 	}
 
-	rpc.mgtclass = IB_PERFORMANCE_CLASS;
+	rpc.mgtclass = IB_PERFORMANCE_CLASS | IB_MAD_RPC_VERSION1;
 	rpc.method = IB_MAD_METHOD_GET;
 	rpc.attr.id = id;
 
@@ -73,69 +74,37 @@ pma_query_via(void *rcvbuf, ib_portid_t *dest, int port,
 	rpc.datasz = IB_PC_DATA_SZ;
 	rpc.dataoffs = IB_PC_DATA_OFFS;
 
-	dest->qp = 1;
+	if (!dest->qp)
+		dest->qp = 1;
 	if (!dest->qkey)
 		dest->qkey = IB_DEFAULT_QP1_QKEY;
 
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, dest, rcvbuf, rcvbuf);
-	} else {
-		return madrpc(&rpc, dest, rcvbuf, rcvbuf);
-	}
+	p_ret = mad_rpc(srcport, rpcold, dest, rcvbuf, rcvbuf);
+	errno = rpc.error;
+	return p_ret;
 }
 
-uint8_t *
-pma_query(void *rcvbuf, ib_portid_t *dest, int port, unsigned timeout, unsigned id)
+uint8_t *performance_reset_via(void *rcvbuf, ib_portid_t * dest,
+			       int port, unsigned mask, unsigned timeout,
+			       unsigned id, const struct ibmad_port * srcport)
 {
-	return pma_query_via(rcvbuf, dest, port, timeout, id, NULL);
-}
+	ib_rpc_v1_t rpc = { 0 };
+	ib_rpc_t *rpcold = (ib_rpc_t *)(void *)&rpc;
 
-uint8_t *
-perf_classportinfo_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-			     unsigned timeout, const void *srcport)
-{
-	return pma_query_via(rcvbuf, dest, port, timeout, CLASS_PORT_INFO,
-			     srcport);
-}
-
-uint8_t *
-perf_classportinfo_query(void *rcvbuf, ib_portid_t *dest, int port, unsigned timeout)
-{
-	return pma_query(rcvbuf, dest, port, timeout, CLASS_PORT_INFO);
-}
-
-uint8_t *
-port_performance_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-			   unsigned timeout, const void *srcport)
-{
-	return pma_query_via(rcvbuf, dest, port, timeout,
-			     IB_GSI_PORT_COUNTERS, srcport);
-}
-
-uint8_t *
-port_performance_query(void *rcvbuf, ib_portid_t *dest, int port, unsigned timeout)
-{
-	return pma_query(rcvbuf, dest, port, timeout, IB_GSI_PORT_COUNTERS);
-}
-
-static uint8_t *
-performance_reset_via(void *rcvbuf, ib_portid_t *dest, int port, unsigned mask,
-		      unsigned timeout, unsigned id, const void *srcport)
-{
-	ib_rpc_t rpc = {0};
 	int lid = dest->lid;
+	void *p_ret;
 
-	DEBUG("lid %d port %d mask 0x%x", lid, port, mask);
+	DEBUG("lid %u port %d mask 0x%x", lid, port, mask);
 
 	if (lid == -1) {
 		IBWARN("only lid routed is supported");
-		return 0;
+		return NULL;
 	}
 
 	if (!mask)
 		mask = ~0;
 
-	rpc.mgtclass = IB_PERFORMANCE_CLASS;
+	rpc.mgtclass = IB_PERFORMANCE_CLASS | IB_MAD_RPC_VERSION1;
 	rpc.method = IB_MAD_METHOD_SET;
 	rpc.attr.id = id;
 
@@ -144,98 +113,18 @@ performance_reset_via(void *rcvbuf, ib_portid_t *dest, int port, unsigned mask,
 	/* Same for attribute IDs */
 	mad_set_field(rcvbuf, 0, IB_PC_PORT_SELECT_F, port);
 	mad_set_field(rcvbuf, 0, IB_PC_COUNTER_SELECT_F, mask);
+	mask = mask >> 16;
+	mad_set_field(rcvbuf, 0, IB_PC_COUNTER_SELECT2_F, mask);
 	rpc.attr.mod = 0;
 	rpc.timeout = timeout;
 	rpc.datasz = IB_PC_DATA_SZ;
 	rpc.dataoffs = IB_PC_DATA_OFFS;
-	dest->qp = 1;
+	if (!dest->qp)
+		dest->qp = 1;
 	if (!dest->qkey)
 		dest->qkey = IB_DEFAULT_QP1_QKEY;
 
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, dest, rcvbuf, rcvbuf);
-	} else {
-		return madrpc(&rpc, dest, rcvbuf, rcvbuf);
-	}
-}
-
-static uint8_t *
-performance_reset(void *rcvbuf, ib_portid_t *dest, int port, unsigned mask,
-		  unsigned timeout, unsigned id)
-{
-	return performance_reset_via(rcvbuf, dest, port, mask, timeout,
-				     id, NULL);
-}
-
-uint8_t *
-port_performance_reset_via(void *rcvbuf, ib_portid_t *dest, int port,
-			   unsigned mask, unsigned timeout, const void *srcport)
-{
-	return performance_reset_via(rcvbuf, dest, port, mask, timeout,
-				     IB_GSI_PORT_COUNTERS, srcport);
-}
-
-uint8_t *
-port_performance_reset(void *rcvbuf, ib_portid_t *dest, int port, unsigned mask,
-		       unsigned timeout)
-{
-	return performance_reset(rcvbuf, dest, port, mask, timeout, IB_GSI_PORT_COUNTERS);
-}
-
-uint8_t *
-port_performance_ext_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-			       unsigned timeout, const void *srcport)
-{
-	return pma_query_via(rcvbuf, dest, port, timeout,
-			     IB_GSI_PORT_COUNTERS_EXT, srcport);
-}
-
-uint8_t *
-port_performance_ext_query(void *rcvbuf, ib_portid_t *dest, int port, unsigned timeout)
-{
-	return pma_query(rcvbuf, dest, port, timeout, IB_GSI_PORT_COUNTERS_EXT);
-}
-
-uint8_t *
-port_performance_ext_reset_via(void *rcvbuf, ib_portid_t *dest, int port,
-			       unsigned mask, unsigned timeout,
-			       const void *srcport)
-{
-	return performance_reset_via(rcvbuf, dest, port, mask, timeout,
-				     IB_GSI_PORT_COUNTERS_EXT, srcport);
-}
-
-uint8_t *
-port_performance_ext_reset(void *rcvbuf, ib_portid_t *dest, int port, unsigned mask,
-			   unsigned timeout)
-{
-	return performance_reset(rcvbuf, dest, port, mask, timeout, IB_GSI_PORT_COUNTERS_EXT);
-}
-
-uint8_t *
-port_samples_control_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-			       unsigned timeout, const void *srcport)
-{
-	return pma_query_via(rcvbuf, dest, port, timeout,
-			     IB_GSI_PORT_SAMPLES_CONTROL, srcport);
-}
-
-uint8_t *
-port_samples_control_query(void *rcvbuf, ib_portid_t *dest, int port, unsigned timeout)
-{
-	return pma_query(rcvbuf, dest, port, timeout, IB_GSI_PORT_SAMPLES_CONTROL);
-}
-
-uint8_t *
-port_samples_result_query_via(void *rcvbuf, ib_portid_t *dest, int port,
-			      unsigned timeout, const void *srcport)
-{
-	return pma_query_via(rcvbuf, dest, port, timeout,
-			     IB_GSI_PORT_SAMPLES_RESULT, srcport);
-}
-
-uint8_t *
-port_samples_result_query(void *rcvbuf, ib_portid_t *dest, int port,  unsigned timeout)
-{
-	return pma_query(rcvbuf, dest, port, timeout, IB_GSI_PORT_SAMPLES_RESULT);
+	p_ret = mad_rpc(srcport, rpcold, dest, rcvbuf, rcvbuf);
+	errno = rpc.error;
+	return p_ret;
 }
diff --git a/src/libibmad.map b/src/libibmad.map
index f26d28d..a4d4418 100644
--- a/src/libibmad.map
+++ b/src/libibmad.map
@@ -1,9 +1,9 @@
 IBMAD_1.3 {
 	global:
-		_mad_dump;
-		_mad_dump_field;
-		_mad_dump_val;
-		_mad_print_field;
+		xdump;
+		mad_dump_field;
+		mad_dump_val;
+		mad_print_field;
 		mad_dump_array;
 		mad_dump_bitfield;
 		mad_dump_hex;
@@ -12,19 +12,56 @@ IBMAD_1.3 {
 		mad_dump_linkspeed;
 		mad_dump_linkspeeden;
 		mad_dump_linkspeedsup;
+		mad_dump_linkspeedext;
+		mad_dump_linkspeedexten;
+		mad_dump_linkspeedextsup;
 		mad_dump_linkwidth;
 		mad_dump_linkwidthen;
 		mad_dump_linkwidthsup;
+		mad_dump_mlnx_ext_port_info;
 		mad_dump_mtu;
 		mad_dump_node_type;
 		mad_dump_nodedesc;
 		mad_dump_nodeinfo;
 		mad_dump_opervls;
+		mad_dump_fields;
 		mad_dump_perfcounters;
 		mad_dump_perfcounters_ext;
+		mad_dump_perfcounters_xmt_sl;
+		mad_dump_perfcounters_rcv_sl;
+		mad_dump_perfcounters_xmt_disc;
+		mad_dump_perfcounters_rcv_err;
 		mad_dump_physportstate;
 		mad_dump_portcapmask;
 		mad_dump_portinfo;
+		mad_dump_portsamples_control;
+		mad_dump_perfcounters_port_op_rcv_counters;
+		mad_dump_perfcounters_port_flow_ctl_counters;
+		mad_dump_perfcounters_port_vl_op_packet;
+		mad_dump_perfcounters_port_vl_op_data;
+		mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors;
+		mad_dump_perfcounters_port_vl_xmit_wait_counters;
+		mad_dump_perfcounters_sw_port_vl_congestion;
+		mad_dump_perfcounters_rcv_con_ctrl;
+		mad_dump_perfcounters_sl_rcv_fecn;
+		mad_dump_perfcounters_sl_rcv_becn;
+		mad_dump_perfcounters_xmit_con_ctrl;
+		mad_dump_perfcounters_vl_xmit_time_cong;
+		mad_dump_cc_congestioninfo;
+		mad_dump_cc_congestionkeyinfo;
+		mad_dump_cc_congestionlog;
+		mad_dump_cc_congestionlogswitch;
+		mad_dump_cc_congestionlogentryswitch;
+		mad_dump_cc_congestionlogca;
+		mad_dump_cc_congestionlogentryca;
+		mad_dump_cc_switchcongestionsetting;
+		mad_dump_cc_switchportcongestionsettingelement;
+		mad_dump_cc_cacongestionsetting;
+		mad_dump_cc_cacongestionentry;
+		mad_dump_cc_congestioncontroltable;
+		mad_dump_cc_congestioncontroltableentry;
+		mad_dump_cc_timestamp;
+		mad_dump_classportinfo;
 		mad_dump_portstates;
 		mad_dump_portstate;
 		mad_dump_rhex;
@@ -34,20 +71,14 @@ IBMAD_1.3 {
 		mad_dump_uint;
 		mad_dump_vlarbitration;
 		mad_dump_vlcap;
-		_get_array;
-		_get_field;
-		_get_field64;
-		_set_array;
-		_set_field;
-		_set_field64;
-		ib_mad_f;
-		perf_classportinfo_query;
-		port_performance_query;
-		port_performance_reset;
-		port_performance_ext_query;
-		port_performance_ext_reset;
-		port_samples_control_query;
-		port_samples_result_query;
+		mad_get_field;
+		mad_set_field;
+		mad_get_field64;
+		mad_set_field64;
+		mad_get_array;
+		mad_set_array;
+		pma_query_via;
+		performance_reset_via;
 		mad_build_pkt;
 		mad_decode_field;
 		mad_encode;
@@ -57,11 +88,11 @@ IBMAD_1.3 {
 		portid2str;
 		str2drpath;
 		drpath2str;
-		mad_agent_class;
 		mad_class_agent;
 		mad_register_client;
 		mad_register_server;
-		ib_resolve_guid;
+		mad_register_client_via;
+		mad_register_server_via;
 		ib_resolve_portid_str;
 		ib_resolve_self;
 		ib_resolve_smlid;
@@ -70,17 +101,21 @@ IBMAD_1.3 {
 		mad_rpc_close_port;
 		mad_rpc;
 		mad_rpc_rmpp;
+		mad_rpc_portid;
+		mad_rpc_class_agent;
+		mad_rpc_set_retries;
+		mad_rpc_set_timeout;
+		mad_get_timeout;
+		mad_get_retries;
 		madrpc;
 		madrpc_def_timeout;
 		madrpc_init;
-		madrpc_lock;
 		madrpc_portid;
 		madrpc_rmpp;
 		madrpc_save_mad;
 		madrpc_set_retries;
 		madrpc_set_timeout;
 		madrpc_show_errors;
-		madrpc_unlock;
 		ib_path_query;
 		sa_call;
 		sa_rpc_call;
@@ -88,23 +123,30 @@ IBMAD_1.3 {
 		mad_free;
 		mad_receive;
 		mad_respond;
+		mad_receive_via;
+		mad_respond_via;
 		mad_send;
+		mad_send_via;
 		smp_query;
 		smp_set;
 		ib_vendor_call;
+		ib_vendor_call_via;
 		smp_query_via;
+		smp_query_status_via;
 		smp_set_via;
+		smp_set_status_via;
 		ib_path_query_via;
 		ib_resolve_smlid_via;
 		ib_resolve_guid_via;
+		ib_resolve_gid_via;
 		ib_resolve_portid_str_via;
 		ib_resolve_self_via;
-		perf_classportinfo_query_via;
-		port_performance_query_via;
-		port_performance_reset_via;
-		port_performance_ext_query_via;
-		port_performance_ext_reset_via;
-		port_samples_control_query_via;
-		port_samples_result_query_via;
+		mad_field_name;
+		bm_call_via;
+		mad_dump_port_ext_speeds_counters;
+		cc_query_status_via;
+		cc_config_status_via;
+		smp_mkey_get;
+		smp_mkey_set;
 	local: *;
 };
diff --git a/src/mad.c b/src/mad.c
index 1367ecd..70a69dd 100644
--- a/src/mad.c
+++ b/src/mad.c
@@ -1,5 +1,7 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
+ * Copyright (c) 2011 Mellanox Technologies LTD.  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
@@ -33,71 +35,29 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
+#include <time.h>
 
-#include <infiniband/common.h>
 #include <infiniband/umad.h>
-#include <mad.h>
+#include <infiniband/mad.h>
+
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
 
-void
-mad_decode_field(uint8_t *buf, int field, void *val)
-{
-	ib_field_t *f = ib_mad_f + field;
-
-	if (!field) {
-		*(int *)val = *(int *)buf;
-		return;
-	}
-	if (f->bitlen <= 32) {
-		*(uint32_t *)val = _get_field(buf, 0, f);
-		return;
-	}
-	if (f->bitlen == 64) {
-		*(uint64_t *)val = _get_field64(buf, 0, f);
-		return;
-	}
-	_get_array(buf, 0, f, val);
-}
-
-void
-mad_encode_field(uint8_t *buf, int field, void *val)
-{
-	ib_field_t *f = ib_mad_f + field;
-
-	if (!field) {
-		*(int *)buf = *(int *)val;
-		return;
-	}
-	if (f->bitlen <= 32) {
-		_set_field(buf, 0, f, *(uint32_t *)val);
-		return;
-	}
-	if (f->bitlen == 64) {
-		_set_field64(buf, 0, f, *(uint64_t *)val);
-		return;
-	}
-	_set_array(buf, 0, f, val);
-}
-
-uint64_t
-mad_trid(void)
+uint64_t mad_trid(void)
 {
 	static uint64_t base;
 	static uint64_t trid;
 	uint64_t next;
 
 	if (!base) {
-		srandom(time(0)*getpid());
+		srandom((int)time(0) * getpid());
 		base = random();
 		trid = random();
 	}
@@ -105,26 +65,46 @@ mad_trid(void)
 	return next;
 }
 
-void *
-mad_encode(void *buf, ib_rpc_t *rpc, ib_dr_path_t *drpath, void *data)
+int mad_get_timeout(const struct ibmad_port *srcport, int override_ms)
+{
+	return (override_ms ? override_ms :
+		srcport->timeout ? srcport->timeout : madrpc_timeout);
+}
+
+int mad_get_retries(const struct ibmad_port *srcport)
+{
+	return (srcport->retries ? srcport->retries : madrpc_retries);
+}
+
+void *mad_encode(void *buf, ib_rpc_t * rpc, ib_dr_path_t * drpath, void *data)
 {
 	int is_resp = rpc->method & IB_MAD_RESPONSE;
+	int mgtclass;
 
 	/* first word */
 	mad_set_field(buf, 0, IB_MAD_METHOD_F, rpc->method);
 	mad_set_field(buf, 0, IB_MAD_RESPONSE_F, is_resp ? 1 : 0);
-	mad_set_field(buf, 0, IB_MAD_CLASSVER_F, rpc->mgtclass == IB_SA_CLASS ? 2 : 1);
-	mad_set_field(buf, 0, IB_MAD_MGMTCLASS_F, rpc->mgtclass);
+	mgtclass = rpc->mgtclass & 0xff;
+	if (mgtclass == IB_SA_CLASS || mgtclass == IB_CC_CLASS)
+		mad_set_field(buf, 0, IB_MAD_CLASSVER_F, 2);
+	else
+		mad_set_field(buf, 0, IB_MAD_CLASSVER_F, 1);
+	mad_set_field(buf, 0, IB_MAD_MGMTCLASS_F, rpc->mgtclass & 0xff);
 	mad_set_field(buf, 0, IB_MAD_BASEVER_F, 1);
 
 	/* second word */
-	if (rpc->mgtclass == IB_SMI_DIRECT_CLASS) {
+	if ((rpc->mgtclass & 0xff) == IB_SMI_DIRECT_CLASS) {
 		if (!drpath) {
 			IBWARN("encoding dr mad without drpath (null)");
-			return 0;
+			return NULL;
+		}
+		if (drpath->cnt >= IB_SUBNET_PATH_HOPS_MAX) {
+			IBWARN("dr path with hop count %d", drpath->cnt);
+			return NULL;
 		}
 		mad_set_field(buf, 0, IB_DRSMP_HOPCNT_F, drpath->cnt);
-		mad_set_field(buf, 0, IB_DRSMP_HOPPTR_F, is_resp ? drpath->cnt + 1 : 0x0);
+		mad_set_field(buf, 0, IB_DRSMP_HOPPTR_F,
+			      is_resp ? drpath->cnt + 1 : 0x0);
 		mad_set_field(buf, 0, IB_DRSMP_STATUS_F, rpc->rstatus);
 		mad_set_field(buf, 0, IB_DRSMP_DIRECTION_F, is_resp ? 1 : 0);	/* out */
 	} else
@@ -139,46 +119,52 @@ mad_encode(void *buf, ib_rpc_t *rpc, ib_dr_path_t *drpath, void *data)
 	mad_set_field(buf, 0, IB_MAD_ATTRMOD_F, rpc->attr.mod);
 
 	/* words 7,8 */
-	mad_set_field(buf, 0, IB_MAD_MKEY_F, rpc->mkey >> 32);
-	mad_set_field(buf, 4, IB_MAD_MKEY_F, rpc->mkey & 0xffffffff);
+	mad_set_field64(buf, 0, IB_MAD_MKEY_F, rpc->mkey);
 
-	if (rpc->mgtclass == IB_SMI_DIRECT_CLASS) {
+	if ((rpc->mgtclass & 0xff) == IB_SMI_DIRECT_CLASS) {
 		/* word 9 */
-		mad_set_field(buf, 0, IB_DRSMP_DRDLID_F, drpath->drdlid ? drpath->drdlid : 0xffff);
-		mad_set_field(buf, 0, IB_DRSMP_DRSLID_F, drpath->drslid ? drpath->drslid : 0xffff);
+		mad_set_field(buf, 0, IB_DRSMP_DRDLID_F,
+			      drpath->drdlid ? drpath->drdlid : 0xffff);
+		mad_set_field(buf, 0, IB_DRSMP_DRSLID_F,
+			      drpath->drslid ? drpath->drslid : 0xffff);
 
-		/* bytes 128 - 256 - by default should be zero due to memset*/
+		/* bytes 128 - 256 - by default should be zero due to memset */
 		if (is_resp)
 			mad_set_array(buf, 0, IB_DRSMP_RPATH_F, drpath->p);
 		else
 			mad_set_array(buf, 0, IB_DRSMP_PATH_F, drpath->p);
 	}
 
-	if (rpc->mgtclass == IB_SA_CLASS)
+	if ((rpc->mgtclass & 0xff) == IB_SA_CLASS)
 		mad_set_field64(buf, 0, IB_SA_COMPMASK_F, rpc->mask);
 
+	if ((rpc->mgtclass & 0xff) == IB_CC_CLASS) {
+		ib_rpc_cc_t *rpccc = (ib_rpc_cc_t *)rpc;
+		mad_set_field64(buf, 0, IB_CC_CCKEY_F, rpccc->cckey);
+	}
+
 	if (data)
 		memcpy((char *)buf + rpc->dataoffs, data, rpc->datasz);
 
 	/* vendor mads range 2 */
-	if (mad_is_vendor_range2(rpc->mgtclass))
+	if (mad_is_vendor_range2(rpc->mgtclass & 0xff))
 		mad_set_field(buf, 0, IB_VEND2_OUI_F, rpc->oui);
 
-	return (uint8_t *)buf + IB_MAD_SIZE;
+	return (uint8_t *) buf + IB_MAD_SIZE;
 }
 
-int
-mad_build_pkt(void *umad, ib_rpc_t *rpc, ib_portid_t *dport,
-	      ib_rmpp_hdr_t *rmpp, void *data)
+int mad_build_pkt(void *umad, ib_rpc_t * rpc, ib_portid_t * dport,
+		  ib_rmpp_hdr_t * rmpp, void *data)
 {
 	uint8_t *p, *mad;
-	int lid_routed = rpc->mgtclass != IB_SMI_DIRECT_CLASS;
-	int is_smi = (rpc->mgtclass == IB_SMI_CLASS ||
-		      rpc->mgtclass == IB_SMI_DIRECT_CLASS);
+	int lid_routed = (rpc->mgtclass & 0xff) != IB_SMI_DIRECT_CLASS;
+	int is_smi = ((rpc->mgtclass & 0xff) == IB_SMI_CLASS ||
+		      (rpc->mgtclass & 0xff) == IB_SMI_DIRECT_CLASS);
 	struct ib_mad_addr addr;
 
 	if (!is_smi)
-		umad_set_addr(umad, dport->lid, dport->qp, dport->sl, dport->qkey);
+		umad_set_addr(umad, dport->lid, dport->qp, dport->sl,
+			      dport->qkey);
 	else if (lid_routed)
 		umad_set_addr(umad, dport->lid, dport->qp, 0, 0);
 	else if ((dport->drpath.drslid != 0xffff) && (dport->lid > 0))
@@ -199,6 +185,8 @@ mad_build_pkt(void *umad, ib_rpc_t *rpc, ib_portid_t *dport,
 
 	mad = umad_get_mad(umad);
 	p = mad_encode(mad, rpc, lid_routed ? 0 : &dport->drpath, data);
+	if (!p)
+		return -1;
 
 	if (!is_smi && rmpp) {
 		mad_set_field(mad, 0, IB_SA_RMPP_VERS_F, 1);
@@ -210,5 +198,5 @@ mad_build_pkt(void *umad, ib_rpc_t *rpc, ib_portid_t *dport,
 		mad_set_field(mad, 0, IB_SA_RMPP_D2_F, rmpp->d2.u);
 	}
 
-	return p - mad;
+	return ((int)(p - mad));
 }
diff --git a/src/mad_internal.h b/src/mad_internal.h
new file mode 100644
index 0000000..5deac27
--- /dev/null
+++ b/src/mad_internal.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2004-2009 Voltaire Inc.  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.
+ *
+ */
+
+#ifndef _MAD_INTERNAL_H_
+#define _MAD_INTERNAL_H_
+
+#define MAX_CLASS 256
+
+struct ibmad_port {
+	int port_id;		/* file descriptor returned by umad_open() */
+	int class_agents[MAX_CLASS];	/* class2agent mapper */
+	int timeout, retries;
+	uint64_t smp_mkey;
+};
+
+extern struct ibmad_port *ibmp;
+extern int madrpc_timeout;
+extern int madrpc_retries;
+
+#endif /* _MAD_INTERNAL_H_ */
diff --git a/src/portid.c b/src/portid.c
index 24a555b..ceb685e 100644
--- a/src/portid.c
+++ b/src/portid.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2008 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  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
@@ -33,25 +33,19 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/time.h>
 #include <string.h>
-#include <inttypes.h>
 #include <arpa/inet.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
 
-int
-portid2portnum(ib_portid_t *portid)
+int portid2portnum(ib_portid_t * portid)
 {
 	if (portid->lid > 0)
 		return -1;
@@ -59,11 +53,10 @@ portid2portnum(ib_portid_t *portid)
 	if (portid->drpath.cnt == 0)
 		return 0;
 
-	return portid->drpath.p[(portid->drpath.cnt-1)];
+	return portid->drpath.p[(portid->drpath.cnt - 1)];
 }
 
-char *
-portid2str(ib_portid_t *portid)
+char *portid2str(ib_portid_t * portid)
 {
 	static char buf[1024] = "local";
 	int n = 0;
@@ -71,7 +64,8 @@ portid2str(ib_portid_t *portid)
 	if (portid->lid > 0) {
 		n += sprintf(buf + n, "Lid %d", portid->lid);
 		if (portid->grh_present) {
-			char gid[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
+			char gid[sizeof
+				 "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
 			if (inet_ntop(AF_INET6, portid->gid, gid, sizeof(gid)))
 				n += sprintf(buf + n, " Gid %s", gid);
 		}
@@ -86,8 +80,7 @@ portid2str(ib_portid_t *portid)
 	return buf;
 }
 
-int
-str2drpath(ib_dr_path_t *path, char *routepath, int drslid, int drdlid)
+int str2drpath(ib_dr_path_t * path, char *routepath, int drslid, int drdlid)
 {
 	char *s, *str = routepath;
 
@@ -97,10 +90,10 @@ str2drpath(ib_dr_path_t *path, char *routepath, int drslid, int drdlid)
 	while (str && *str) {
 		if ((s = strchr(str, ',')))
 			*s = 0;
-		path->p[++path->cnt] = atoi(str);
+		path->p[++path->cnt] = (uint8_t) atoi(str);
 		if (!s)
 			break;
-		str = s+1;
+		str = s + 1;
 	}
 
 	path->drdlid = drdlid ? drdlid : 0xffff;
@@ -109,17 +102,16 @@ str2drpath(ib_dr_path_t *path, char *routepath, int drslid, int drdlid)
 	return path->cnt;
 }
 
-char *
-drpath2str(ib_dr_path_t *path, char *dstr, size_t dstr_size)
+char *drpath2str(ib_dr_path_t * path, char *dstr, size_t dstr_size)
 {
 	int i = 0;
-	int rc = snprintf(dstr, dstr_size, "slid %d; dlid %d; %d",
-		path->drslid, path->drdlid, path->p[0]);
-	if (rc >= dstr_size)
+	int rc = snprintf(dstr, dstr_size, "slid %u; dlid %u; %d",
+			  path->drslid, path->drdlid, path->p[0]);
+	if (rc >= (int)dstr_size)
 		return dstr;
 	for (i = 1; i <= path->cnt; i++) {
-		rc += snprintf(dstr+rc, dstr_size-rc, ",%d", path->p[i]);
-		if (rc >= dstr_size)
+		rc += snprintf(dstr + rc, dstr_size - rc, ",%d", path->p[i]);
+		if (rc >= (int)dstr_size)
 			break;
 	}
 	return (dstr);
diff --git a/src/register.c b/src/register.c
index a33acd8..1fdb64a 100644
--- a/src/register.c
+++ b/src/register.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004,2005 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  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
@@ -33,53 +33,22 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/time.h>
 #include <string.h>
 #include <errno.h>
 
 #include <infiniband/umad.h>
-#include "mad.h"
+#include <infiniband/mad.h>
+
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
 
-#define MAX_CLASS	256
-#define MAX_AGENTS	256
-
-static int class_agent[MAX_CLASS];
-static int agent_class[MAX_AGENTS];
-
-static int
-register_agent(int agent, int mclass)
-{
-	static int initialized;
-
-	if (!initialized) {
-		initialized++;
-		memset(class_agent, 0xff, sizeof class_agent);
-		memset(agent_class, 0xff, sizeof agent_class);
-	}
-
-	if (mclass < 0 || mclass >= MAX_CLASS ||
-	    agent < 0 || agent >= MAX_AGENTS) {
-		DEBUG("bad mgmt class %d or agent %d", mclass, agent);
-		return -1;
-	}
-
-	class_agent[mclass] = agent;
-	agent_class[agent] = mclass;
-
-	return 0;
-}
-
-static int
-mgmt_class_vers(int mgmt_class)
+static int mgmt_class_vers(int mgmt_class)
 {
 	if ((mgmt_class >= IB_VENDOR_RANGE1_START_CLASS &&
 	     mgmt_class <= IB_VENDOR_RANGE1_END_CLASS) ||
@@ -87,41 +56,33 @@ mgmt_class_vers(int mgmt_class)
 	     mgmt_class <= IB_VENDOR_RANGE2_END_CLASS))
 		return 1;
 
-	switch(mgmt_class) {
-		case IB_SMI_CLASS:
-		case IB_SMI_DIRECT_CLASS:
-			return 1;
-		case IB_SA_CLASS:
-			return 2;
-		case IB_PERFORMANCE_CLASS:
-			return 1;
-		case IB_DEVICE_MGMT_CLASS:
-			return 1;
-		case IB_CC_CLASS:
-			return 2;
+	switch (mgmt_class) {
+	case IB_SMI_CLASS:
+	case IB_SMI_DIRECT_CLASS:
+		return 1;
+	case IB_SA_CLASS:
+		return 2;
+	case IB_PERFORMANCE_CLASS:
+		return 1;
+	case IB_DEVICE_MGMT_CLASS:
+		return 1;
+	case IB_CC_CLASS:
+		return 2;
+	case IB_BOARD_MGMT_CLASS:
+		return 1;
 	}
 
 	return 0;
 }
 
-int
-mad_class_agent(int mgmt)
+int mad_class_agent(int mgmt)
 {
-	if (mgmt < 1 || mgmt > MAX_CLASS)
+	if (mgmt < 1 || mgmt >= MAX_CLASS)
 		return -1;
-	return class_agent[mgmt];
+	return ibmp->class_agents[mgmt];
 }
 
-int
-mad_agent_class(int agent)
-{
-	if (agent < 1 || agent > MAX_AGENTS)
-		return -1;
-	return agent_class[agent];
-}
-
-int
-mad_register_port_client(int port_id, int mgmt, uint8_t rmpp_version)
+int mad_register_port_client(int port_id, int mgmt, uint8_t rmpp_version)
 {
 	int vers, agent;
 
@@ -129,50 +90,63 @@ mad_register_port_client(int port_id, int mgmt, uint8_t rmpp_version)
 		DEBUG("Unknown class %d mgmt_class", mgmt);
 		return -1;
 	}
-	if ((agent = umad_register(port_id, mgmt,
-				   vers, rmpp_version, 0)) < 0) {
-		DEBUG("Can't register agent for class %d", mgmt);
-		return -1;
-	}
 
-	if (mgmt < 0 || mgmt >= MAX_CLASS || agent >= MAX_AGENTS) {
-		DEBUG("bad mgmt class %d or agent %d", mgmt, agent);
-		return -1;
-	}
+	agent = umad_register(port_id, mgmt, vers, rmpp_version, 0);
+	if (agent < 0)
+		DEBUG("Can't register agent for class %d", mgmt);
 
 	return agent;
 }
 
-int
-mad_register_client(int mgmt, uint8_t rmpp_version)
+int mad_register_client(int mgmt, uint8_t rmpp_version)
+{
+	return mad_register_client_via(mgmt, rmpp_version, ibmp);
+}
+
+int mad_register_client_via(int mgmt, uint8_t rmpp_version,
+			    struct ibmad_port *srcport)
 {
 	int agent;
 
-	agent = mad_register_port_client(madrpc_portid(), mgmt, rmpp_version);
+	if (!srcport)
+		return -1;
+
+	agent = mad_register_port_client(mad_rpc_portid(srcport), mgmt,
+					 rmpp_version);
 	if (agent < 0)
 		return agent;
 
-	return register_agent(agent, mgmt);
+	srcport->class_agents[mgmt] = agent;
+	return 0;
 }
 
-int
-mad_register_server(int mgmt, uint8_t rmpp_version,
-		    long method_mask[], uint32_t class_oui)
+int mad_register_server(int mgmt, uint8_t rmpp_version,
+			long method_mask[], uint32_t class_oui)
 {
-	long class_method_mask[16/sizeof(long)];
+	return mad_register_server_via(mgmt, rmpp_version, method_mask,
+				       class_oui, ibmp);
+}
+
+int mad_register_server_via(int mgmt, uint8_t rmpp_version,
+			    long method_mask[], uint32_t class_oui,
+			    struct ibmad_port *srcport)
+{
+	long class_method_mask[16 / sizeof(long)];
 	uint8_t oui[3];
-	int agent, vers, mad_portid;
+	int agent, vers;
 
 	if (method_mask)
-		memcpy(class_method_mask, method_mask, sizeof class_method_mask);
+		memcpy(class_method_mask, method_mask,
+		       sizeof class_method_mask);
 	else
 		memset(class_method_mask, 0xff, sizeof(class_method_mask));
 
-	if ((mad_portid = madrpc_portid()) < 0)
+	if (!srcport)
 		return -1;
 
-	if (class_agent[mgmt] >= 0) {
-		DEBUG("Class 0x%x already registered", mgmt);
+	if (srcport->class_agents[mgmt] >= 0) {
+		DEBUG("Class 0x%x already registered %d",
+		      mgmt, srcport->class_agents[mgmt]);
 		return -1;
 	}
 	if ((vers = mgmt_class_vers(mgmt)) <= 0) {
@@ -184,19 +158,21 @@ mad_register_server(int mgmt, uint8_t rmpp_version,
 		oui[0] = (class_oui >> 16) & 0xff;
 		oui[1] = (class_oui >> 8) & 0xff;
 		oui[2] = class_oui & 0xff;
-		if ((agent = umad_register_oui(mad_portid, mgmt, rmpp_version,
-					       oui, class_method_mask)) < 0) {
+		if ((agent =
+		     umad_register_oui(srcport->port_id, mgmt, rmpp_version,
+				       oui, class_method_mask)) < 0) {
 			DEBUG("Can't register agent for class %d", mgmt);
 			return -1;
 		}
-	} else if ((agent = umad_register(mad_portid, mgmt, vers, rmpp_version,
-					  class_method_mask)) < 0) {
+	} else
+	    if ((agent =
+		 umad_register(srcport->port_id, mgmt, vers, rmpp_version,
+			       class_method_mask)) < 0) {
 		DEBUG("Can't register agent for class %d", mgmt);
 		return -1;
 	}
 
-	if (register_agent(agent, mgmt) < 0)
-		return -1;
+	srcport->class_agents[mgmt] = agent;
 
 	return agent;
 }
diff --git a/src/resolve.c b/src/resolve.c
index 25062f6..f866bf4 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2004-2006 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  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
@@ -33,77 +34,114 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
 #include <string.h>
-#include <sys/time.h>
+#include <arpa/inet.h>
 
-#include <infiniband/common.h>
 #include <infiniband/umad.h>
-#include <mad.h>
+#include <infiniband/mad.h>
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-int
-ib_resolve_smlid_via(ib_portid_t *sm_id, int timeout, const void *srcport)
+int ib_resolve_smlid_via(ib_portid_t * sm_id, int timeout,
+			 const struct ibmad_port *srcport)
 {
-	ib_portid_t self = {0};
+	ib_portid_t self = { 0 };
 	uint8_t portinfo[64];
 	int lid;
 
 	memset(sm_id, 0, sizeof(*sm_id));
 
-	if (!smp_query_via(portinfo, &self, IB_ATTR_PORT_INFO,
-			   0, 0, srcport))
+	if (!smp_query_via(portinfo, &self, IB_ATTR_PORT_INFO, 0, 0, srcport))
 		return -1;
 
 	mad_decode_field(portinfo, IB_PORT_SMLID_F, &lid);
+	mad_decode_field(portinfo, IB_PORT_SMSL_F, &sm_id->sl);
 
 	return ib_portid_set(sm_id, lid, 0, 0);
 }
 
-int
-ib_resolve_smlid(ib_portid_t *sm_id, int timeout)
+int ib_resolve_smlid(ib_portid_t * sm_id, int timeout)
 {
-	return ib_resolve_smlid_via(sm_id, timeout, NULL);
+	return ib_resolve_smlid_via(sm_id, timeout, ibmp);
 }
 
-int
-ib_resolve_guid_via(ib_portid_t *portid, uint64_t *guid, ib_portid_t *sm_id, int timeout, const void *srcport)
+int ib_resolve_gid_via(ib_portid_t * portid, ibmad_gid_t gid,
+		       ib_portid_t * sm_id, int timeout,
+		       const struct ibmad_port *srcport)
 {
 	ib_portid_t sm_portid;
-	char buf[IB_SA_DATA_SIZE] = {0};
+	char buf[IB_SA_DATA_SIZE] = { 0 };
 
 	if (!sm_id) {
 		sm_id = &sm_portid;
 		if (ib_resolve_smlid_via(sm_id, timeout, srcport) < 0)
 			return -1;
 	}
-	if (*(uint64_t*)&portid->gid == 0)
-		mad_set_field64(portid->gid, 0, IB_GID_PREFIX_F, IB_DEFAULT_SUBN_PREFIX);
+
+	if ((portid->lid =
+	     ib_path_query_via(srcport, gid, gid, sm_id, buf)) < 0)
+		return -1;
+
+	return 0;
+}
+
+int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid,
+			ib_portid_t * sm_id, int timeout,
+			const struct ibmad_port *srcport)
+{
+	ib_portid_t sm_portid;
+	uint8_t buf[IB_SA_DATA_SIZE] = { 0 };
+	ib_portid_t self = { 0 };
+	uint64_t selfguid, prefix;
+	ibmad_gid_t selfgid;
+	uint8_t nodeinfo[64];
+
+	if (!sm_id) {
+		sm_id = &sm_portid;
+		if (ib_resolve_smlid_via(sm_id, timeout, srcport) < 0)
+			return -1;
+	}
+
+	if (!smp_query_via(nodeinfo, &self, IB_ATTR_NODE_INFO, 0, 0, srcport))
+		return -1;
+	mad_decode_field(nodeinfo, IB_NODE_PORT_GUID_F, &selfguid);
+	mad_set_field64(selfgid, 0, IB_GID_PREFIX_F, IB_DEFAULT_SUBN_PREFIX);
+	mad_set_field64(selfgid, 0, IB_GID_GUID_F, selfguid);
+
+	memcpy(&prefix, portid->gid, sizeof(prefix));
+	if (!prefix)
+		mad_set_field64(portid->gid, 0, IB_GID_PREFIX_F,
+				IB_DEFAULT_SUBN_PREFIX);
 	if (guid)
 		mad_set_field64(portid->gid, 0, IB_GID_GUID_F, *guid);
 
-	if ((portid->lid = ib_path_query_via(srcport, portid->gid, portid->gid, sm_id, buf)) < 0)
+	if ((portid->lid =
+	     ib_path_query_via(srcport, selfgid, portid->gid, sm_id, buf)) < 0)
 		return -1;
 
+	mad_decode_field(buf, IB_SA_PR_SL_F, &portid->sl);
 	return 0;
 }
 
-int
-ib_resolve_portid_str_via(ib_portid_t *portid, char *addr_str, int dest_type, ib_portid_t *sm_id, const void *srcport)
+int ib_resolve_portid_str_via(ib_portid_t * portid, char *addr_str,
+			      enum MAD_DEST dest_type, ib_portid_t * sm_id,
+			      const struct ibmad_port *srcport)
 {
+	ibmad_gid_t gid;
 	uint64_t guid;
 	int lid;
 	char *routepath;
-	ib_portid_t selfportid = {0};
+	ib_portid_t selfportid = { 0 };
 	int selfport = 0;
 
+	memset(portid, 0, sizeof *portid);
+
 	switch (dest_type) {
 	case IB_DEST_LID:
 		lid = strtol(addr_str, 0, 0);
@@ -133,10 +171,15 @@ ib_resolve_portid_str_via(ib_portid_t *portid, char *addr_str, int dest_type, ib
 		/* handle DR parsing and set DrSLID to local lid */
 		if (ib_resolve_self_via(&selfportid, &selfport, 0, srcport) < 0)
 			return -1;
-		if (str2drpath(&portid->drpath, routepath, selfportid.lid, 0) < 0)
+		if (str2drpath(&portid->drpath, routepath, selfportid.lid, 0) <
+		    0)
 			return -1;
 		return 0;
 
+	case IB_DEST_GID:
+		if (inet_pton(AF_INET6, addr_str, &gid) <= 0)
+			return -1;
+		return ib_resolve_gid_via(portid, gid, sm_id, 0, srcport);
 	default:
 		IBWARN("bad dest_type %d", dest_type);
 	}
@@ -144,18 +187,17 @@ ib_resolve_portid_str_via(ib_portid_t *portid, char *addr_str, int dest_type, ib
 	return -1;
 }
 
-int
-ib_resolve_portid_str(ib_portid_t *portid, char *addr_str, int dest_type, ib_portid_t *sm_id)
+int ib_resolve_portid_str(ib_portid_t * portid, char *addr_str,
+			  enum MAD_DEST dest_type, ib_portid_t * sm_id)
 {
 	return ib_resolve_portid_str_via(portid, addr_str, dest_type,
-					 sm_id, NULL);
+					 sm_id, ibmp);
 }
 
-int
-ib_resolve_self_via(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid,
-		    const void *srcport)
+int ib_resolve_self_via(ib_portid_t * portid, int *portnum, ibmad_gid_t * gid,
+			const struct ibmad_port *srcport)
 {
-	ib_portid_t self = {0};
+	ib_portid_t self = { 0 };
 	uint8_t portinfo[64];
 	uint8_t nodeinfo[64];
 	uint64_t guid, prefix;
@@ -167,6 +209,7 @@ ib_resolve_self_via(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid,
 		return -1;
 
 	mad_decode_field(portinfo, IB_PORT_LID_F, &portid->lid);
+	mad_decode_field(portinfo, IB_PORT_SMSL_F, &portid->sl);
 	mad_decode_field(portinfo, IB_PORT_GID_PREFIX_F, &prefix);
 	mad_decode_field(nodeinfo, IB_NODE_PORT_GUID_F, &guid);
 
@@ -179,8 +222,7 @@ ib_resolve_self_via(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid,
 	return 0;
 }
 
-int
-ib_resolve_self(ib_portid_t *portid, int *portnum, ibmad_gid_t *gid)
+int ib_resolve_self(ib_portid_t * portid, int *portnum, ibmad_gid_t * gid)
 {
-	return ib_resolve_self_via (portid, portnum, gid, NULL);
+	return ib_resolve_self_via(portid, portnum, gid, ibmp);
 }
diff --git a/src/rpc.c b/src/rpc.c
index df28f65..6312d42 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -1,5 +1,7 @@
 /*
- * Copyright (c) 2004-2006 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2009 HNR Consulting.  All rights reserved.
+ * Copyright (c) 2011 Mellanox Technologies LTD.  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
@@ -33,93 +35,104 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/time.h>
 #include <string.h>
 #include <errno.h>
 
 #include <infiniband/umad.h>
-#include "mad.h"
+#include <infiniband/mad.h>
 
-#define MAX_CLASS 256
-
-struct ibmad_port {
-	int port_id;  /* file descriptor returned by umad_open() */
-	int class_agents[MAX_CLASS]; /* class2agent mapper */
-};
+#include "mad_internal.h"
 
 int ibdebug;
 
-static int mad_portid = -1;
+static struct ibmad_port mad_port;
+struct ibmad_port *ibmp = &mad_port;
+
 static int iberrs;
 
-static int madrpc_retries = MAD_DEF_RETRIES;
-static int def_madrpc_timeout = MAD_DEF_TIMEOUT_MS;
+int madrpc_retries = MAD_DEF_RETRIES;
+int madrpc_timeout = MAD_DEF_TIMEOUT_MS;
+
 static void *save_mad;
 static int save_mad_len = 256;
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
-#define ERRS	if (iberrs || ibdebug)	IBWARN
+#define ERRS(fmt, ...) do {	\
+	if (iberrs || ibdebug)	\
+		IBWARN(fmt, ## __VA_ARGS__); \
+} while (0)
 
 #define MAD_TID(mad)	(*((uint64_t *)((char *)(mad) + 8)))
 
-void
-madrpc_show_errors(int set)
+void madrpc_show_errors(int set)
 {
 	iberrs = set;
 }
 
-void
-madrpc_save_mad(void *madbuf, int len)
+void madrpc_save_mad(void *madbuf, int len)
 {
 	save_mad = madbuf;
 	save_mad_len = len;
 }
 
-int
-madrpc_set_retries(int retries)
+int madrpc_set_retries(int retries)
 {
 	if (retries > 0)
 		madrpc_retries = retries;
 	return madrpc_retries;
 }
 
-int
-madrpc_set_timeout(int timeout)
+int madrpc_set_timeout(int timeout)
 {
-	def_madrpc_timeout = timeout;
+	madrpc_timeout = timeout;
 	return 0;
 }
 
-int
-madrpc_def_timeout(void)
+void mad_rpc_set_retries(struct ibmad_port *port, int retries)
+{
+	port->retries = retries;
+}
+
+void mad_rpc_set_timeout(struct ibmad_port *port, int timeout)
 {
-	return def_madrpc_timeout;
+	port->timeout = timeout;
 }
 
-int
-madrpc_portid(void)
+int madrpc_def_timeout(void)
 {
-	return mad_portid;
+	return madrpc_timeout;
+}
+
+int madrpc_portid(void)
+{
+	return ibmp->port_id;
+}
+
+int mad_rpc_portid(struct ibmad_port *srcport)
+{
+	return srcport->port_id;
+}
+
+int mad_rpc_class_agent(struct ibmad_port *port, int class)
+{
+	if (class < 1 || class >= MAX_CLASS)
+		return -1;
+	return port->class_agents[class];
 }
 
 static int
 _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
-	   int timeout)
+	   int timeout, int max_retries, int *p_error)
 {
-	uint32_t trid; /* only low 32 bits */
+	uint32_t trid;		/* only low 32 bits */
 	int retries;
 	int length, status;
 
-	if (!timeout)
-		timeout = def_madrpc_timeout;
-
 	if (ibdebug > 1) {
 		IBWARN(">>> sending: len %d pktsz %zu", len, umad_size() + len);
 		xdump(stderr, "send buf\n", sndbuf, umad_size() + len);
@@ -131,12 +144,12 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
 		save_mad = 0;
 	}
 
-	trid = mad_get_field64(umad_get_mad(sndbuf), 0, IB_MAD_TRID_F);
+	trid =
+	    (uint32_t) mad_get_field64(umad_get_mad(sndbuf), 0, IB_MAD_TRID_F);
 
-	for (retries = 0; retries < madrpc_retries; retries++) {
-		if (retries) {
+	for (retries = 0; retries < max_retries; retries++) {
+		if (retries)
 			ERRS("retry %d (timeout %d ms)", retries, timeout);
-		}
 
 		length = len;
 		if (umad_send(port_id, agentid, sndbuf, length, timeout, 0) < 0) {
@@ -147,55 +160,107 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
 		/* Use same timeout on receive side just in case */
 		/* send packet is lost somewhere. */
 		do {
+			length = len;
 			if (umad_recv(port_id, rcvbuf, &length, timeout) < 0) {
 				IBWARN("recv failed: %m");
 				return -1;
 			}
 
+			if (ibdebug > 2)
+				umad_addr_dump(umad_get_mad_addr(rcvbuf));
 			if (ibdebug > 1) {
 				IBWARN("rcv buf:");
-				xdump(stderr, "rcv buf\n", umad_get_mad(rcvbuf), IB_MAD_SIZE);
+				xdump(stderr, "rcv buf\n", umad_get_mad(rcvbuf),
+				      IB_MAD_SIZE);
 			}
-		} while ((uint32_t)mad_get_field64(umad_get_mad(rcvbuf), 0, IB_MAD_TRID_F) != trid);
+		} while ((uint32_t)
+			 mad_get_field64(umad_get_mad(rcvbuf), 0,
+					 IB_MAD_TRID_F) != trid);
 
 		status = umad_status(rcvbuf);
 		if (!status)
-			return length;		/* done */
+			return length;	/* done */
 		if (status == ENOMEM)
 			return length;
 	}
 
+	*p_error = ETIMEDOUT;
 	ERRS("timeout after %d retries, %d ms", retries, timeout * retries);
 	return -1;
 }
 
-void *
-mad_rpc(const void *port_id, ib_rpc_t *rpc, ib_portid_t *dport, void *payload,
-	void *rcvdata)
+static int redirect_port(ib_portid_t * port, uint8_t * mad)
 {
-	const struct ibmad_port *p = port_id;
-	int status, len;
-	uint8_t sndbuf[1024], rcvbuf[1024], *mad;
+	port->lid = mad_get_field(mad, 64, IB_CPI_REDIRECT_LID_F);
+	if (!port->lid) {
+		IBWARN("GID-based redirection is not supported");
+		return -1;
+	}
 
-	len = 0;
-	memset(sndbuf, 0, umad_size() + IB_MAD_SIZE);
+	port->qp = mad_get_field(mad, 64, IB_CPI_REDIRECT_QP_F);
+	port->qkey = mad_get_field(mad, 64, IB_CPI_REDIRECT_QKEY_F);
+	port->sl = (uint8_t) mad_get_field(mad, 64, IB_CPI_REDIRECT_SL_F);
 
-	if ((len = mad_build_pkt(sndbuf, rpc, dport, 0, payload)) < 0)
-		return 0;
+	/* TODO: Reverse map redirection P_Key to P_Key index */
 
-	if ((len = _do_madrpc(p->port_id, sndbuf, rcvbuf,
-			      p->class_agents[rpc->mgtclass],
-			      len, rpc->timeout)) < 0) {
-		IBWARN("_do_madrpc failed; dport (%s)", portid2str(dport));
-		return 0;
-	}
+	if (ibdebug)
+		IBWARN("redirected to lid %d, qp 0x%x, qkey 0x%x, sl 0x%x",
+		       port->lid, port->qp, port->qkey, port->sl);
 
-	mad = umad_get_mad(rcvbuf);
+	return 0;
+}
+
+void *mad_rpc(const struct ibmad_port *port, ib_rpc_t * rpc,
+	      ib_portid_t * dport, void *payload, void *rcvdata)
+{
+	int status, len;
+	uint8_t sndbuf[1024], rcvbuf[1024], *mad;
+	ib_rpc_v1_t *rpcv1 = (ib_rpc_v1_t *)rpc;
+	int error = 0;
+
+	if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) == IB_MAD_RPC_VERSION1)
+		rpcv1->error = 0;
+	do {
+		len = 0;
+		memset(sndbuf, 0, umad_size() + IB_MAD_SIZE);
+
+		if ((len = mad_build_pkt(sndbuf, rpc, dport, 0, payload)) < 0)
+			return NULL;
+
+		if ((len = _do_madrpc(port->port_id, sndbuf, rcvbuf,
+				      port->class_agents[rpc->mgtclass & 0xff],
+				      len, mad_get_timeout(port, rpc->timeout),
+				      mad_get_retries(port), &error)) < 0) {
+			if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) ==
+			    IB_MAD_RPC_VERSION1)
+				rpcv1->error = error;
+			IBWARN("_do_madrpc failed; dport (%s)",
+			       portid2str(dport));
+			return NULL;
+		}
 
-	if ((status = mad_get_field(mad, 0, IB_DRSMP_STATUS_F)) != 0) {
+		mad = umad_get_mad(rcvbuf);
+		status = mad_get_field(mad, 0, IB_DRSMP_STATUS_F);
+
+		/* check for exact match instead of only the redirect bit;
+		 * that way, weird statuses cause an error, too */
+		if (status == IB_MAD_STS_REDIRECT) {
+			/* update dport for next request and retry */
+			/* bail if redirection fails */
+			if (redirect_port(dport, mad))
+				break;
+		} else
+			break;
+	} while (1);
+
+	if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) == IB_MAD_RPC_VERSION1)
+		rpcv1->error = error;
+	rpc->rstatus = status;
+
+	if (status != 0) {
 		ERRS("MAD completed with error status 0x%x; dport (%s)",
-			status, portid2str(dport));
-		return 0;
+		     status, portid2str(dport));
+		return NULL;
 	}
 
 	if (ibdebug) {
@@ -209,34 +274,42 @@ mad_rpc(const void *port_id, ib_rpc_t *rpc, ib_portid_t *dport, void *payload,
 	return rcvdata;
 }
 
-void *
-mad_rpc_rmpp(const void *port_id, ib_rpc_t *rpc, ib_portid_t *dport,
-	     ib_rmpp_hdr_t *rmpp, void *data)
+void *mad_rpc_rmpp(const struct ibmad_port *port, ib_rpc_t * rpc,
+		   ib_portid_t * dport, ib_rmpp_hdr_t * rmpp, void *data)
 {
-	const struct ibmad_port *p = port_id;
 	int status, len;
 	uint8_t sndbuf[1024], rcvbuf[1024], *mad;
+	ib_rpc_v1_t *rpcv1 = (ib_rpc_v1_t *)rpc;
+	int error = 0;
 
 	memset(sndbuf, 0, umad_size() + IB_MAD_SIZE);
 
 	DEBUG("rmpp %p data %p", rmpp, data);
 
+	if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) == IB_MAD_RPC_VERSION1)
+		rpcv1->error = 0;
 	if ((len = mad_build_pkt(sndbuf, rpc, dport, rmpp, data)) < 0)
-		return 0;
+		return NULL;
 
-	if ((len = _do_madrpc(p->port_id, sndbuf, rcvbuf,
-			      p->class_agents[rpc->mgtclass],
-			      len, rpc->timeout)) < 0) {
+	if ((len = _do_madrpc(port->port_id, sndbuf, rcvbuf,
+			      port->class_agents[rpc->mgtclass & 0xff],
+			      len, mad_get_timeout(port, rpc->timeout),
+			      mad_get_retries(port), &error)) < 0) {
+		if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) == IB_MAD_RPC_VERSION1)
+			rpcv1->error = error;
 		IBWARN("_do_madrpc failed; dport (%s)", portid2str(dport));
-		return 0;
+		return NULL;
 	}
 
+	if ((rpc->mgtclass & IB_MAD_RPC_VERSION_MASK) == IB_MAD_RPC_VERSION1)
+		rpcv1->error = error;
+
 	mad = umad_get_mad(rcvbuf);
 
 	if ((status = mad_get_field(mad, 0, IB_MAD_STATUS_F)) != 0) {
 		ERRS("MAD completed with error status 0x%x; dport (%s)",
-			status, portid2str(dport));
-		return 0;
+		     status, portid2str(dport));
+		return NULL;
 	}
 
 	if (ibdebug) {
@@ -250,7 +323,7 @@ mad_rpc_rmpp(const void *port_id, ib_rpc_t *rpc, ib_portid_t *dport,
 		if ((rmpp->flags & 0x3) &&
 		    mad_get_field(mad, 0, IB_SA_RMPP_VERS_F) != 1) {
 			IBWARN("bad rmpp version");
-			return 0;
+			return NULL;
 		}
 		rmpp->type = mad_get_field(mad, 0, IB_SA_RMPP_TYPE_F);
 		rmpp->status = mad_get_field(mad, 0, IB_SA_RMPP_STATUS_F);
@@ -267,66 +340,47 @@ mad_rpc_rmpp(const void *port_id, ib_rpc_t *rpc, ib_portid_t *dport,
 	return data;
 }
 
-void *
-madrpc(ib_rpc_t *rpc, ib_portid_t *dport, void *payload, void *rcvdata)
+void *madrpc(ib_rpc_t * rpc, ib_portid_t * dport, void *payload, void *rcvdata)
 {
-	struct ibmad_port port;
-
-	port.port_id = mad_portid;
-	port.class_agents[rpc->mgtclass] = mad_class_agent(rpc->mgtclass);
-	return mad_rpc(&port, rpc, dport, payload, rcvdata);
+	return mad_rpc(ibmp, rpc, dport, payload, rcvdata);
 }
 
-void *
-madrpc_rmpp(ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp, void *data)
+void *madrpc_rmpp(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
+		  void *data)
 {
-	struct ibmad_port port;
-
-	port.port_id = mad_portid;
-	port.class_agents[rpc->mgtclass] = mad_class_agent(rpc->mgtclass);
-	return mad_rpc_rmpp(&port, rpc, dport, rmpp, data);
-}
-
-static pthread_mutex_t rpclock = PTHREAD_MUTEX_INITIALIZER;
-
-void
-madrpc_lock(void)
-{
-	pthread_mutex_lock(&rpclock);
-}
-
-void
-madrpc_unlock(void)
-{
-	pthread_mutex_unlock(&rpclock);
+	return mad_rpc_rmpp(ibmp, rpc, dport, rmpp, data);
 }
 
 void
 madrpc_init(char *dev_name, int dev_port, int *mgmt_classes, int num_classes)
 {
+	int fd;
+
 	if (umad_init() < 0)
 		IBPANIC("can't init UMAD library");
 
-	if ((mad_portid = umad_open_port(dev_name, dev_port)) < 0)
+	if ((fd = umad_open_port(dev_name, dev_port)) < 0)
 		IBPANIC("can't open UMAD port (%s:%d)", dev_name, dev_port);
 
 	if (num_classes >= MAX_CLASS)
 		IBPANIC("too many classes %d requested", num_classes);
 
+	ibmp->port_id = fd;
+	memset(ibmp->class_agents, 0xff, sizeof ibmp->class_agents);
 	while (num_classes--) {
-		int rmpp_version = 0;
+		uint8_t rmpp_version = 0;
 		int mgmt = *mgmt_classes++;
 
 		if (mgmt == IB_SA_CLASS)
 			rmpp_version = 1;
-		if (mad_register_client(mgmt, rmpp_version) < 0)
-			IBPANIC("client_register for mgmt class %d failed", mgmt);
+		if (mad_register_client_via(mgmt, rmpp_version, ibmp) < 0)
+			IBPANIC("client_register for mgmt class %d failed",
+				mgmt);
 	}
 }
 
-void *
-mad_rpc_open_port(char *dev_name, int dev_port,
-		  int *mgmt_classes, int num_classes)
+struct ibmad_port *mad_rpc_open_port(char *dev_name, int dev_port,
+				     int *mgmt_classes, int num_classes)
 {
 	struct ibmad_port *p;
 	int port_id;
@@ -358,45 +412,30 @@ mad_rpc_open_port(char *dev_name, int dev_port,
 		return NULL;
 	}
 
+	p->port_id = port_id;
+	memset(p->class_agents, 0xff, sizeof p->class_agents);
 	while (num_classes--) {
-		int rmpp_version = 0;
+		uint8_t rmpp_version = 0;
 		int mgmt = *mgmt_classes++;
-		int agent;
 
 		if (mgmt == IB_SA_CLASS)
 			rmpp_version = 1;
 		if (mgmt < 0 || mgmt >= MAX_CLASS ||
-		    (agent = mad_register_port_client(port_id, mgmt,
-						      rmpp_version)) < 0) {
+		    mad_register_client_via(mgmt, rmpp_version, p) < 0) {
 			IBWARN("client_register for mgmt %d failed", mgmt);
-			if(!errno)
+			if (!errno)
 				errno = EINVAL;
 			umad_close_port(port_id);
-  			free(p);
-  			return NULL;
+			free(p);
+			return NULL;
 		}
-		p->class_agents[mgmt] = agent;
 	}
 
-	p->port_id = port_id;
 	return p;
 }
 
-void
-mad_rpc_close_port(void *port_id)
+void mad_rpc_close_port(struct ibmad_port *port)
 {
-	struct ibmad_port *p = port_id;
-
-	umad_close_port(p->port_id);
-	free(p);
-}
-
-uint8_t *
-sa_call(void *rcvbuf, ib_portid_t *portid, ib_sa_call_t *sa, unsigned timeout)
-{
-	struct ibmad_port port;
-
-	port.port_id = mad_portid;
-	port.class_agents[IB_SA_CLASS] = mad_class_agent(IB_SA_CLASS);
-	return sa_rpc_call(&port, rcvbuf, portid, sa, timeout);
+	umad_close_port(port->port_id);
+	free(port);
 }
diff --git a/src/sa.c b/src/sa.c
index 2e092ec..a9a93cc 100644
--- a/src/sa.c
+++ b/src/sa.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  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
@@ -33,26 +33,22 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
 #include <string.h>
-#include <sys/time.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-uint8_t *
-sa_rpc_call(const void *ibmad_port, void *rcvbuf, ib_portid_t *portid,
-	    ib_sa_call_t *sa, unsigned timeout)
+uint8_t *sa_rpc_call(const struct ibmad_port *ibmad_port, void *rcvbuf,
+		     ib_portid_t * portid, ib_sa_call_t * sa, unsigned timeout)
 {
-	ib_rpc_t rpc = {0};
+	ib_rpc_t rpc = { 0 };
 	uint8_t *p;
 
 	DEBUG("attr 0x%x mod 0x%x route %s", sa->attrid, sa->mod,
@@ -60,7 +56,7 @@ sa_rpc_call(const void *ibmad_port, void *rcvbuf, ib_portid_t *portid,
 
 	if (portid->lid <= 0) {
 		IBWARN("only lid routes are supported");
-		return 0;
+		return NULL;
 	}
 
 	rpc.mgtclass = IB_SA_CLASS;
@@ -77,13 +73,19 @@ sa_rpc_call(const void *ibmad_port, void *rcvbuf, ib_portid_t *portid,
 	if (!portid->qkey)
 		portid->qkey = IB_DEFAULT_QP1_QKEY;
 
-	p = mad_rpc_rmpp(ibmad_port, &rpc, portid, 0/*&sa->rmpp*/, rcvbuf);	/* TODO: RMPP */
+	p = mad_rpc_rmpp(ibmad_port, &rpc, portid, 0 /*&sa->rmpp */ , rcvbuf);	/* TODO: RMPP */
 
 	sa->recsz = rpc.recsz;
 
 	return p;
 }
 
+uint8_t *sa_call(void *rcvbuf, ib_portid_t * portid, ib_sa_call_t * sa,
+		 unsigned timeout)
+{
+	return sa_rpc_call(ibmp, rcvbuf, portid, sa, timeout);
+}
+
 /* PathRecord */
 #define IB_PR_COMPMASK_DGID				(1ull<<2)
 #define IB_PR_COMPMASK_SGID				(1ull<<3)
@@ -108,18 +110,15 @@ sa_rpc_call(const void *ibmad_port, void *rcvbuf, ib_portid_t *portid,
 #define	IB_PR_COMPMASK_PREFERENCE			(1ull<<22)
 
 #define IB_PR_DEF_MASK (IB_PR_COMPMASK_DGID |\
-			IB_PR_COMPMASK_SGID |\
-			IB_PR_COMPMASK_NUMBPATH)
+			IB_PR_COMPMASK_SGID)
 
-int
-ib_path_query_via(const void *srcport, ibmad_gid_t srcgid, ibmad_gid_t destgid, ib_portid_t *sm_id, void *buf)
+int ib_path_query_via(const struct ibmad_port *srcport, ibmad_gid_t srcgid,
+		      ibmad_gid_t destgid, ib_portid_t * sm_id, void *buf)
 {
-	int npath;
-	ib_sa_call_t sa = {0};
+	ib_sa_call_t sa = { 0 };
 	uint8_t *p;
 	int dlid;
 
-	npath = 1;			/* only MAD_METHOD_GET is supported */
 	memset(&sa, 0, sizeof sa);
 	sa.method = IB_MAD_METHOD_GET;
 	sa.attrid = IB_SA_ATTR_PATHRECORD;
@@ -128,15 +127,10 @@ ib_path_query_via(const void *srcport, ibmad_gid_t srcgid, ibmad_gid_t destgid,
 
 	memset(buf, 0, IB_SA_PR_RECSZ);
 
-	mad_encode_field(buf, IB_SA_PR_NPATH_F, &npath);
 	mad_encode_field(buf, IB_SA_PR_DGID_F, destgid);
 	mad_encode_field(buf, IB_SA_PR_SGID_F, srcgid);
 
-	if (srcport) {
-		p = sa_rpc_call (srcport, buf, sm_id, &sa, 0);
-	} else {
-		p = safe_sa_call(buf, sm_id, &sa, 0);
-	}
+	p = sa_rpc_call(srcport, buf, sm_id, &sa, 0);
 	if (!p) {
 		IBWARN("sa call path_query failed");
 		return -1;
@@ -145,8 +139,9 @@ ib_path_query_via(const void *srcport, ibmad_gid_t srcgid, ibmad_gid_t destgid,
 	mad_decode_field(p, IB_SA_PR_DLID_F, &dlid);
 	return dlid;
 }
-int
-ib_path_query(ibmad_gid_t srcgid, ibmad_gid_t destgid, ib_portid_t *sm_id, void *buf)
+
+int ib_path_query(ibmad_gid_t srcgid, ibmad_gid_t destgid, ib_portid_t * sm_id,
+		  void *buf)
 {
-	return ib_path_query_via (NULL, srcgid, destgid, sm_id, buf);
+	return ib_path_query_via(ibmp, srcgid, destgid, sm_id, buf);
 }
diff --git a/src/serv.c b/src/serv.c
index 9b20cb6..2e3b7ef 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004,2005 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  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
@@ -33,44 +33,48 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/time.h>
 #include <string.h>
-#include <netinet/in.h>
 
-#include <infiniband/common.h>
 #include <infiniband/umad.h>
-#include <mad.h>
+#include <infiniband/mad.h>
+
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
 
-int
-mad_send(ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp, void *data)
+int mad_send(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
+	     void *data)
+{
+	return mad_send_via(rpc, dport, rmpp, data, ibmp);
+}
+
+int mad_send_via(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
+		 void *data, struct ibmad_port *srcport)
 {
 	uint8_t pktbuf[1024];
 	void *umad = pktbuf;
 
-	memset(pktbuf, 0, umad_size());
+	memset(pktbuf, 0, umad_size() + IB_MAD_SIZE);
 
 	DEBUG("rmpp %p data %p", rmpp, data);
 
 	if (mad_build_pkt(umad, rpc, dport, rmpp, data) < 0)
-		return 0;
+		return -1;
 
 	if (ibdebug) {
 		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
 		xdump(stderr, "mad send data\n",
-			(char *)umad_get_mad(umad) + rpc->dataoffs, rpc->datasz);
+		      (char *)umad_get_mad(umad) + rpc->dataoffs, rpc->datasz);
 	}
 
-	if (umad_send(madrpc_portid(), mad_class_agent(rpc->mgtclass),
-		      umad, IB_MAD_SIZE, rpc->timeout, 0) < 0) {
+	if (umad_send(srcport->port_id, srcport->class_agents[rpc->mgtclass & 0xff],
+		      umad, IB_MAD_SIZE, mad_get_timeout(srcport, rpc->timeout),
+		      0) < 0) {
 		IBWARN("send failed; %m");
 		return -1;
 	}
@@ -78,12 +82,17 @@ mad_send(ib_rpc_t *rpc, ib_portid_t *dport, ib_rmpp_hdr_t *rmpp, void *data)
 	return 0;
 }
 
-int
-mad_respond(void *umad, ib_portid_t *portid, uint32_t rstatus)
+int mad_respond(void *umad, ib_portid_t * portid, uint32_t rstatus)
+{
+	return mad_respond_via(umad, portid, rstatus, ibmp);
+}
+
+int mad_respond_via(void *umad, ib_portid_t * portid, uint32_t rstatus,
+		    struct ibmad_port *srcport)
 {
 	uint8_t *mad = umad_get_mad(umad);
 	ib_mad_addr_t *mad_addr;
-	ib_rpc_t rpc = {0};
+	ib_rpc_t rpc = { 0 };
 	ib_portid_t rport;
 	int is_smi;
 
@@ -119,23 +128,25 @@ mad_respond(void *umad, ib_portid_t *portid, uint32_t rstatus)
 		rpc.oui = mad_get_field(mad, 0, IB_VEND2_OUI_F);
 
 	rpc.trid = mad_get_field64(mad, 0, IB_MAD_TRID_F);
+	rpc.rstatus = rstatus;
 
 	/* cleared by default: timeout, datasz, dataoffs, mkey, mask */
 
 	is_smi = rpc.mgtclass == IB_SMI_CLASS ||
-		 rpc.mgtclass == IB_SMI_DIRECT_CLASS;
+	    rpc.mgtclass == IB_SMI_DIRECT_CLASS;
 
 	if (is_smi)
 		portid->qp = 0;
 	else if (!portid->qp)
-		 portid->qp = 1;
+		portid->qp = 1;
 
 	if (!portid->qkey && portid->qp == 1)
 		portid->qkey = IB_DEFAULT_QP1_QKEY;
 
-	DEBUG("qp 0x%x class 0x%x method %d attr 0x%x mod 0x%x datasz %d off %d qkey %x",
-		portid->qp, rpc.mgtclass, rpc.method, rpc.attr.id, rpc.attr.mod,
-		rpc.datasz, rpc.dataoffs, portid->qkey);
+	DEBUG
+	    ("qp 0x%x class 0x%x method %d attr 0x%x mod 0x%x datasz %d off %d qkey %x",
+	     portid->qp, rpc.mgtclass, rpc.method, rpc.attr.id, rpc.attr.mod,
+	     rpc.datasz, rpc.dataoffs, portid->qkey);
 
 	if (mad_build_pkt(umad, &rpc, portid, 0, 0) < 0)
 		return -1;
@@ -143,8 +154,9 @@ mad_respond(void *umad, ib_portid_t *portid, uint32_t rstatus)
 	if (ibdebug > 1)
 		xdump(stderr, "mad respond pkt\n", mad, IB_MAD_SIZE);
 
-	if (umad_send(madrpc_portid(), mad_class_agent(rpc.mgtclass), umad,
-		      IB_MAD_SIZE, rpc.timeout, 0) < 0) {
+	if (umad_send
+	    (srcport->port_id, srcport->class_agents[rpc.mgtclass], umad,
+	     IB_MAD_SIZE, mad_get_timeout(srcport, rpc.timeout), 0) < 0) {
 		DEBUG("send failed; %m");
 		return -1;
 	}
@@ -152,15 +164,19 @@ mad_respond(void *umad, ib_portid_t *portid, uint32_t rstatus)
 	return 0;
 }
 
-void *
-mad_receive(void *umad, int timeout)
+void *mad_receive(void *umad, int timeout)
+{
+	return mad_receive_via(umad, timeout, ibmp);
+}
+
+void *mad_receive_via(void *umad, int timeout, struct ibmad_port *srcport)
 {
 	void *mad = umad ? umad : umad_alloc(1, umad_size() + IB_MAD_SIZE);
 	int agent;
 	int length = IB_MAD_SIZE;
 
-	if ((agent = umad_recv(madrpc_portid(), mad,
-			       &length, timeout)) < 0) {
+	if ((agent = umad_recv(srcport->port_id, mad, &length,
+			       mad_get_timeout(srcport, timeout))) < 0) {
 		if (!umad)
 			umad_free(mad);
 		DEBUG("recv failed: %m");
@@ -170,14 +186,12 @@ mad_receive(void *umad, int timeout)
 	return mad;
 }
 
-void *
-mad_alloc(void)
+void *mad_alloc(void)
 {
 	return umad_alloc(1, umad_size() + IB_MAD_SIZE);
 }
 
-void
-mad_free(void *umad)
+void mad_free(void *umad)
 {
 	umad_free(umad);
 }
diff --git a/src/smp.c b/src/smp.c
index 2c2bde2..14c74ed 100644
--- a/src/smp.c
+++ b/src/smp.c
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2011 Mellanox Technologies LTD.  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
@@ -33,25 +34,34 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-uint8_t *
-smp_set_via(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsigned timeout, const void *srcport)
+void smp_mkey_set(struct ibmad_port *srcport, uint64_t mkey)
 {
-	ib_rpc_t rpc = {0};
+	srcport->smp_mkey = mkey;
+}
+
+uint64_t smp_mkey_get(const struct ibmad_port *srcport)
+{
+	return srcport->smp_mkey;
+}
+
+uint8_t *smp_set_status_via(void *data, ib_portid_t * portid, unsigned attrid,
+			    unsigned mod, unsigned timeout, int *rstatus,
+			    const struct ibmad_port *srcport)
+{
+	ib_rpc_t rpc = { 0 };
+	uint8_t *res;
 
 	DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid));
 	if ((portid->lid <= 0) ||
@@ -59,7 +69,7 @@ smp_set_via(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsi
 	    (portid->drpath.drdlid == 0xffff))
 		rpc.mgtclass = IB_SMI_DIRECT_CLASS;	/* direct SMI */
 	else
-		rpc.mgtclass = IB_SMI_CLASS;		/* Lid routed SMI */
+		rpc.mgtclass = IB_SMI_CLASS;	/* Lid routed SMI */
 
 	rpc.method = IB_MAD_METHOD_SET;
 	rpc.attr.id = attrid;
@@ -67,28 +77,37 @@ smp_set_via(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsi
 	rpc.timeout = timeout;
 	rpc.datasz = IB_SMP_DATA_SIZE;
 	rpc.dataoffs = IB_SMP_DATA_OFFS;
+	rpc.mkey = srcport->smp_mkey;
 
 	portid->sl = 0;
 	portid->qp = 0;
 
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, portid, data, data);
-	} else {
-		return madrpc(&rpc, portid, data, data);
-	}
+	res = mad_rpc(srcport, &rpc, portid, data, data);
+	if (rstatus)
+		*rstatus = rpc.rstatus;
+	return res;
 }
 
-uint8_t *
-smp_set(void *data, ib_portid_t *portid, unsigned attrid, unsigned mod, unsigned timeout)
+uint8_t *smp_set_via(void *data, ib_portid_t * portid, unsigned attrid,
+		     unsigned mod, unsigned timeout,
+		     const struct ibmad_port *srcport)
 {
-	return smp_set_via(data, portid, attrid, mod, timeout, NULL);
+	return smp_set_status_via(data, portid, attrid, mod, timeout, NULL,
+				  srcport);
 }
 
-uint8_t *
-smp_query_via(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	      unsigned timeout, const void *srcport)
+uint8_t *smp_set(void *data, ib_portid_t * portid, unsigned attrid,
+		 unsigned mod, unsigned timeout)
 {
-	ib_rpc_t rpc = {0};
+	return smp_set_via(data, portid, attrid, mod, timeout, ibmp);
+}
+
+uint8_t *smp_query_status_via(void *rcvbuf, ib_portid_t * portid,
+			      unsigned attrid, unsigned mod, unsigned timeout,
+			      int *rstatus, const struct ibmad_port * srcport)
+{
+	ib_rpc_t rpc = { 0 };
+	uint8_t *res;
 
 	DEBUG("attr 0x%x mod 0x%x route %s", attrid, mod, portid2str(portid));
 	rpc.method = IB_MAD_METHOD_GET;
@@ -97,27 +116,34 @@ smp_query_via(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
 	rpc.timeout = timeout;
 	rpc.datasz = IB_SMP_DATA_SIZE;
 	rpc.dataoffs = IB_SMP_DATA_OFFS;
+	rpc.mkey = srcport->smp_mkey;
 
 	if ((portid->lid <= 0) ||
 	    (portid->drpath.drslid == 0xffff) ||
 	    (portid->drpath.drdlid == 0xffff))
 		rpc.mgtclass = IB_SMI_DIRECT_CLASS;	/* direct SMI */
 	else
-		rpc.mgtclass = IB_SMI_CLASS;		/* Lid routed SMI */
+		rpc.mgtclass = IB_SMI_CLASS;	/* Lid routed SMI */
 
 	portid->sl = 0;
 	portid->qp = 0;
 
-	if (srcport) {
-		return mad_rpc(srcport, &rpc, portid, 0, rcvbuf);
-	} else {
-		return madrpc(&rpc, portid, 0, rcvbuf);
-	}
+	res = mad_rpc(srcport, &rpc, portid, rcvbuf, rcvbuf);
+	if (rstatus)
+		*rstatus = rpc.rstatus;
+	return res;
+}
+
+uint8_t *smp_query_via(void *rcvbuf, ib_portid_t * portid, unsigned attrid,
+		       unsigned mod, unsigned timeout,
+		       const struct ibmad_port * srcport)
+{
+	return smp_query_status_via(rcvbuf, portid, attrid, mod, timeout, NULL,
+				    srcport);
 }
 
-uint8_t *
-smp_query(void *rcvbuf, ib_portid_t *portid, unsigned attrid, unsigned mod,
-	  unsigned timeout)
+uint8_t *smp_query(void *rcvbuf, ib_portid_t * portid, unsigned attrid,
+		   unsigned mod, unsigned timeout)
 {
-	return smp_query_via(rcvbuf, portid, attrid, mod, timeout, NULL);
+	return smp_query_via(rcvbuf, portid, attrid, mod, timeout, ibmp);
 }
diff --git a/src/vendor.c b/src/vendor.c
index 468e2d3..22d6843 100644
--- a/src/vendor.c
+++ b/src/vendor.c
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2004,2005 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2011 Mellanox Technologies LTD.  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
@@ -33,67 +34,78 @@
 
 #if HAVE_CONFIG_H
 #  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
+#include <errno.h>
 
-#include <mad.h>
-#include <infiniband/common.h>
+#include <infiniband/mad.h>
+#include "mad_internal.h"
 
 #undef DEBUG
 #define DEBUG 	if (ibdebug)	IBWARN
 
-static inline int
-response_expected(int method)
+static inline int response_expected(int method)
 {
 	return method == IB_MAD_METHOD_GET ||
-		method == IB_MAD_METHOD_SET ||
-		method == IB_MAD_METHOD_TRAP;
+	    method == IB_MAD_METHOD_SET || method == IB_MAD_METHOD_TRAP;
 }
 
-uint8_t *
-ib_vendor_call(void *data, ib_portid_t *portid, ib_vendor_call_t *call)
+uint8_t *ib_vendor_call(void *data, ib_portid_t * portid,
+			ib_vendor_call_t * call)
 {
-	ib_rpc_t rpc = {0};
+	return ib_vendor_call_via(data, portid, call, ibmp);
+}
+
+uint8_t *ib_vendor_call_via(void *data, ib_portid_t * portid,
+			    ib_vendor_call_t * call,
+			    struct ibmad_port * srcport)
+{
+	ib_rpc_v1_t rpc = { 0 };
+	ib_rpc_t *rpcold = (ib_rpc_t *)(void *)&rpc;
 	int range1 = 0, resp_expected;
+	void *p_ret;
 
 	DEBUG("route %s data %p", portid2str(portid), data);
 	if (portid->lid <= 0)
-		return 0;	/* no direct SMI */
+		return NULL;	/* no direct SMI */
 
 	if (!(range1 = mad_is_vendor_range1(call->mgmt_class)) &&
 	    !(mad_is_vendor_range2(call->mgmt_class)))
-		return 0;
+		return NULL;
 
 	resp_expected = response_expected(call->method);
 
-	rpc.mgtclass = call->mgmt_class;
+	rpc.mgtclass = call->mgmt_class | IB_MAD_RPC_VERSION1;
 
 	rpc.method = call->method;
 	rpc.attr.id = call->attrid;
 	rpc.attr.mod = call->mod;
 	rpc.timeout = resp_expected ? call->timeout : 0;
-	rpc.datasz = range1 ? IB_VENDOR_RANGE1_DATA_SIZE : IB_VENDOR_RANGE2_DATA_SIZE;
-	rpc.dataoffs = range1 ? IB_VENDOR_RANGE1_DATA_OFFS : IB_VENDOR_RANGE2_DATA_OFFS;
+	rpc.datasz =
+	    range1 ? IB_VENDOR_RANGE1_DATA_SIZE : IB_VENDOR_RANGE2_DATA_SIZE;
+	rpc.dataoffs =
+	    range1 ? IB_VENDOR_RANGE1_DATA_OFFS : IB_VENDOR_RANGE2_DATA_OFFS;
 
 	if (!range1)
 		rpc.oui = call->oui;
 
-	DEBUG("class 0x%x method 0x%x attr 0x%x mod 0x%x datasz %d off %d res_ex %d",
-		rpc.mgtclass, rpc.method, rpc.attr.id, rpc.attr.mod,
-		rpc.datasz, rpc.dataoffs, resp_expected);
+	DEBUG
+	    ("class 0x%x method 0x%x attr 0x%x mod 0x%x datasz %d off %d res_ex %d",
+	     rpc.mgtclass, rpc.method, rpc.attr.id, rpc.attr.mod, rpc.datasz,
+	     rpc.dataoffs, resp_expected);
 
 	portid->qp = 1;
 	if (!portid->qkey)
 		portid->qkey = IB_DEFAULT_QP1_QKEY;
 
-	if (resp_expected)
-		return madrpc_rmpp(&rpc, portid, 0, data);		/* FIXME: no RMPP for now */
+	if (resp_expected) {
+		p_ret = mad_rpc_rmpp(srcport, rpcold, portid, 0, data);	/* FIXME: no RMPP for now */
+		errno = rpc.error;
+		return p_ret;
+	}
 
-	return mad_send(&rpc, portid, 0, data) < 0 ? 0 : data;		/* FIXME: no RMPP for now */
+	return mad_send_via(rpcold, portid, 0, data, srcport) < 0 ? 0 : data;	/* FIXME: no RMPP for now */
 }

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



More information about the Pkg-ofed-commits mailing list