[Debian-ha-svn-commits] [SCM] corosync Debian packaging branch, upstream, updated. upstream/1.2.6-3-g9f10a99

Guido Günther agx at sigxcpu.org
Wed Aug 24 07:32:00 UTC 2011


The following commit has been merged in the upstream branch:
commit 9f10a99a4e2235de810d1b20bb621a9011c30666
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Aug 24 09:23:54 2011 +0200

    New upstream version 1.4.1

diff --git a/.tarball-version b/.tarball-version
index f0bb29e..347f583 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-1.3.0
+1.4.1
diff --git a/.version b/.version
index f0bb29e..347f583 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.3.0
+1.4.1
diff --git a/ChangeLog b/ChangeLog
index 744b927..4318c05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,883 @@
+2011-07-26  Jan Friesse  <jfriesse at redhat.com>
+
+	main: let poll really stop before totempg_finalize
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit d4fb83e971b6fa9af0447ce0a70345fb20064dc1)
+
+	Revert "totemsrp: Remove recv_flush code"
+	This reverts commit 1a7b7a39f445be63c697170c1680eeca9834de39.
+
+	Reversion is needed to remove overflow of receive buffers and dropping
+	messages.
+
+	(cherry picked from commit ddb5214c2c57194fe8e12d775398bfc5726743c4)
+
+2011-07-26  MORITA Kazutaka  <morita.kazutaka at lab.ntt.co.jp>
+
+	totemsrp: fix buffer overflows for large clusters (> 100 nodes)
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 1d9f444feced36ec6118b4df5560f093ec44aba8)
+
+2011-07-21  Jan Friesse  <jfriesse at redhat.com>
+
+	specfile: Install corosync-signals.conf for dbus
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 2d75c7058f32b0f58aa5c825c13187103fcde1b2)
+
+	specfile: use _datadir as var expansion not exec
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit a197e7b1cec329701167def358f8c603b5dd054c)
+
+	specfile: Correct URL and source0
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit f103fb29b3e062dff67338fd75b91ea59ceb4972)
+
+2011-07-21  Tim Beale  <tim.beale at alliedtelesis.co.nz>
+
+	Add some more stats for debugging
+	+ overload - number of times client is told to try again
+	+ invalid_request - message contained invalid paramter, e.g. invalid size
+	+ msg_queue_avail - messages currently available at the Totem layer
+	+ msg-queue_reserved - messages currently reserved at the Totem layer
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 04f37df2f774b0d25540e27102c8a60527aa7125)
+
+2011-07-18  Jan Friesse  <jfriesse at redhat.com>
+
+	rrp: Handle rollower in passive rrp properly
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit ad5cda223c0916ea517d6f9f6c0ff4af3cd32246)
+
+	rrp: handle rollover in active rrp properly
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit d02d2887471423bd23247895d96a0d687255aa55)
+
+	totemconfig: Change default FAIL_TO_RECV_CONST
+	Previous default (50) was too low for most modern switch hardware. This
+	may trigger abort because the aru doesn't increase for 50 token
+	rotations combined with a defect in how failed to recv conditions are
+	handled.  By increasing this tunable, the condition should no longer
+	trigger the errant code.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit a48c8e517d82d099bfd3f4a8ebc11716eeb3962b)
+
+2011-07-18  Steven Dake  <sdake at redhat.com>
+
+	Correct missing poll funtions from service handler struct needed for confdb APIs
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+	(cherry picked from commit c544e87bb0bfdb6e2c5a43ec01113f814e738550)
+
+	Fix problem where corosync will segfault if there are gaps in recovery queue
+	Fixes a problem where there are gaps in the recovery queue.  Example my_aru = 5,
+	but there are messages at 7,8.  8 = my_high_seq_received which results
+	in data slots taken up in new message queue.  What should really happen
+	is these last messages should be delivered after a transitional
+	configuration to maintain SAFE agreement.  We don't have support for
+	SAFE atm, so it is probably safe just to throw these messages away.  Without
+	this change, the new message queue on a new configuraton change is out of sync.
+
+	Tested-by: Tim Beale <tlbeale at gmail.com>
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+	(cherry picked from commit a3d98f1652011d6bc75101c7b8aa098c2d2977e4)
+
+2011-07-15  Jan Friesse  <jfriesse at redhat.com>
+
+	Ensure that strings are null terminated after strncpy().
+	From the strcpy(3) man page, the following warning is given:
+	  The strncpy() function is similar, except that at most n bytes of src
+	  are  copied.  Warning: If there is no null byte among the first n bytes
+	  of src, the string placed in dest will not be null-terminated.
+
+	The current corosync code base does not take this warning into account
+	when using strncpy, potentially resulting in non-null terminated strings.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(backported from commit a609f79f1f8d23f8e57fe2afb383bd62621545f6)
+
+	cfgtool: print list of IP with space between items
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit b4bef1cbf533ec1b8bdefb21a7987c6f69a40b3d)
+
+	cpgtool: print list of IP with space between items
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit f6df7823fafed80f555b6a7d76643d2b555d17bb)
+
+	cfg_get_node_addrs: Return correct addresses
+	Zero element array behavior is very different from normal array or
+	pointer. This behavior is root of problem in not returning correctly
+	filled array of addresses. This appeared only in rrp mode, where more
+	then one address is returned.
+
+	All memcpy's are now correctly converted to copy pointer to char.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 033f7ced1061e39647b0b9d07e1eecb74839cd8a)
+
+	corosync-fplay: use uint32_t and remove bit-shift
+	The flight recorder records all data in 32 bit words. Use uint32_t type
+	rather then unsigned int. Also remove bit-shift with multiply by sizeof
+	uint32_t.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 12163b62d2d84ec438f35f5b942d3e8525585755)
+
+	corosync-fplay: Use size_t length mod in printf
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit d3e9382d57e02724b44ea5f5736f42deb6c65a82)
+
+	corosync-fplay: handle too large rec_size
+	Corrupted files may contain items with rec_size larger then g_record
+	buffer and/or flt_data_size.
+
+	Also g_record array size is now defined as constant.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 7b0517f5e97af89ecb0a1c3145ad1db2a35475f5)
+
+	logsys: Properly lock flt data before dump
+	Data needs to be locked, otherwise resulting fdata file may be
+	incorrect.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit c5e823732504e0c6e9e0eb66870bcacafde080c9)
+
+	logsys: Don't leak fd on successful fdata dump
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 88515e3d20d9b34cc7a15e8da717aeb0a9965900)
+
+	Handle "nocluster" kernel parameter in init script
+	Init script checks kernel parameters and refuses to start corosync if
+	nocluster parameter exist on boot time. The init script will
+	continue to work as expected from console/tty after boot.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit fbbb3f01cbb7b5a6a105dbc4fe1541ca8bdb5e4d)
+
+2011-07-08  Jan Friesse  <jfriesse at redhat.com>
+
+	totemiba: free send_buf on ibv_reg_mr failure
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 57749ec02a081b21218508355f139315bb95b652)
+
+2011-07-07  Florian Haas  <florian.haas at linbit.com>
+
+	build: disable RDMA support in RPMs by default
+	Rather than curiously disable RDMA support by default in configure and
+	enable it by default in RPM builds, streamline the default
+	configuration to always turn RDMA support off. It can be enabled in
+	RPM builds with "--with rdma".
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 051bca82df29d3448c55b772a4c4935c70c83643)
+
+	build: set RDMA related _LIBS and _CFLAGS only if building with RDMA support
+	Having to force {ibverbs,rdmacm}_{LIBS,CFLAGS} looks positively odd;
+	so this may warrant further review. However, they are definitely not
+	needed if building without RDMA support.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit e715a455b6fc2582f505f4b24ac1500068687ba9)
+
+	build: make RDMA support an RPM build conditional
+	Enable RDMA in RPM builds by default to maintain the previous behavior
+	(which always included --enable-rdma in the %configure invocation).
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 17fb819af1168d2d271a4d49a3f2536addcb80ed)
+
+	build: force LC_ALL=C correctly for dates
+	Failure to force "C" dates will have RPM et al. complain about invalid
+	dates and timestamps.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit b8809eaf270196ecb061fefa043c7bca8af75b06)
+
+2011-07-07  Tim Beale  <tim.beale at alliedtelesis.co.nz>
+
+	Fix compile/runtime issues for _POSIX_THREAD_PROCESS_SHARED < 1
+	For the case where _POSIX_THREAD_PROCESS_SHARED < 1, the code doesn't compile
+	for corosync v1.3.1. And when it does compile, it crashes on our system - our
+	version of uClibc seems to always expect a 4th arg. The man pages suggests
+	the 4th arg is optional, but does say: 'For greater portability it is best to
+	always call semctl() with four arguments', which is what this patch does.
+	Also removed semop as it's an unused variable.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 77f7e5b0fe40338e6e5760feb12768defa6b0cf9)
+
+	getpwnam_r()/getgrnam_r() returns ERANGE for some systems
+	On our system the expected buffer length is 256. This means calls to
+	getpwnam_r()/getgrnam_r() return ERANGE error and corosync fails to startup.
+	These 2 functions return ERANGE when insufficient buffer space is supplied.
+	Judging by the man page for getpwnam_r, the correct way to determine the
+	buffersize on any given system is to use sysconf().
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit ba107f0a33fd5e6ef4073b9cc5539740e6ae3c12)
+
+2011-07-07  Jiaju Zhang  <jjzhang.linux at gmail.com>
+
+	RRP: redundant ring automatic recovery
+	This patch automatically recovers redundant ring failures.
+
+	Please note that this patch introduced rrp_autorecovery_check_timeout
+	in totem config hence breaks internal ABI. The internal ABI users
+	of totem.h need to rebuild their binaries.
+
+	Tested-by: Jan Friesse <jfriesse at redhat.com>
+	Tested-by: Florian Haas <florian.haas at linbit.com>
+	Tested-by: Jiaju Zhang <jjzhang at suse.de>
+	(cherry picked from commit 5dc33c2824e9fd2b8c18e2e30cf60210c5e8617e)
+
+2011-07-07  Jan Friesse  <jfriesse at redhat.com>
+
+	flatiron: enable compile with --enable-fatal-warnings
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-07-04  Tim Serong  <tserong at novell.com>
+
+	Correct mailing list address in corosync_overview manpage
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 5a3a42dd2b6f9c12af4a653f6bd1b0b808581690)
+
+2011-07-04  Masatake YAMATO  <yamato at redhat.com>
+
+	fix typos in cpg_mcast_joined.3 and cpg_zcb_mcast_joined.3
+	(cherry picked from commit 7ba892dac323f9656c16981e02d3612f521bfbdb)
+
+2011-07-04  Steven Dake  <sdake at redhat.com>
+
+	Add coverity target to corosync makefile.am
+	Allow a make coverity target for those developers with coverity tools
+	available to them.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+	(cherry picked from commit 899052484eaf3cee08d0a56b6579b73bf2ce99a0)
+
+2011-06-29  Jan Friesse  <jfriesse at redhat.com>
+
+	coroipcc: Test _SC_PAGESIZE result
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 94d934e0e0fa55027a974eb709a488802ee6134e)
+
+	Remove spinlocks
+	Spinlocks are now removed, because even spinlock can improve
+	speed is some special cases, in most cases it makes corosync CPU usage
+	much more intensive and less responsive then if only mutexes are used.
+
+	What we were doing is:
+	pthread_mutex_lock
+	pthread_spin_lock
+	pthread_spin_unlock
+	pthread_mutex_unlock
+
+	what is not safe.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(backported from commit 8c717c22b2f137f81ac5ae1a3437d73b62bb451d)
+
+	votequorum: free newly allocated node if nodeid==0
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 5458d4f27ad956d23a27a0d83b9cf9a6e36e68d0)
+
+2011-06-28  Jerome Flesch  <jerome.flesch at netasq.com>
+
+	Fix usage of strerror_r()/perror()
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+	(backported from commit 00434a4f10f0a0b0dfb1714504860d7ef560f7fb)
+
+2011-06-28  Steven Dake  <sdake at redhat.com>
+
+	sched_params log message incorrect
+	The sched_params parameter was set before being printed.
+
+	Reviewed-by:  <sdake at redhat.com>
+	(cherry picked from commit ae4a3af3407ec185f88172fdc88cc6227647565b)
+
+2011-06-28  Jan Friesse  <jfriesse at redhat.com>
+
+	confdb: Resolve dispatch deadlock
+	Following situation could happen:
+	- one thread is waiting for finish write operation (line 853), objdb is
+	  locked
+	- flush (done in objdb_notify_dispatch) is called in main thread, but
+	  this call will never appear because main thread is waiting for objdb
+	  lock.
+
+	In this situation deadlock appears.
+
+	Commit solves this by:
+	- setting pipe to non-blocking mode
+	- pipe is used only as trigger for coropoll
+	- dispatch messages are stored in list
+	- main thread is processing messages from list
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit b5d2f4578a239c6ee500e43542a93d0fa48d7fb6)
+
+	objdb: save copy of handles in object_find_create
+	Following situation could happen:
+	- process 1 thru confdb creates find handle
+	- calls find iteration once
+	- different process 2 deletes object pointed by process 1 iterator
+	- process 1 calls iteration again ->
+	  object_find_instance->find_child_list is invalid pointer
+
+	-> segfault
+
+	Now object_find_create creates array of matching object handlers and
+	object_find_next uses that array together with check for name. This
+	prevents situation where between steps 2 and 3 new object is created
+	with different name but sadly with same handle.
+
+	Also good to note that this patch is more or less quick hack rather
+	then proper solution. Real proper solution is to not use pointers
+	and rather use handles everywhere. This is big TODO.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit e8000c7b9b93b2ac4e6bec39df26755fdd4a8cf0)
+
+2011-06-28  Jiaju Zhang  <jjzhang.linux at gmail.com>
+
+	RRP: Fix ring initialization issue for UDPU mode
+	Redundant ring has some problem in the UDP unicast mode. The problem
+	is the second ring has not been successfully initialized, that is, the
+	second time iface_changes happens, the member list for that interface
+	has not been added, which results in that ring cannot transmit normal
+	message. So the second ring cannot take over the work if the first
+	ring is down. This patch fixes this issue.
+
+	comments from review:
+	More work is needed probably in totemnet where totemnet maintains the
+	the of node list and an iterator for them, and totemudpu_member_add adds
+	state information to a context for the iteration.
+
+	In any regard, that is somewhat difficult to test, so I'll merge this
+	patch for now - keep in mind interface changes on the bindnetaddr will
+	cause problems with udpu after this patch has been commmitted.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit c6bfc6b5d62d19686104265e8a1b2409f4c1eaf8)
+
+2011-06-28  Jan Friesse  <jfriesse at redhat.com>
+
+	coroipcc: check recvmsg result in socket_recv
+	According specification recvmsg can return 0, which means that
+	connection is closed. We had this check, but limited only for systems
+	other then Linux. recvmsg can return 0 even on Linux, so check is now
+	applied on all systems.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+	(cherry picked from commit 2e5dc5f322a5a852d31f5775debbf51e062695ba)
+
+	confdb: Properly check result of object_find_create
+	in confdb_object_iter result of object_find_create is now properly
+	checked. object_find_create can return -1 if object doesn't exists.
+	Without this check, incorrect handle (memory garbage) was directly
+	passed to object_find_next.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+	(cherry picked from commit 9afb4bdaa84aa3e7b48aa0a5136ee039dc73e19a)
+
+	crypto: rng_make_prng prevent buf overflow
+	with bits set to 1023, buf of 256 bytes was filled by rng_get_bytes
+	up to 257 bytes. Buf is now 258 bytes so it's no longer problem.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 50f05bfa15622e10f58511e8b0b8dadfe670e12f)
+
+	mainconfig: Check retval of logsys_format_set
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit afa0398ca4a605c0896b0d02b02805db736c0090)
+
+	testcpgzc: fgets buffer to really allocated size
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit aa23d20125ed9845186471e417bbe010978b7c29)
+
+	cpg: do_proc_join change list_slice to list_add
+	In this concrete case result is equivalent but makes coverity happy.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit f95d3b3bf206995d0bc04ae4b1855932eaaa4911)
+
+	totemudp: memset of proper size
+	In totemudp_mcast_thread_state_constructor memset to
+	sizeof(struct totemudp_mcast_thread_state) instead of size of
+	pointer.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 531e81602f8b47846aec8573dc57cb8941100367)
+
+	coroipcs: init buf in coroipcs_handler_dispatch
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit ea0a24866ccf27a4010edf75c5d0d223a84c80cd)
+
+	coroparse: don't leak dirent
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit c2a39cb8e2b3cc717dfe273425df3f2b4d0b48c0)
+
+	logsys: _logsys_wthread_create never returns != 0
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit d76bb76d1fef350eef74ada4f834c2011a70889e)
+
+	notifyd: Check retval of corosync_cfg_initialize
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 844c8759d72637e1c7776d598744343ddee62e2e)
+
+	totemconfig: discard check of objdb_get_string ret
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 6b9297131cda9ae874effa4e27ad70601a56d977)
+
+	coroipcc: proper path size in coroipcc_zcb_alloc
+	memory_map function internally limits maximum path size to
+	PATH_MAX but coroipcc_zcb_alloc passed smaller buffer.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 0273c54054f7e8c83b165daa1a4ded13f78f0515)
+
+	libquorum: memset/memcpy proper size of callbacks
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 6af98e79ee7f0278b641cb8f0cd8d8499988e373)
+
+	iazc: Reduce number of mem alloc and memcpy
+	X86 processors are able to handle unaligned memory access. Improve
+	performance by using that feature on i386 and x86_64 compatible
+	processors, and use old aligning code on different processors.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 77d98081251d1821ff62777dffd4543700737e02)
+
+2011-06-28  Jerome Flesch  <jerome.flesch at netasq.com>
+
+	logsys: When corosync is compiled with --enable-small-memory-footprint, also reduce the size of the logsys SHM
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 6bec0aa2276530d25a1984e90f7bd274f8d0c75b)
+
+	coroipcc_dispatch_get(): Fix --enable-small-memory-footprint support
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+	(cherry picked from commit 795aa5e24cee83c88b8a6ea3a3fd06e754f55010)
+
+	coroipcs_handler_dispatch(): Fix conn_info->service security value: -1 is not a good security value since it's equal to SOCKET_SERVICE_INIT
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+	(cherry picked from commit b11267211515e4fc50882acd5f2afe493c363708)
+
+	coroipcc: Fix unhandled BSD EOF in coroipcc_dispatch_get()
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 76426d7901def8bd7f3da8b07107f765dd8572d4)
+
+	Corosync: Fix build when done with --enable-fatal-warnings
+	Reviewed-by: Jan Friesse<jfriesse at redhat.com>
+	(backported from commit fe51e703675232a69009245cd9e0523bb1858dd6)
+
+2011-06-28  Russell Bryant  <russell at russellbryant.net>
+
+	logsys.c: Use snprintf() instead of sprintf().
+	Change a couple of string functions to use the the output length
+	limiting counterpart.
+
+	(cherry picked from commit a53e402912a7c4c4039b928d3b741fe8239ab2f7)
+
+2011-06-28  Jan Friesse  <jfriesse at redhat.com>
+
+	corosync-objctl: Option to display binary data
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 801717e46391af0b4d3103746b721e663f6db167)
+
+2011-06-28  Angus Salkeld  <asalkeld at redhat.com>
+
+	cpg: fix sync master selection when one node paused.
+	If one node is paused it can miss a config change and
+	thus report a larger old_members than expected.
+
+	The solution is to use the left_nodes field.
+
+	Master selection used to be "choose node with":
+	1) largest previous membership
+	2) (then as a tie-breaker) node with smallest nodeid
+
+	New selection:
+	1) largest (previous #nodes - #nodes know to have left)
+	2) (then as a tie-breaker) node with smallest nodeid
+
+	(cherry picked from commit 956a1dcb4236acbba37c07e2ac0b6c9ffcb32577)
+
+2011-06-28  Jan Friesse  <jfriesse at redhat.com>
+
+	totemsrp: Enhance mcast failure detection
+	memb_state_gather_enter increase stats.continuous_gather only if
+	previous state was gather also. This should happen only if multicast is
+	not working properly (local firewall in most cases) and not if many
+	nodes joins at one time.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+	(cherry picked from commit 61d83cd719bcc93a78eb5c718a138b96c325cc3e)
+
+	coroipcs: Deny connect to service without initfn
+	If library connect to service with no init function, coroipcs will try
+	to dereference NULL pointer. Now we correctly return error code
+	CS_ERR_NOT_EXIST.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	(cherry picked from commit 719fddd8e16b6da8694fa84dd2fafbb202401200)
+
+2011-04-15  Tim Serong  <tserong at novell.com>
+
+	Add ipc_refcnt to message_handler_req_{exec, lib}_cfg_ringreenable()
+	Without refcounting the conn pointer here, corosync will segfault
+	if one kills a running instance of "corosync-cfgtool -r" (rhbz#695191)
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	Fix tyop in RRP faulty error messages
+	Reviewed-by: Russell Bryant <russell at russellbryant.net>
+
+2011-04-15  Steven Dake  <sdake at redhat.com>
+
+	Align ipc on 8 byte boundaries
+	Align all ipc messages on 8 byte boundaries.  This alignment will remove bus
+	errors on systems that can't access non-byte aligned data and should improve
+	performance.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+	Fix problem where unaligned totemip address access would result in bus error on non-unaligned-safe architectures.
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+2011-04-15  Greg Walton  <corosync at gwalton.net>
+
+	Clean up ENDIAN ifdef tests
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-04-13  Angus Salkeld  <asalkeld at redhat.com>
+
+	IPC: place calls to stats functions outside of mutexes
+	This is to prevent nasty deadlocks between IPC and objdb.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-04-12  Zane Bitter  <zane.bitter at gmail.com>
+
+	Provide better checking of the message type
+	A negative value for the message type (on systems where char is signed)
+	would cause a crash. This is highly probable if the cluster is, for example,
+	misconfigured to have encryption enabled on some nodes but not others.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-03-29  Steven Dake  <sdake at redhat.com>
+
+	Fix problem in previous commit leading to compiler error
+	commit 78ae800f80fa9cd0fe593724f5c64138c205fec5 was backported from master
+	without addressing the lack of a few services in flatiron.
+
+2011-03-29  Angus Salkeld  <asalkeld at redhat.com>
+
+	Fix shutdown when a confdb client is still connected
+	If you are connected to corosync and registered for
+	object notifications then corosync is asked to shutdown
+	the IPC server will get stuck. This is because the pipe
+	is closed and the refcount is increased. This leaves ipcs
+	with a connection that it can't destroy.
+
+	Solution:
+	1) if a write to the pipe fails (pipe closed) decrement the refcounter.
+	2) fix the object_track_stop() - it was not working as the functions
+	   did not match up. (this caused the late callbacks).
+	3) in ipcs call exit_fn() then stats_destroy_connection() so that
+	   the service engine can have time to call object_track_stop()
+	   before the object gets destroyed.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	STATS: add the service name to the connection name.
+	This helps to quickly identify what service the application
+	is connected to.
+
+	The object will now look like:
+	runtime.connections.corosync-objctl:CONFDB:19654:13.service_id=11
+	runtime.connections.corosync-objctl:CONFDB:19654:13.client_pid=19654
+	etc...
+
+	This also makes it clearer to receivers of the dbus/snmp events
+	what is going on.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	NOTIFYD: prevent duplicate quorate events.
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	NOTIFYD: fix retrieving the application's parent name.
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-03-24  Angus Salkeld  <asalkeld at redhat.com>
+
+	confdb: send notifications from the main thread not IPC thread
+	corosync-notifyd has exposed an issue with confdb notifications.
+
+	The normal state of affairs is:
+	IPC thread > lock > objdb > lock
+
+	objdb notification whilst really useful turn things around:
+	<middle of big call chain>
+	objdb > lock > confdb > ipc > lock
+
+	This reverse ordering of locks causes a horrible dead lock.
+
+	I see this patch as a work around until corosync-2.0
+	when most of the threads and locking disappear.
+
+	This patch adds a pipe to confdb service. When we get a
+	objdb notification a struct gets written to the pipe.
+	The poll loop then runs the dispatch in the main thread.
+	In the dispatch we call the real ipc_dispatch_send().
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-03-24  Steven Dake  <sdake at redhat.com>
+
+	totemsrp: free messages originated in recovery rather then rely on messages_free
+	Relying on messages_free may seem like it should work, but it leads to a
+	situation where every node has released the messages, yet some nodes think
+	messages are missing.  The output then looks like "Retransmit: #" in
+	repitition.  This patch frees those messages immediately during the transition
+	to the OPERATIONAL state and sets the internal variables totemsrp depends
+	upon to the proper values.
+
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+
+	totemsrp: Only restore old ring id information one time
+	The current code stores the current ring information every time a commit
+	token is generated.  This causes the old ring id used for comparison purposes
+	to increase if a token is lost in commit or recovery, resulting in failure of
+	totem.  This patch changes the behavior to only store the old ring id one
+	time when the commit token is received, and then further commit token ring
+	id saves are not done until OPERATIONAL is reached.
+
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+
+	totemsrp: Remove recv_flush code
+	The recv_flush code is no longer necessary because of the miss_count_count
+	addition.  It can in some cases lead to register corruption because of
+	interactions with -fstack-protector, the recursive nature of how this code
+	works, and interactions with the optimizer in some versions of gcc.
+
+	Reviewed-by: Jan Friesse <jfriesse at redhat.com>
+
+2011-03-21  Steven Dake  <sdake at redhat.com>
+
+	Resolve abort during simulatenous stopping of atleast 4 nodes
+	consider 5 nodes.
+
+	node 3,4 stopped (by random stopping) node 1,2,5 form new configuration
+	and during recovery node 1 and node 2 are stopped (via service service
+	corosync stop).  This causes 5 never to finish recovery within the timeout
+	period, triggering a token loss in recovery.  Bug #623176 resolved an assert
+	which happens because the full ring id was being restored.  The resolution
+	to Bug #623176 was to not restore the full ring id, and instead operate
+	(according to specifications) the new ring id.  Unfortunately this exposes
+	a problem whereby the restarting of nodes 1-4 generate the same ring id.
+	This ring id gets to the recovery failed node 5 which is now in gather,
+	and triggers a condition not accounted for in the original totem specification.
+
+	It appears later work from Dr. Agarwal's PHD dissertation considers this
+	scenario.  That solution entails rejecting the regular token in the above
+	condition.  Since the ring id is also used to make decisions for commit token
+	acceptance, we must also take care to reject the regular token in all cases
+	after transitioning from OPERATIONAL.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-03-21  Angus Salkeld  <asalkeld at redhat.com>
+
+	notifyd: dispatch only one message at a time.
+	This is avoid getting stuck in the dispatch processing
+	messages when the user is trying to shutdown the service.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-03-15  Angus Salkeld  <asalkeld at redhat.com>
+
+	Remove the ttl option from udpu and rely on the kernel ttl setting.
+	Reviewed-by: Fabio M. Di Nitto <fdinitto at redhat.com>
+
+	Fix the ttl defaults and range
+	1) both IPv4 and IPv6 mcast should default to ttl=1
+	2) the range should be 0..255
+	   0 is valid meaning localhost only (cluster of one)
+
+	Reviewed-by: Fabio M. Di Nitto <fdinitto at redhat.com>
+
+2011-03-08  Steven Dake  <sdake at redhat.com>
+
+	Fix abort when token is lost in RECOVERY state
+	A commit token should be rejected when a token is lost in the recovery
+	state.  This occurs naturally because the ring id increases by 4 for
+	every new ring.  Prior to this patch, if the token was lost, the old
+	ring id information was restored, causing a commit token to be accepted
+	when it should be rejected.  This erronously accepted commit token would
+	lead to an assertion which is fixed by this patch.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+2011-02-28  Jan Friesse  <jfriesse at redhat.com>
+
+	objdb: destroy all handles in _clear_object
+	Patch replaces free for object_instance with handle_destroy to remove
+	leaks in handles (and also memory leak).
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	Iterate all items in object_reload_notification
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-02-24  Steven Dake  <sdake at redhat.com>
+
+	Don't assert when ring id file is less then 8 bytes
+	If the ring id file for the processor is less then 8 bytes, totemsrp would
+	assert.  Our speculation is that this condition happens during a fencing
+	operation or local filesystem corruption.
+
+	With this patch, Corosync will create fresh ring id file data when the
+	incorrect number of bytes are read from the ring id.
+
+	Amend to use sizeof the strerror string length and PATH_MAX for the path length.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+	snmp: Allow buildling of corosync on already existing older install of corosync
+	When building corosync against older libraries already installed on the system,
+	the corosync-notifyd application uses the wrong Makefile.am commands.  This
+	results in the SNMPLIBS (which includes -L/usr/lib64) coming before the proper
+	LDADD flags.  The result is an inability to compile on an already existing
+	installation.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+2011-02-10  Angus Salkeld  <asalkeld at redhat.com>
+
+	Fix merge markers in spec file
+
+2011-02-09  Angus Salkeld  <asalkeld at redhat.com>
+
+	Make node state a string (not an integer)
+	Ryan noticed this inconsistency, all other status's
+	are string so this should be too.
+
+	Reviewed-by: Seven Dake <sdake at redhat.com>
+	Reviewed-by: Ryan O'Hara <rohara at redhat.com>
+
+	objdb: fix some strange types (uint8_t* -> void*).
+	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3045 fd59a12c-fef9-0310-b244-a6a79926bd2f
+
+2011-02-04  Steven Dake  <sdake at redhat.com>
+
+	Conflicts previously resolved were not merged.
+
+2011-02-04  Angus Salkeld  <asalkeld at redhat.com>
+
+	MIB: expand the descriptions of the notifications
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-02-04  Lon Hohberger  <lhh at redhat.com>
+
+	Match up MIB to notifyd & add SNMP quorum events
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+	Make SNMP MIB match what is being sent over DBUS
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
+2011-02-04  Steven Dake  <sdake at redhat.com>
+
+	Add dbus and snmp notifier
+	This is to send dbus events on major cluster events:
+	 - membership changes
+	 - application connect/dissconnet from corosync
+	 - quorum changes
+
+	dbus events can then be converted into snmp traps by foghorn or
+	corosync-notifyd can be run to directly send snmp traps.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+	Reviewed-by: Russell Bryant <russell at russellbryant.net>
+	Reviewed-by: Fabio M. Di Nitto <fdinitto at redhat.com>
+
+	Conflicts:
+
+		Makefile.am
+		configure.ac
+		corosync.spec.in
+
+	Conflicts Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-02-04  Angus Salkeld  <asalkeld at redhat.com>
+
+	CONFDB: add confdb_object_name_get()
+	This is useful when tracking object changes.
+
+	Reviewed-by: Seven Dake <sdake at redhat.com>
+
+	STATS: fix key name length on "join_count"
+	Reviewed-by: Seven Dake <sdake at redhat.com>
+
+	STATS: increase the space for application names
+	Reviewed-by: Seven Dake <sdake at redhat.com>
+
+2011-01-26  Angus Salkeld  <asalkeld at redhat.com>
+
+	CPG: make sure coroipcc_service_disconnect() is always called.
+	This prevents a shared mem leak if corosync dies while clients
+	are connected.
+
+	Calling cpg_finalize() did not release the shared mem as
+	coroipcc_msg_send_reply_receive() returned an error and
+	thus coroipcc_service_disconnect() did not get called.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	IPC: send failure message to client if memory maps fail
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-01-26  Jan Friesse  <jfriesse at redhat.com>
+
+	Add objdb firewall_enabled_or_nic_failure
+	New objdb var runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure
+	is set to 1 if continuous_gather is larger then MAX_NO_CONT_GATHER.
+	Under normal conditions, value of variable is 0.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+	Display warning when not possible to form cluster
+	This may typically happen if local firewall is enabled. Patch adds new
+	item to statistics called continuous_gather where is number of
+	continuous entered gather state. If this number is bigger then
+	MAX_NO_CONT_GATHER, warning message is displayed. This is also used on
+	exiting, so stop of corosync is now possible even with enabled firewall.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-01-26  Angus Salkeld  <asalkeld at redhat.com>
+
+	Add totem/interface/ttl config option.
+	This adds a per-interface config option to
+	adjust the TTL.
+
+	Reviewed-by: Steven Dake <sdake at redhat.com>
+
+2011-01-11  Steven Dake  <sdake at redhat.com>
+
+	Handle delayed multicast packets that occur with switches
+	Some switches delay multicast packets vs the unicast token.  This patch works
+	around that problem by providing a new tuneable called miss_count_const.  This
+	tuneable works by counting the number of times a message is found missing
+	and once reaching the const value, marks it as missing in the retransmit list.
+
+	This improves performance and doesn't display warning messages about missed
+	multicast messages when operating in these switching environments.
+
+	Reviewed-by: Angus Salkeld <asalkeld at redhat.com>
+
 2010-12-01  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	build: fix make srpm from release tarball
@@ -328,7 +1208,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@3006 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-07-21  Angus Salkeld  <asalkeld at redhat.com>
+2010-07-22  Angus Salkeld  <asalkeld at redhat.com>
 
 	Merge trunk revision 3002: r3002 | sdake | 2010-07-22 06:48:40 +1000 (Thu, 22 Jul 2010) | 2 lines Fix merge error with revision 3001.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@3004 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -386,7 +1266,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2987 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-07-03  Steven Dake  <sdake at redhat.com>
+2010-07-04  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2984: r2984 | sdake | 2010-07-03 14:54:22 -0700 (Sat, 03 Jul 2010) | 2 lines
 	Fix fail list fault that occurs in very rare circumstances.
@@ -462,8 +1342,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2973 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-06-28  Steven Dake  <sdake at redhat.com>
-
 	Merge trunk revision 2970: r2970 | sdake | 2010-06-28 16:30:49 -0700 (Mon, 28 Jun 2010) | 3 lines
 	Have corosync spec file own /var/log/cluster/corosync.log
 	have example use /var/log/cluster/cluster.log as default log file
@@ -537,7 +1415,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2954 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-06-18  Steven Dake  <sdake at redhat.com>
+2010-06-19  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2949: r2949 | sdake | 2010-06-18 17:10:41 -0700 (Fri, 18 Jun 2010) | 2 lines
 	Unlock global serializer lock during shutdown.
@@ -1098,7 +1976,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2858 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-05-12  Steven Dake  <sdake at redhat.com>
+2010-05-13  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2818: r2818 | sdake | 2010-05-12 21:42:06 -0700 (Wed, 12 May 2010) | 2 lines
 	Bump version to 1.2.2.
@@ -1114,7 +1992,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2817 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-05-11  Steven Dake  <sdake at redhat.com>
+2010-05-12  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2800: r2800 | asalkeld | 2010-05-03 21:25:31 -0700 (Mon, 03 May 2010) | 2 lines
 	check and discard unknown messages
@@ -1123,7 +2001,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2810 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-05-10  Steven Dake  <sdake at redhat.com>
+2010-05-11  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2789: r2789 | honzaf | 2010-04-26 09:16:20 -0700 (Mon, 26 Apr 2010) | 7 lines
 	Handle POLLNVAL in coroipcc
@@ -1168,7 +2046,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2788 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2010-04-22  Angus Salkeld  <asalkeld at redhat.com>
+2010-04-23  Angus Salkeld  <asalkeld at redhat.com>
 
 	Revert mistaken merge in confdb.c.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2786 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -1607,7 +2485,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2686 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-12-07  Steven Dake  <sdake at redhat.com>
+2009-12-08  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2581: r2581 | sdake | 2009-12-07 17:02:00 -0700 (Mon, 07 Dec 2009) | 2 lines
 	Bump verion to 1.2.0.
@@ -2021,7 +2899,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2582 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-10-22  Steven Dake  <sdake at redhat.com>
+2009-10-23  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2537: r2537 | sdake | 2009-10-22 15:30:59 -0700 (Thu, 22 Oct 2009) | 2 lines
 	Bump version to 1.1.2.
@@ -2037,7 +2915,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2538 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-10-20  Steven Dake  <sdake at redhat.com>
+2009-10-21  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2533: ------------------------------------------------------------------------ r2533 | sdake | 2009-10-20 15:40:29 -0700 (Tue, 20 Oct 2009) | 2 lines
 	Bump revision to 1.1.1.
@@ -2053,7 +2931,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2532 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-10-14  Steven Dake  <sdake at redhat.com>
+2009-10-15  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2524: r2524 | sdake | 2009-10-14 12:06:37 -0700 (Wed, 14 Oct 2009) | 3 lines
 	Patch from jflesch to fix segfault when using sysv semaphores that the thread
@@ -2115,8 +2993,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2505 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-09-24  Steven Dake  <sdake at redhat.com>
-
 	Merge trunk revision 2481: r2481 | sdake | 2009-09-24 23:23:04 -0700 (Thu, 24 Sep 2009) | 2 lines
 	Totem IBA implementation.
 
@@ -2336,7 +3212,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2466 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-09-19  Steven Dake  <sdake at redhat.com>
+2009-09-20  Steven Dake  <sdake at redhat.com>
 
 	Merge trunk revision 2463: r2463 | sdake | 2009-09-19 23:56:02 -0700 (Sat, 19 Sep 2009) | 2 lines
 	Remove warning in logsys compile related to const correctness.
@@ -2748,7 +3624,7 @@
 	Use the preferred prefix for the Pacemaker service
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2361 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-07-07  Steven Dake  <sdake at redhat.com>
+2009-07-08  Steven Dake  <sdake at redhat.com>
 
 	Bumping version to 1.0.0
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2353 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -2834,7 +3710,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2332 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-30  Steven Dake  <sdake at redhat.com>
+2009-07-01  Steven Dake  <sdake at redhat.com>
 
 	Add context get set man pages for evs.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2331 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -2878,7 +3754,7 @@
 	Reset version to 0.99 in configure.ac to unbreak rpm/srpm.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2321 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-29  Steven Dake  <sdake at redhat.com>
+2009-06-30  Steven Dake  <sdake at redhat.com>
 
 	Reset 0.98 in configure.ac to trunk so toplevel makefile works properly
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2319 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -2889,7 +3765,7 @@
 	Fix segfault during dispatch within confdb library.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2317 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-27  Steven Dake  <sdake at redhat.com>
+2009-06-28  Steven Dake  <sdake at redhat.com>
 
 	Static-ize some main.c variables.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2316 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -2915,7 +3791,7 @@
 	Send fake barriers for the event service when operating in compatibility mode whitetank.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2309 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-26  Angus Salkeld  <asalkeld at redhat.com>
+2009-06-27  Angus Salkeld  <asalkeld at redhat.com>
 
 	add "-p" option to corosync-objctl
 	This just adds a "-p" option to corosync-objctl.
@@ -2928,12 +3804,12 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2308 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-26  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-06-27  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Fix rpm version generation and adapt release manager Makefile.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2307 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-26  Steven Dake  <sdake at redhat.com>
+2009-06-27  Steven Dake  <sdake at redhat.com>
 
 	Remove some debug printfs that snuck in.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2306 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -2941,6 +3817,8 @@
 	Change sync_init api call to pass information relevant for making synchronization decisions.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2305 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-06-26  Steven Dake  <sdake at redhat.com>
+
 	Add ability to detect process pause and not implode the membership algorithm when this occurs.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2304 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -2950,8 +3828,6 @@
 	Add syncv2.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2302 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-25  Steven Dake  <sdake at redhat.com>
-
 	Add AMF_V2_SERVICE defintion
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2301 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -2970,6 +3846,8 @@
 	sync-v1 onwire compat layer for raw corosync to communicate with whitetank.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2296 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-06-25  Steven Dake  <sdake at redhat.com>
+
 	Define CMAN and CRM service ids.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2295 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -2996,7 +3874,7 @@
 	Add locking of database in hdb_handle_refcount_get
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2290 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-23  Steven Dake  <sdake at redhat.com>
+2009-06-24  Steven Dake  <sdake at redhat.com>
 
 	Remove totempg debug message.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2289 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3012,7 +3890,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2288 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-23  Ryan O'Hara  <rohara at redhat.com>
+2009-06-24  Ryan O'Hara  <rohara at redhat.com>
 
 	Add hdb_handle_refcount_get call.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2287 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3022,14 +3900,14 @@
 	Tidy's up startup printfs.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2286 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-22  Steven Dake  <sdake at redhat.com>
-
 	Change startup notice to Corosync Cluster Engine. Change 2008 to 2009 in copyright.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2285 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Remove "AIS" string from exit notice.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2284 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-06-22  Steven Dake  <sdake at redhat.com>
+
 	Remove warning by casting properly in totemnet.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2283 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3039,8 +3917,6 @@
 	Add dump_state to coroapi.h.  Need to remove logging output from signal handlers.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2281 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-21  Steven Dake  <sdake at redhat.com>
-
 	Sanitize -p option to not set scheduling parameters in all software.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2280 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3060,14 +3936,14 @@
 	Add tests for posix scheduling apis to configure.ac and use them to determine if we should set scheduling priorities or not.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2277 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-20  Steven Dake  <sdake at redhat.com>
-
 	Work around dlopen'ed objects not executing constructors on solaris platform.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2276 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Remove hdb constructor usage.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2275 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-06-20  Steven Dake  <sdake at redhat.com>
+
 	Remove timersub redefine.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2274 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3104,15 +3980,13 @@
 	Fix handling of sysconfdir
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2265 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-18  Fabio M. Di Nitto  <fdinitto at redhat.com>
-
 	Install basic operational directories
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2264 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Remove tags from example configuration
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2263 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-18  Steven Dake  <sdake at redhat.com>
+2009-06-19  Steven Dake  <sdake at redhat.com>
 
 	Warn user of missing dirs and exit gracefully.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2262 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3123,6 +3997,8 @@
 	Sanitize output of autogen.sh.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2260 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-06-18  Steven Dake  <sdake at redhat.com>
+
 	Ensure Linux, BSD, Solaris, Darwin function with security authentication in IPC system.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2259 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3178,7 +4054,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2255 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-17  Steven Dake  <sdake at redhat.com>
+2009-06-18  Steven Dake  <sdake at redhat.com>
 
 	Add Jerome to AUTHORS file
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2254 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3186,7 +4062,7 @@
 	add madvise nosync calls for bsd platform.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2253 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-17  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-06-18  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	logsys: remove leftover files from running tests
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2252 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3379,8 +4255,6 @@
 	Include string.h in sq.h for memset() calls.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2216 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-06-06  Steven Dake  <sdake at redhat.com>
-
 	Make readdir operation portable by removing BSDism from coroparse.c.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2215 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3466,12 +4340,12 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2202 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-05-30  Steven Dake  <sdake at redhat.com>
+2009-05-31  Steven Dake  <sdake at redhat.com>
 
 	Fix race condition in cpg service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2201 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-05-29  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-05-30  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Public headers should not include private config.h
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2200 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3606,8 +4480,6 @@
 	Logsys header clean (comments and whitespaces)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2182 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-05-12  Fabio M. Di Nitto  <fdinitto at redhat.com>
-
 	Fix totem logging after logsys changes
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2181 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3647,7 +4519,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2176 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-05-11  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-05-12  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Add debugging code to logsys.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2175 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3670,7 +4542,7 @@
 	Remove most iovector-ized functionality from totem and only make one malloc and memory copy call in totemsrp_mcast.  The rest of the stack minus totempg then uses zero copies.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2172 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-05-05  Jim Meyering  <jim at meyering.net>
+2009-05-06  Jim Meyering  <jim at meyering.net>
 
 	fix missing-dependency bug, so as not to install bogus .pc files
 	* pkgconfig/Makefile.am (all .pc files): Depend on Makefile, so that
@@ -3697,11 +4569,13 @@
 	add NTF_SERVICE to the service list
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2167 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-29  Steven Dake  <sdake at redhat.com>
+2009-04-30  Steven Dake  <sdake at redhat.com>
 
 	Do checking of handle code after we verify that handle could actually be in the handle database.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2166 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-04-29  Steven Dake  <sdake at redhat.com>
+
 	Implement thread saftey in corosync trunk.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2165 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3713,7 +4587,7 @@
 	Call all configured exec_dump_fn's when SIGUSR2 is received
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2163 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-27  Steven Dake  <sdake at redhat.com>
+2009-04-28  Steven Dake  <sdake at redhat.com>
 
 	Add cpgverify program to test directory.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2162 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3731,7 +4605,7 @@
 	add max limit error checks in logsys
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2159 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-26  Steven Dake  <sdake at redhat.com>
+2009-04-27  Steven Dake  <sdake at redhat.com>
 
 	Add mechanism to use logsysrec from inside totem stack.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2157 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3739,25 +4613,27 @@
 	Improve security of NSS implementation in totem.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2156 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-04-26  Steven Dake  <sdake at redhat.com>
+
 	Fix evsverify failure.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2155 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-25  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-04-26  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Fix --enable-nss default in configure.ac
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2154 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-25  Steven Dake  <sdake at redhat.com>
+2009-04-26  Steven Dake  <sdake at redhat.com>
 
 	Make libnss detection work properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2153 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-25  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-04-26  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Fix pkgconfig file inclusion into release and pass distcheck
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2152 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-25  Steven Dake  <sdake at redhat.com>
+2009-04-26  Steven Dake  <sdake at redhat.com>
 
 	add Chrissie as author of totem NSS implementation.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2151 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3929,7 +4805,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2116 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-21  Steven Dake  <sdake at redhat.com>
+2009-04-22  Steven Dake  <sdake at redhat.com>
 
 	Change shared memory to use mmap() system calls.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2115 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -3937,6 +4813,8 @@
 	Zero copy feature for IPC transmits.  Also integrated into CPG library service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2114 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-04-21  Steven Dake  <sdake at redhat.com>
+
 	Remove memory leak from new dispatch circular buffer mapped system.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2113 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -3996,7 +4874,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2105 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-20  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-04-21  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Guarantee that all logging buffers are flushed before we die
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2104 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -4049,12 +4927,12 @@
 	readd early log level check for performance reasons.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2093 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-19  Steven Dake  <sdake at redhat.com>
+2009-04-20  Steven Dake  <sdake at redhat.com>
 
 	throw away mode in totempg was operating as a global variable, when it is possible for different nodes to be in different configurations of throw away.  This patch makes the variable instanced.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2092 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-19  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-04-20  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Add logsys v3
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2091 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -4219,8 +5097,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2062 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-14  Jim Meyering  <jim at meyering.net>
-
 	* README.devmap: Update a prototype.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2061 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -4238,12 +5114,12 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2059 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-13  Steven Dake  <sdake at redhat.com>
+2009-04-14  Steven Dake  <sdake at redhat.com>
 
 	Autodetect build environment for configure for developers.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2058 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-09  Steven Dake  <sdake at redhat.com>
+2009-04-10  Steven Dake  <sdake at redhat.com>
 
 	Fix compile warning in main.c.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2057 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -4503,8 +5379,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2031 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-07  Jim Meyering  <jim at meyering.net>
-
 	continue pulling previous thread: mostly constification
 	* exec/apidef.c (typedef_tpg_join, typedef_tpg_leave)
 	(typedef_tpg_groups_mcast, typedef_tpg_groups_send_ok):
@@ -4808,7 +5682,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1993 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-04-02  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-04-03  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Drop unrequired struct
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1992 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -4927,8 +5801,6 @@
 	Fix internal API usage and add support for file_name
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1976 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-31  Fabio M. Di Nitto  <fdinitto at redhat.com>
-
 	Fix build warning
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1975 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -5206,7 +6078,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1914 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-29  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-03-30  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Fix pkgconfig generation
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1913 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5365,7 +6237,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1881 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-19  Steven Dake  <sdake at redhat.com>
+2009-03-20  Steven Dake  <sdake at redhat.com>
 
 	Revert last change which broke corosync.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1880 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5416,8 +6288,6 @@
 	Fix corosync.pc installation
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1872 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-18  Fabio M. Di Nitto  <fdinitto at redhat.com>
-
 	Add missing libs from pkgconfig generation
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1871 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -5576,7 +6446,7 @@
 	Fix testconfdb use of object handles.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1844 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-11  Steven Dake  <sdake at redhat.com>
+2009-03-12  Steven Dake  <sdake at redhat.com>
 
 	Set correct OBJECT_PARENT_HANDLE define in coroapi.h
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1843 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5636,12 +6506,10 @@
 	Readd pkgconfig subdir to the build system and port it to autoconf
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1832 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-10  Fabio M. Di Nitto  <fdinitto at redhat.com>
-
 	Add entries to maintainer-clean target
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1831 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-10  Steven Dake  <sdake at redhat.com>
+2009-03-11  Steven Dake  <sdake at redhat.com>
 
 	Remove warnings from coroipc.c.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1830 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5799,7 +6667,7 @@
 	Allow logsys_format_set to reset to default.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1792 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-05  Steven Dake  <sdake at redhat.com>
+2009-03-06  Steven Dake  <sdake at redhat.com>
 
 	Use list_del on process info in the condition that lib_exit_fn is called to prevent segfault from processes later processing that list entry.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1791 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5812,12 +6680,12 @@
 	Fix logsys_set_format by updating the right bits
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1789 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-02  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-03-03  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Fix uninitialized memory. Spotted by valgrind
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1788 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-03-02  Steven Dake  <sdake at redhat.com>
+2009-03-03  Steven Dake  <sdake at redhat.com>
 
 	Rework a bit of how lib_exit_fn works so that reference counts may be used in the exit functions for services such as cpg.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1786 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5850,17 +6718,15 @@
 	Unification around hdb_handle_t data type.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-24  Steven Dake  <sdake at redhat.com>
-
 	Send configuration changes to CPG listeners.  (regression in IPC patch).
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1781 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-24  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2009-02-25  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Install corosync-fplay and corosync-pload binaries
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1780 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-24  Steven Dake  <sdake at redhat.com>
+2009-02-25  Steven Dake  <sdake at redhat.com>
 
 	Fix possible segfault with IPC service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1779 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5868,11 +6734,11 @@
 	Remove extra printf debug.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1778 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2009-02-24  Steven Dake  <sdake at redhat.com>
+
 	Remove installation of static libcoroipc.a.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1777 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-23  Steven Dake  <sdake at redhat.com>
-
 	Fix problem with 1722 commit which broke ipc.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1776 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -5922,12 +6788,12 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1767 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-18  Steven Dake  <sdake at redhat.com>
+2009-02-19  Steven Dake  <sdake at redhat.com>
 
 	Whitetank IPC Forward Port.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1766 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-17  Steven Dake  <sdake at redhat.com>
+2009-02-18  Steven Dake  <sdake at redhat.com>
 
 	Remove redundant statement in totemsrp.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1764 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5938,12 +6804,12 @@
 	Update link for upstream crypto code.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1762 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-17  Ryan O'Hara  <rohara at redhat.com>
+2009-02-18  Ryan O'Hara  <rohara at redhat.com>
 
 	Add timer_expire_time_get Add timer_expire_time_get corosync API call.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1761 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-13  Ryan O'Hara  <rohara at redhat.com>
+2009-02-14  Ryan O'Hara  <rohara at redhat.com>
 
 	Add timer_time_get to the corosync API.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1760 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -5953,7 +6819,7 @@
 	Add corosync_cfg_local_get() call to get the local NodeID in libcfg
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1759 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-02-11  Ryan O'Hara  <rohara at redhat.com>
+2009-02-12  Ryan O'Hara  <rohara at redhat.com>
 
 	Add TMR_SERVICE to the list of service_types.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1758 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6115,7 +6981,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1722 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-01-07  Steven Dake  <sdake at redhat.com>
+2009-01-08  Steven Dake  <sdake at redhat.com>
 
 	Patch to allow cpg_membership_get to work properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1721 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6130,7 +6996,7 @@
 	Check against the right var and silence a few warnings at build time
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1719 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2009-01-05  Angus Salkeld  <asalkeld at redhat.com>
+2009-01-06  Angus Salkeld  <asalkeld at redhat.com>
 
 	Fix coverity bug ID 9: OVERRUN_STATIC
 	CID: 9
@@ -6332,11 +7198,13 @@
 	Fix received_flg to contain proper values.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1691 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-11-06  Angus Salkeld  <asalkeld at redhat.com>
+2008-11-07  Angus Salkeld  <asalkeld at redhat.com>
 
 	Add corotype.h and delete saAis.h
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1690 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2008-11-06  Angus Salkeld  <asalkeld at redhat.com>
+
 	cleanup the last of the SAF headers and types
 	This includes the rename of identifiers from corosync to cs.
 
@@ -6344,7 +7212,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1689 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-11-05  Steven Dake  <sdake at redhat.com>
+2008-11-06  Steven Dake  <sdake at redhat.com>
 
 	Make width of service 6 bytes instead of 5.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1688 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6352,7 +7220,7 @@
 	Null terminate string which resulted in failure of confdb during logging.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1687 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-11-03  Angus Salkeld  <asalkeld at redhat.com>
+2008-11-04  Angus Salkeld  <asalkeld at redhat.com>
 
 	Make lib/ clean up after itself properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1686 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6415,8 +7283,6 @@
 	remove some new warnings from corosync
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1677 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-10-20  Angus Salkeld  <asalkeld at redhat.com>
-
 	Remove unused global debug option from the man page.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1676 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -6463,7 +7329,7 @@
 	Fix CFLAGS and LDFLAGS overrides to work for DEBUG and RELEASE modes.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1671 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-09-24  Steven Dake  <sdake at redhat.com>
+2008-09-25  Steven Dake  <sdake at redhat.com>
 
 	Fix makefile error in test directory.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1669 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6563,7 +7429,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1660 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-08-19  Angus Salkeld  <asalkeld at redhat.com>
+2008-08-20  Angus Salkeld  <asalkeld at redhat.com>
 
 	Zero out unused totemsrp my_proc_list entries
 	When making my_proc_list smaller, ensure that the
@@ -6652,14 +7518,14 @@
 	Make rpmlint pass without warnings.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1648 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-08-14  Steven Dake  <sdake at redhat.com>
-
 	Set the override for LCRSODIR properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1647 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Finish the renaming of openais to corosync in the tree.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2008-08-14  Steven Dake  <sdake at redhat.com>
+
 	Fix build breakage.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1645 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -6714,7 +7580,7 @@
 	Change AIS names to corosync
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1630 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-08-12  Fabio M. Di Nitto  <fdinitto at redhat.com>
+2008-08-13  Fabio M. Di Nitto  <fdinitto at redhat.com>
 
 	Add support for reload operations within objdb and plugins.
 	Use a 2 phase "commit" operation:
@@ -6781,12 +7647,10 @@
 	Split openais and corosync tree into two seperate repositories.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-08-04  Steven Dake  <sdake at redhat.com>
-
 	Make mar_name_t an inline function to remove warnings
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1621 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-08-03  Steven Dake  <sdake at redhat.com>
+2008-08-04  Steven Dake  <sdake at redhat.com>
 
 	Allow msg service test applications to build properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1620 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6831,8 +7695,6 @@
 	Make external service engines (openais) work properly. Also fix up make install.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1606 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-07-23  Steven Dake  <sdake at redhat.com>
-
 	Patch from Angus to make corosync build for his environment.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1605 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -6842,6 +7704,8 @@
 	Merge the API definitions of the objdb into the corosync api definition.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1603 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2008-07-23  Steven Dake  <sdake at redhat.com>
+
 	The entire tree builds properly and all services have been ported to the new coroapi.h include header.
 	The services shipped with corosync are CPG, CFG, CONFDB, and EVS.
 
@@ -6943,7 +7807,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1575 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-07-10  Steven Dake  <sdake at redhat.com>
+2008-07-11  Steven Dake  <sdake at redhat.com>
 
 	Fix error in a previous logsys patch.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1574 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6953,7 +7817,7 @@
 	Add a missing object_find_reset() call.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1573 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-07-02  Steven Dake  <sdake at redhat.com>
+2008-07-03  Steven Dake  <sdake at redhat.com>
 
 	Add init/config entry points for those that dont with to use macros in logsys.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1572 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6967,7 +7831,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1571 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-07-01  Steven Dake  <sdake at redhat.com>
+2008-07-02  Steven Dake  <sdake at redhat.com>
 
 	Add two new modes LOG_MODE_SHORT_FILELINE and LOG_MODE_NOSUBSYS. LOG_MODE_SHORT_FILELINE strips the leading path from the file name in a debug output.  LOG_MODE_NOSUBSYS removes a global variable and provides the ability to set or unset this via config_mode_set.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1570 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -6989,8 +7853,6 @@
 	Allow syslog priority configurations per subsystem in logsys.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1568 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-06-23  Steven Dake  <sdake at redhat.com>
-
 	Remove warnings of unused variables in main.c
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1566 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -7024,7 +7886,7 @@
 	Patch from Xinwei Hu to clean up test locking program.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1556 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-06-19  Steven Dake  <sdake at redhat.com>
+2008-06-20  Steven Dake  <sdake at redhat.com>
 
 	Allow user to retrieve logsys mode.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1555 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7178,7 +8040,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1505 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2008-01-07  Steven Dake  <sdake at redhat.com>
+2008-01-08  Steven Dake  <sdake at redhat.com>
 
 	Patch to install liblogsys
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1495 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7260,7 +8122,7 @@
 	Fix problem where adding a timer in a timer callback would lock system and also timer additions were not protected by mutex because of backwards pthread_equal comparison.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1463 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-09-27  Steven Dake  <sdake at redhat.com>
+2007-09-28  Steven Dake  <sdake at redhat.com>
 
 	segfault does not use source.conn unless the originating request is local. The actual code tries to dereference pointers created on another node.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1462 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7274,6 +8136,8 @@
 	Fix linking of library objects.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1459 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2007-09-27  Steven Dake  <sdake at redhat.com>
+
 	Allow override of the LCRSO directory from the Makefiles or command line
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1458 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -7312,8 +8176,6 @@
 	Ensure DESTDIR and PREFIX are properly used in Makefiles
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1443 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-09-08  Steven Dake  <sdake at redhat.com>
-
 	Expose utils to the user
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1442 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -7373,7 +8235,7 @@
 	Patch to allocate event dispatch data in saEvtInitialize instead of directly on the stack for small thread-stack sized dispatch functions.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1421 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-08-10  Steven Dake  <sdake at redhat.com>
+2007-08-11  Steven Dake  <sdake at redhat.com>
 
 	Patch to not overwrite defualt configuration file or amf.conf file when executing make install
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1420 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7384,7 +8246,7 @@
 	Patch to add amf_strdup instead of malloc and then copy for amf service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1417 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-08-07  Steven Dake  <sdake at redhat.com>
+2007-08-08  Steven Dake  <sdake at redhat.com>
 
 	Fix minor leaks caused by not calling pthread_mutex_destroy throughout the tree.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1412 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7415,16 +8277,16 @@
 	Update testckpt program to properly test checkpoint system.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1397 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-06-24  Steven Dake  <sdake at redhat.com>
-
 	Add cpg_local_get api to cpg service
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1391 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-06-23  Steven Dake  <sdake at redhat.com>
+2007-06-24  Steven Dake  <sdake at redhat.com>
 
 	Add IP address takeover as an AMF component
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1388 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2007-06-23  Steven Dake  <sdake at redhat.com>
+
 	Add passive monitoring support to AMF.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1386 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -7462,8 +8324,6 @@
 	Remove this_ip from the source tree and replace with accessor functions.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1379 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-06-04  Steven Dake  <sdake at redhat.com>
-
 	Change timers to add duration and absolute timers.  Use nanoseconds since epoch to track timers.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1378 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -7504,7 +8364,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1370 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-04-24  Steven Dake  <sdake at redhat.com>
+2007-04-25  Steven Dake  <sdake at redhat.com>
 
 	Fix section iteration size comparison
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1367 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7518,12 +8378,12 @@
 	Fixes problem where if attributes list is zero, library would segfault
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1362 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-04-21  Steven Dake  <sdake at redhat.com>
+2007-04-22  Steven Dake  <sdake at redhat.com>
 
 	change references to evs to cpg to match API
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1361 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2007-04-20  Steven Dake  <sdake at redhat.com>
+2007-04-21  Steven Dake  <sdake at redhat.com>
 
 	Patch from Angus to fix return code of saAmfResponse if the handle was invalid.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1360 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7621,7 +8481,7 @@
 	Fix ordering of join messages
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1324 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-12-10  Lon Hohberger  <lhh at redhat.com>
+2006-12-11  Lon Hohberger  <lhh at redhat.com>
 
 	Correct not initialized value  of  amf_comp in amf_comp_find_from_conn_info ()
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1322 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7691,7 +8551,7 @@
 	handle case where POLLHUP or POLLERR are not supported by OS
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1311 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-11-16  Hans Feldt  <hans.feldt at ericsson.com>
+2006-11-17  Hans Feldt  <hans.feldt at ericsson.com>
 
 	Cleaning up and preparing for later patch.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1310 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7765,7 +8625,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1285 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-10-23  Hans Feldt  <hans.feldt at ericsson.com>
+2006-10-24  Hans Feldt  <hans.feldt at ericsson.com>
 
 	AMF healthcheck keylen was not compared before matching key values
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1281 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7825,7 +8685,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1266 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-10-11  Hans Feldt  <hans.feldt at ericsson.com>
+2006-10-12  Hans Feldt  <hans.feldt at ericsson.com>
 
 	This simple patch solves a problem we see when testing AMF. If a node leaves and joins the cluster quickly (within one second is default), the config change messages will not indicate that the node left and rejoined. The patch introduces a short delay in main() to make sure the token_timeout expires.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1259 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -7841,7 +8701,7 @@
 	Remove some debbugging code from totemsrp impacting performance.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1253 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-10-03  Lon Hohberger  <lhh at redhat.com>
+2006-10-04  Lon Hohberger  <lhh at redhat.com>
 
 	The patch contains:
 	 The instantiaton of the component is performed with some new steps:
@@ -7918,12 +8778,12 @@
 	Two configuration attributes for SG objects were not handled correctly by the config parser.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1249 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-09-27  Hans Feldt  <hans.feldt at ericsson.com>
+2006-09-28  Hans Feldt  <hans.feldt at ericsson.com>
 
 	Patches from Mathieu.Marie at sun.com: 2- On Solaris, the SA components executed have no names. 3- When killing the testamf1 component, it makes the aisexec process crash on both of my nodes. 4- max priority for RR on solaris is 59.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1247 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-09-24  Hans Feldt  <hans.feldt at ericsson.com>
+2006-09-25  Hans Feldt  <hans.feldt at ericsson.com>
 
 	An update of README.amf to match current state of the implementation. README.amf now also includes a detailed list of what is currently NOT implemented.
 	README.amf includes now, as before, a "demo example".
@@ -7953,11 +8813,13 @@
 	Fix for global_ckpt_id not synced
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1239 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-09-05  Hans Feldt  <hans.feldt at ericsson.com>
+2006-09-06  Hans Feldt  <hans.feldt at ericsson.com>
 
 	- ckpt_id was not synced. - debug printout of list reduced
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1238 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-09-05  Hans Feldt  <hans.feldt at ericsson.com>
+
 	1.    Improvement to manage more than one SG within an Application  and to 	asymmetrically distribute the SG:s among the Nodes. 2.    strcmp bug fixes  several *_find functions. 3.    Minor bug fixes.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1237 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8039,7 +8901,7 @@
 	add command line support with: launch as a foreground application, do not set priority
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1219 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-08-15  Steven Dake  <sdake at redhat.com>
+2006-08-16  Steven Dake  <sdake at redhat.com>
 
 	Add scalability to 128 nodes by adding new parameter to protocol which is a random timeout bounded by a configuration parameter when sending join messages.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1214 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8066,7 +8928,7 @@
 	fixe a bug in cpg where get_group() will return the wrong group info structure if there is a hash collision.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1199 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-08-07  Steven Dake  <sdake at redhat.com>
+2006-08-08  Steven Dake  <sdake at redhat.com>
 
 	Fix checkpoint header file error
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1178 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8076,15 +8938,13 @@
 	Committed a bunch of changes for testing scalability - reverting patch
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1177 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-08-04  Steven Dake  <sdake at redhat.com>
-
 	non-blocking syslog and file logging support
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1176 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Solaris port for openais
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1175 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-08-02  Steven Dake  <sdake at redhat.com>
+2006-08-03  Steven Dake  <sdake at redhat.com>
 
 	Make sure sync_activate is called only once per service handler.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1174 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8094,12 +8954,12 @@
 	Removes the hardcoded limit of environment variables and argvs from components, now unlimited.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1172 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-31  Hans Feldt  <hans.feldt at ericsson.com>
+2006-08-01  Hans Feldt  <hans.feldt at ericsson.com>
 
 	- Handling of HUP and other poll errors improved in saAmfDispatch. - Termination of testamf1 when saAmfDispatch returns an error.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1171 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-28  Steven Dake  <sdake at redhat.com>
+2006-07-29  Steven Dake  <sdake at redhat.com>
 
 	Patch so realloc reverts to old buffer if reallocation fails.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1170 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8130,8 +8990,6 @@
 	Clean up endian swabbing for cpg service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1162 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-25  Steven Dake  <sdake at redhat.com>
-
 	Fix where setsockopt is bound to in totemnet.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1161 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8150,7 +9008,7 @@
 	Endian cleanup for the clm service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1156 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-23  Steven Dake  <sdake at redhat.com>
+2006-07-24  Steven Dake  <sdake at redhat.com>
 
 	Allow build type of COVERAGE for code coverage analysis
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1152 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8174,8 +9032,6 @@
 	Increase IPC thread stack size from 100k to 200k to accomodate larger data structures in ipc message handlers (for the CLM service).
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1149 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-20  Steven Dake  <sdake at redhat.com>
-
 	Remove TODO for swabbing conn data structure
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1148 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8197,17 +9053,19 @@
 	Remove unnecessary exit from testevs
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1142 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-20  Steven Dake  <sdake at redhat.com>
+
 	Remove debug printf in totemsrp
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1141 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-19  Steven Dake  <sdake at redhat.com>
-
 	Don't segfault if unauthorized user connects
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1140 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Make checkpoint service work according to specifications with regards to the unlink operation.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1139 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-19  Steven Dake  <sdake at redhat.com>
+
 	Remove compile warning from cfgtool commit.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1138 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8219,24 +9077,24 @@
 	Send the new joinlists using the sync service, so it happens atomically. This should fix some odd sequencing bugs.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1136 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-17  Patrick Caulfield  <pcaulfie at redhat.com>
+2006-07-18  Patrick Caulfield  <pcaulfie at redhat.com>
 
 	printing ipv6 addresses often needs more than a 32 byte buffer. THis could causes a crash with sone ipv6 installations.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1135 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-17  Steven Dake  <sdake at redhat.com>
+2006-07-18  Steven Dake  <sdake at redhat.com>
 
 	Support for ia64 arch builds.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1133 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-17  Steven Dake  <sdake at redhat.com>
+
 	Fix synchronization not working properly.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1132 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Event marshalling patch for 32/64/endian support.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1131 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-16  Steven Dake  <sdake at redhat.com>
-
 	If version field is NULL as passed to saClmInitialize, return INVALID_PARAM
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1130 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8255,6 +9113,8 @@
 	Return INVALID_PARAM when section read is larger then checkpoint section
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1125 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-16  Steven Dake  <sdake at redhat.com>
+
 	CheckpointRead wasn't checking the active replica was set.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1124 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8269,20 +9129,20 @@
 	Proper barrier operation as requested.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1121 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-13  Steven Dake  <sdake at redhat.com>
-
 	Add support for s390 and s390x architectures.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1120 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-13  Steven Dake  <sdake at redhat.com>
+
 	Fix library renames to 2.0.0 as needed by distros.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1119 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-11  Steven Dake  <sdake at redhat.com>
+2006-07-12  Steven Dake  <sdake at redhat.com>
 
 	Update to checkpoint service to use new APIs as rest of services do.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1118 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-10  Steven Dake  <sdake at redhat.com>
+2006-07-11  Steven Dake  <sdake at redhat.com>
 
 	Fix broken timers when release type set to RELEASE
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1117 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8322,7 +9182,7 @@
 	- Error escalation improved, SU failover recovery action added - Most runtime attributes in the inf. model calculated in runtime from   more fundamental information. (improves consistency) - sg_assign_si can now recalculate workloads considering existing   assignments - Logging improvements, similar to what is required as notification in   AMF spec. - CLC-CLI INSTANTIATE now exits aisexec when it fails (should later be   sent as an NTF alarm) - CLC-CLI CLEANUP correctly handles already terminated processes - testamf1.c printouts removed for normal operation - Iterator functions for SI/CSI assignments
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1108 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-07-06  Steven Dake  <sdake at redhat.com>
+2006-07-07  Steven Dake  <sdake at redhat.com>
 
 	Make sure RELEASE version detaches from tty
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1105 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8333,6 +9193,8 @@
 	The recent endian/32/64 changes broke cpg callbacks.  The left list address was incorrectly calculated.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1102 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-07-06  Steven Dake  <sdake at redhat.com>
+
 	The totem rrp incorrectly increased the wrong failure counter.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1101 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8341,23 +9203,21 @@
 	marshall of cpg_join name field is wrong.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1100 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-29  Steven Dake  <sdake at redhat.com>
-
 	Rework of the timer system to allow timers to be added in dispatch handlers.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1099 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-06-29  Steven Dake  <sdake at redhat.com>
+
 	Rewrite of the checkpoint benchmark using threads tool
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1098 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-28  Steven Dake  <sdake at redhat.com>
-
 	set serialize lock to proper function.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1097 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
 	Rework of IPC layer once again
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1096 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-27  Steven Dake  <sdake at redhat.com>
+2006-06-28  Steven Dake  <sdake at redhat.com>
 
 	Fix problem where AMF locks up system if two or more components are members of the same service unit.  Also fixes problem where AMF asserts if two or more components are specified in a service unit.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1095 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8402,7 +9262,7 @@
 	Fix message alignment in CPG. we now unpack the message in the same way as we pack it.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1084 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-21  Steven Dake  <sdake at redhat.com>
+2006-06-22  Steven Dake  <sdake at redhat.com>
 
 	Change makefile to install swab from correct place
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1081 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8410,6 +9270,8 @@
 	New make release in top level makefile
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1077 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-06-21  Steven Dake  <sdake at redhat.com>
+
 	Modify AMF to use new timer.c/timer.h routines properly
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1076 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8422,7 +9284,7 @@
 	Fix error where pathlist buffer is overrun resulting in segfault
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1072 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-19  Hans Feldt  <hans.feldt at ericsson.com>
+2006-06-20  Hans Feldt  <hans.feldt at ericsson.com>
 
 	Refactoring of AMF into several files (based on classed in inf. model). A central header file (amf.h) keeps all the definitions and prototypes needed.
 	New things apart from that:
@@ -8434,11 +9296,13 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1071 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-19  Steven Dake  <sdake at redhat.com>
+2006-06-20  Steven Dake  <sdake at redhat.com>
 
 	Fix off by one error in totemsrp.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1070 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-06-19  Steven Dake  <sdake at redhat.com>
+
 	Missed timer commit.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1069 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8456,7 +9320,7 @@
 	Allow CFLAGS and LDFLAGS to be overridden through the environment or command line.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1065 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-06-05  Steven Dake  <sdake at redhat.com>
+2006-06-06  Steven Dake  <sdake at redhat.com>
 
 	Remove warnings in AMF executive service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1061 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8472,7 +9336,7 @@
 	- (Re-)introduction of event based multicast messages (not all yet) - Use of Distinguished Names (DN) in API and multicast messages - CSI resassignment properly handled (by using restarting state) - State 'setter' functions with uniform printouts - Simple 'assign SU to host' algorithm: 	- based on saAmfSUHostedByNode config attribute 	- see config file for example - Debug print runtime attributes upon user request: 	$ pkill -USR2 aisexec - Object-oriented naming of functions started (but not finished) - testamf1.c updated with some new tests - Minor fix in print.h and print.c - AMF can be started on two nodes (example config file needs   modification for this)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1058 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-28  Steven Dake  <sdake at redhat.com>
+2006-05-29  Steven Dake  <sdake at redhat.com>
 
 	Set to SCHED_RR:1 to match ipc layer
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1057 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8485,8 +9349,6 @@
 	Update TODO to match 2006 project priorities.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1055 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-26  Steven Dake  <sdake at redhat.com>
-
 	This sanitizes the makefiles in several ways * .so and .so.1 files are linked to library.so.1.0.0 and installed with make install * renames all build targets to library.so.1.0.0 from library.so.1.0 * puts ld.so.conf.d files in the correct place * allows not installing static libraries by using make install STATICLIBS=NO
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1054 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8499,11 +9361,11 @@
 	Under load, it was observed that the token could be lost because the totem protocol was not being scheduled above the other I/O processes. This patch reinstalls the sched_setscheduler call which for some reason was commented out.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1051 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-05-26  Steven Dake  <sdake at redhat.com>
+
 	defect 1270 Fix checkpoint read operation which would return invalid operation in some circumstances.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1050 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-25  Steven Dake  <sdake at redhat.com>
-
 	Remove scandir error=%s printf since it spews a bunch of errors when the aisexec is run after a make install
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1049 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8544,7 +9406,7 @@
 	Remove poinless man-page. bug fix CPG example.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1038 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-21  Steven Dake  <sdake at redhat.com>
+2006-05-22  Steven Dake  <sdake at redhat.com>
 
 	commit for redundant ring take 4 was only done from exec directory missing all of the commits for the rest of the directories.  This commit will now allow the tree to compile.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1035 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8607,7 +9469,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1025 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-10  Steven Dake  <sdake at redhat.com>
+2006-05-11  Steven Dake  <sdake at redhat.com>
 
 	Environment variable cleanup, documentation of environment variables in man pages, and rename of one of the environment variables used to specify the main openais configuration file.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1024 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8617,7 +9479,7 @@
 	fix compile under darwin: sched_setscheduler does not exist
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1023 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-05-09  Hans Feldt  <hans.feldt at ericsson.com>
+2006-05-10  Hans Feldt  <hans.feldt at ericsson.com>
 
 	- Preprocessor flags to control user, group and directory for configuration files removed.
 	- Environment variables for the same thing added:
@@ -8642,7 +9504,7 @@
 	Cope with >32 groups on a node that goes down. Add a missing endian conversion.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1020 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-29  Steven Dake  <sdake at redhat.com>
+2006-04-30  Steven Dake  <sdake at redhat.com>
 
 	Fix comile failures for BSD/Darwin port
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1019 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8672,8 +9534,6 @@
 	Add invalid handle definition
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1014 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-26  Steven Dake  <sdake at redhat.com>
-
 	Remove priority from aispoll since we now use the kernel scheduler for priorities for polling
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1013 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8721,7 +9581,7 @@
 	Patch from Hans to fix segfault in loading of LCR components
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@999 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-20  Steven Dake  <sdake at redhat.com>
+2006-04-21  Steven Dake  <sdake at redhat.com>
 
 	More make install work to install all necessary files
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@998 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8741,7 +9601,7 @@
 	Patch from Hans to significantly improve the logging functionality read openais.conf.5 for info on how the new logging works.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@995 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-15  Steven Dake  <sdake at redhat.com>
+2006-04-16  Steven Dake  <sdake at redhat.com>
 
 	Remove segfault when object database can't be loaded
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@994 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8749,6 +9609,8 @@
 	Remove segfaults when object database can't be loaded for some reason.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@993 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-04-15  Steven Dake  <sdake at redhat.com>
+
 	remove -DDEBUG from release build
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@992 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8776,7 +9638,7 @@
 	Add missing vsf.h from previous commit
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@984 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-13  Steven Dake  <sdake at redhat.com>
+2006-04-14  Steven Dake  <sdake at redhat.com>
 
 	fix fc5 segfault correctly by removing code that violates strict aliasing rules.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@983 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8784,7 +9646,7 @@
 	scale part 3 componentize YKD dynamic linear voting algorithm
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@982 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-12  Steven Dake  <sdake at redhat.com>
+2006-04-13  Steven Dake  <sdake at redhat.com>
 
 	Improvement of the rrp_algo data structure to support only running totemnet api calls on the appropriate totemnet interfaces.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@981 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8803,7 +9665,7 @@
 	Split the logging config options into three keys: to_file, to_stderr & to_syslog
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@977 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-08  Steven Dake  <sdake at redhat.com>
+2006-04-09  Steven Dake  <sdake at redhat.com>
 
 	defect 1191 Add more support for the redundant ring protocol.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@976 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8842,7 +9704,7 @@
 	defect 1170 Fix recovery protocol to avoid assertion in memb_state_recovery_enter
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@967 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-04-03  Steven Dake  <sdake at redhat.com>
+2006-04-04  Steven Dake  <sdake at redhat.com>
 
 	defect 205 implement totem single ring protocol flow control algorithm
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@966 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -8917,7 +9779,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@951 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-03-15  Steven Dake  <sdake at redhat.com>
+2006-03-16  Steven Dake  <sdake at redhat.com>
 
 	Patch from Hans Feldt This small patch (against r948) adds variable CPPFLAGS to all make rules that compiles `.c' files into `.o' files.
 	This makes it possible to set CPPFLAGS on the command line as in:
@@ -8986,11 +9848,13 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@939 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-03-05  Muni Bajpai  <muni.osdl at gmail.com>
+2006-03-06  Muni Bajpai  <muni.osdl at gmail.com>
 
 	bug 1115. Fixes the synchronization algorithm which was skipping services.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@938 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-03-05  Muni Bajpai  <muni.osdl at gmail.com>
+
 	Bug Fix for memory leak in ckpt section management. Bug 1112
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@937 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -8999,7 +9863,7 @@
 	Add cpg (closed process groups) component.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@936 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-03-02  Steven Dake  <sdake at redhat.com>
+2006-03-03  Steven Dake  <sdake at redhat.com>
 
 	defect 981 This patch fixes a problem where the synchronization engine would not work cross endian.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@935 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9010,11 +9874,13 @@
 	defect 981 This patch fixes a problem where totempg would not work cross-endian.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@933 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-03-01  Muni Bajpai  <muni.osdl at gmail.com>
+2006-03-02  Muni Bajpai  <muni.osdl at gmail.com>
 
 	reverting fix to man page as only 0.72 is broken with last byte zero in bindnetaddress
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@932 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-03-01  Muni Bajpai  <muni.osdl at gmail.com>
+
 	Remove the reference to the use of 0 as last byte in the bindnetaddr
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@931 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9026,7 +9892,7 @@
 	Fabien's patch for the BSD/Darwin port.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@926 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-02-14  Steven Dake  <sdake at redhat.com>
+2006-02-15  Steven Dake  <sdake at redhat.com>
 
 	Patch from Patrick This patch restores the functionality in previous versions where the node address could be specified as a network address in openais.conf
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@925 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9056,16 +9922,16 @@
 	Some versions of GCC were optimizing out the static ctor section.  This patch makes the ctor non-static so it is not optimized out.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@917 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-02-09  Steven Dake  <sdake at redhat.com>
-
 	Cleanup of dynamic loading to allow using the same interface factory code for statically linked components.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@916 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-02-01  Steven Dake  <sdake at redhat.com>
+2006-02-02  Steven Dake  <sdake at redhat.com>
 
 	Patch from Patrick to enable configuring the list of dynamic service handlers in the configuration file.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@915 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2006-02-01  Steven Dake  <sdake at redhat.com>
+
 	1049 make all service handlers dynamically loadable or compilable statically use the BUILD_DYNAMIC flag in the makefile to set dynamic loading or static compile.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@914 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9083,7 +9949,7 @@
 	defect 1049 Fix compile error in testlck and testmsg.  Use SA_AIS_OK.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@906 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-24  Steven Dake  <sdake at redhat.com>
+2006-01-25  Steven Dake  <sdake at redhat.com>
 
 	enhancement 1049 enhance services so dynamic service handlers are more easily possible
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@905 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9102,7 +9968,7 @@
 	defect 1046 SaErrorT in trunk branch, but only SaAisErrorT should be used
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@902 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-21  Steven Dake  <sdake at redhat.com>
+2006-01-22  Steven Dake  <sdake at redhat.com>
 
 	defect 1045 totempg is not thread safe, and AMF requires threads to instantiate components
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@898 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9117,12 +9983,12 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@892 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-15  Steven Dake  <sdake at redhat.com>
+2006-01-16  Steven Dake  <sdake at redhat.com>
 
 	remove old files that are no longer needed.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@891 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-13  Steven Dake  <sdake at redhat.com>
+2006-01-14  Steven Dake  <sdake at redhat.com>
 
 	Small man page cleanup
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@890 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9139,7 +10005,7 @@
 	defect 1030 This fixes the event handle leak on failure, the malloc check for hl, removes the redundant memset when creating a handle, and makes sure that the put of the channel handle is a valid handle.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@886 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-06  Steven Dake  <sdake at redhat.com>
+2006-01-07  Steven Dake  <sdake at redhat.com>
 
 	defect 1024 YKD algorithm doesn't always work when new_message_queue is full.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@885 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9157,8 +10023,6 @@
 	Delete empty files.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@881 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-02  Steven Dake  <sdake at redhat.com>
-
 	enhancement 1020 adds missing file from commit
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@880 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9168,7 +10032,7 @@
 	enhancement 1019 Modify YKD to select primary component and execute the synchronization operation only in the main partition.  In the non-primary partition, no new requests are allowed - they are all returned with the error code SA_AIS_ERR_TRY_AGAIN.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@878 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2006-01-01  Steven Dake  <sdake at redhat.com>
+2006-01-02  Steven Dake  <sdake at redhat.com>
 
 	defect 1006 on 64 bit platforms, the timer is not properly cleared resulting in segfaults
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@876 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9215,7 +10079,7 @@
 	fix documentation error from specification which identifies SaLckResourceLockAsync as the function name in some places but saLckResourceLockAsync in other places.  We settled on saLck since it matches the rest of the specifications.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@859 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-11-30  Steven Dake  <sdake at redhat.com>
+2005-12-01  Steven Dake  <sdake at redhat.com>
 
 	shared object name incorrectly set for the lock service to libSaLCK instead of libSaLck.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@858 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9223,6 +10087,8 @@
 	fix documentation error from specification which identifies SaLckResourceLockAsync as the function name in some places but saLckResourceLockAsync in other places.  We settled on saLck since it matches the rest of the specifications.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@857 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-11-30  Steven Dake  <sdake at redhat.com>
+
 	defect 979 This enhancement adds support for IPV6 to the trunk of openais.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@856 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9268,12 +10134,12 @@
 	defect 968 Improve worst-case failure detection time using active healthchecking
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@836 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-10-26  Steven Dake  <sdake at redhat.com>
+2005-10-27  Steven Dake  <sdake at redhat.com>
 
 	defect 914 fix gcc 4 specific compile warnings and compile errors
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@834 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-10-03  Steven Dake  <sdake at redhat.com>
+2005-10-04  Steven Dake  <sdake at redhat.com>
 
 	defect 909 c++ keywords are used in the internal implementation of list.h
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@832 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9283,7 +10149,7 @@
 	Fix compiler warnings when HZ is defined to be a long. Bugzilla #904
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@830 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-09-28  Steven Dake  <sdake at redhat.com>
+2005-09-29  Steven Dake  <sdake at redhat.com>
 
 	defect 903 First cut at a distributed locking service.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@829 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9304,7 +10170,7 @@
 	defect 895 Ruppert reported that there is code that doesn't do anything but should.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@821 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-09-20  Steven Dake  <sdake at redhat.com>
+2005-09-21  Steven Dake  <sdake at redhat.com>
 
 	reduce maximum message size since 253000 is beyond the max.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@818 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9312,6 +10178,8 @@
 	remove extraneous debug printf
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@816 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-09-20  Steven Dake  <sdake at redhat.com>
+
 	defect 892 Fix performance degradation when sending 10-15 messages per second because of a large seqno_unchanged_const.  Also, seqno_unchanged_const does not have a configurable option and this patch adds that support.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@814 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9342,7 +10210,7 @@
 	defect 840 J Seltzer reported that closed checkpoints in the TRY_AGAIN state are not closed in the executive but are closed in the library.  This patch fixes that problem.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@806 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-08-25  Steven Dake  <sdake at redhat.com>
+2005-08-26  Steven Dake  <sdake at redhat.com>
 
 	defect 837 Muni reported the token retransmission timer doesn't need to be reset when receiving a retransmission
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@805 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9383,7 +10251,7 @@
 	enhancmement 821 Global reorganization of totem code and also many feature enhancments These include: need to specify whether authentication is enabled or dislabed in config file need to specify frame size in config file need redundant ring placeholder need to specify version field of totem need to support large frame sizes need to break out threading code from totemsrp need to break out network code from totemsrp need to break out parser code from parse.c and some others
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@794 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-08-12  Steven Dake  <sdake at redhat.com>
+2005-08-13  Steven Dake  <sdake at redhat.com>
 
 	Patch from Russell Bryant to fix up gcc 4 warnings
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@793 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9403,11 +10271,13 @@
 	Fix for BUG 803.  We need to complete a library call even if the channel requested for unlink has been deleted previous to processing an unlink request.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@790 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-07-29  Steven Dake  <sdake at redhat.com>
+2005-07-30  Steven Dake  <sdake at redhat.com>
 
 	fixes segfault when ctrl-c pressed with new totemmrp code
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@789 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-07-29  Steven Dake  <sdake at redhat.com>
+
 	fixes a missed merge in the totemmrp mergeup
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@788 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -9448,7 +10318,7 @@
 	defect 788 ckptbench returns error 7 at 20000 byte size writes.  The benchmark program improperly creates the checkpoint parameters.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@777 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-07-26  Mark Haverkamp  <markh at osdl.org>
+2005-07-27  Mark Haverkamp  <markh at osdl.org>
 
 	Fix for bug 773.  Not quite the full fix, but the best we can do for now.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@776 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9607,7 +10477,7 @@
 	Check for reserved event ID and return SA_AIS_ERR_INVALID_PARAM. Bug 694
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@728 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-06-30  Mark Haverkamp  <markh at osdl.org>
+2005-07-01  Mark Haverkamp  <markh at osdl.org>
 
 	Wait to return status to the library until the clear request was received over the network so that the publish and receipt of the event is in sync with the time clear request.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@727 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9620,12 +10490,10 @@
 	defect 502 fix assert when packet added in multicast message handler.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@725 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-06-29  Steven Dake  <sdake at redhat.com>
-
 	Remove some warnings from the compile.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@724 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-06-29  Mark Haverkamp  <markh at osdl.org>
+2005-06-30  Mark Haverkamp  <markh at osdl.org>
 
 	Error comparing unsigned to less than zero.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@723 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -9692,7 +10560,7 @@
 	The A spec required patterns to be set but the B spec doesn't.  Fix lib/evt.c and test/testevt.c
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@708 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-06-21  Mark Haverkamp  <markh at osdl.org>
+2005-06-22  Mark Haverkamp  <markh at osdl.org>
 
 	This fixes some B spec related parameter checks
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@707 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -10099,7 +10967,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@644 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-05-26  Steven Dake  <sdake at mvista.com>
+2005-05-27  Steven Dake  <sdake at mvista.com>
 
 	(Logical change 1.196)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@643 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -10119,7 +10987,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@640 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-05-26  Mark Haverkamp  <markh at osdl.org>
+2005-05-27  Mark Haverkamp  <markh at osdl.org>
 
 	Allow services to use the openais.conf file for setting custom options. Evt now allows the maximum delivery queue size and the resume size to be set in openais.conf
 	(Logical change 1.195)
@@ -10257,8 +11125,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@620 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-04-20  Steven Dake  <sdake at mvista.com>
-
 	defect 505 - fix uncompilable with gcc 2.95
 	(Logical change 1.186)
 
@@ -10271,7 +11137,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@618 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-04-20  Mark Haverkamp  <markh at osdl.org>
+2005-04-21  Mark Haverkamp  <markh at osdl.org>
 
 	Defect 501.
 	Fix some mutex and error return problems.
@@ -10289,6 +11155,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@616 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-04-20  Mark Haverkamp  <markh at osdl.org>
+
 	For defect 501. Fix possible stale pointers in async lists if an application disconnects before its command has been fully processed.
 	(Logical change 1.184)
 
@@ -10332,7 +11200,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@610 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-04-15  Steven Dake  <sdake at mvista.com>
+2005-04-16  Steven Dake  <sdake at mvista.com>
 
 	totemsrp.c:   Fixes a condition which would result in a proc set and failed set   being equal which would force the algorithm to never reach   consensus in the membership algorithm.
 	BKrev: 42604e9fCBYactncuQuguPZ_IEfQsQ
@@ -10383,6 +11251,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@603 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-04-15  Steven Dake  <sdake at mvista.com>
+
 	crypto.c:   autodetect endian and wordsize with gnuisms
 	BKrev: 42602efdZ8LfQwIHBFrdtsjrK3BtCg
 
@@ -10560,7 +11430,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@576 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-04-04  Steven Dake  <sdake at mvista.com>
+2005-04-05  Steven Dake  <sdake at mvista.com>
 
 	Patch from Miyotaka Sakai to fix access to free area defect 426.
 	(Logical change 1.168)
@@ -10606,7 +11476,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@569 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-30  Miyotaka Sakai  <sakai at unknown.org>
+2005-03-31  Miyotaka Sakai  <sakai at unknown.org>
 
 	fix not to transit state when process terminate
 	(Logical change 1.166)
@@ -10634,8 +11504,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@565 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-29  Steven Dake  <sdake at mvista.com>
-
 	Merge sdake at bk.osdl.org:/var/bk/openais into persist.az.mvista.com:/home/sdake/openais
 	2005/03/29 15:03:30-07:00 mvista.com!sdake
 	testckpt.c:
@@ -10662,7 +11530,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@562 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-28  Miyotaka Sakai  <sakai at unknown.org>
+2005-03-29  Miyotaka Sakai  <sakai at unknown.org>
 
 	fix configuration change
 	(Logical change 1.163)
@@ -10759,7 +11627,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@549 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-22  Steven Dake  <sdake at mvista.com>
+2005-03-23  Steven Dake  <sdake at mvista.com>
 
 	defect325 - rename saCkptActiveCheckpointSet to saCkptActiveReplicaSet
 	(Logical change 1.157)
@@ -10791,7 +11659,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@544 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-22  Mark Haverkamp  <markh at osdl.org>
+2005-03-23  Mark Haverkamp  <markh at osdl.org>
 
 	Fix an off by one error causing a bad event ID to be sent after a recovery in some cases.
 	BKrev: 4240a8ba6cGIAgqLoTZNAUZJJOgyrg
@@ -10855,7 +11723,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@536 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-16  Steven Dake  <sdake at mvista.com>
+2005-03-17  Steven Dake  <sdake at mvista.com>
 
 	Block multicast messages during synchronization.
 	(Logical change 1.151)
@@ -10875,6 +11743,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@533 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-03-16  Steven Dake  <sdake at mvista.com>
+
 	cleanup some shared datatypes.
 	(Logical change 1.150)
 
@@ -10936,8 +11806,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@523 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-03-14  Steven Dake  <sdake at mvista.com>
-
 	Add checkpoint reader and writer to test synchronization
 	(Logical change 1.147)
 
@@ -10956,6 +11824,8 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@519 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-03-14  Steven Dake  <sdake at mvista.com>
+
 	Merge sdake at bk.osdl.org:/var/bk/openais into persist.az.mvista.com:/home/sdake/openais
 	2005/03/14 15:39:42-07:00 mvista.com!sdake
 	ipc_gen.h, ipc_ckpt.h, ckpt.c:
@@ -11047,7 +11917,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@506 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-02-26  Steven Dake  <sdake at broked.org>
+2005-02-27  Steven Dake  <sdake at broked.org>
 
 	em64t support
 	(Logical change 1.141)
@@ -11075,7 +11945,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@502 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-02-16  Steven Dake  <sdake at mvista.com>
+2005-02-17  Steven Dake  <sdake at mvista.com>
 
 	Auto merged
 	2005/02/16 17:24:12-07:00 mvista.com!sdake
@@ -11110,7 +11980,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@498 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-02-15  Mark Haverkamp  <markh at osdl.org>
+2005-02-16  Mark Haverkamp  <markh at osdl.org>
 
 	Look for SA_EVT_EVENTID_LOST when receiving an event.
 	(Logical change 1.138)
@@ -11136,6 +12006,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@494 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-02-15  Mark Haverkamp  <markh at osdl.org>
+
 	Add unlink function.
 	(Logical change 1.137)
 
@@ -11151,7 +12023,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@492 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2005-02-08  Steven Dake  <sdake at mvista.com>
+2005-02-09  Steven Dake  <sdake at mvista.com>
 
 	Increase code coverage by calling more API functions.
 	(Logical change 1.136)
@@ -11177,6 +12049,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@488 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2005-02-08  Steven Dake  <sdake at mvista.com>
+
 	(Logical change 1.135)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@487 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -11788,7 +12662,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@392 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-11-24  Steven Dake  <sdake at mvista.com>
+2004-11-25  Steven Dake  <sdake at mvista.com>
 
 	code coverage work cleanup
 	(Logical change 1.108)
@@ -11826,6 +12700,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@386 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-11-24  Steven Dake  <sdake at mvista.com>
+
 	Fix compile with gcc 2.95.
 	(Logical change 1.106)
 
@@ -11852,7 +12728,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@382 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-11-07  somacoma  <somacoma at unknown.org>
+2004-11-08  somacoma  <somacoma at unknown.org>
 
 	Merge
 	2004/10/29 00:13:35+02:00 somacoma.net!dns
@@ -11957,7 +12833,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@369 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-10-29  Steven Dake  <sdake at mvista.com>
+2004-10-30  Steven Dake  <sdake at mvista.com>
 
 	Add rlimit code to allow openais to work with linux kernel 2.6.9 or later
 	(Logical change 1.99)
@@ -11971,7 +12847,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@367 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-10-27  Steven Dake  <sdake at mvista.com>
+2004-10-28  Steven Dake  <sdake at mvista.com>
 
 	64bit safe ais types
 	(Logical change 1.98)
@@ -12191,7 +13067,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@339 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-10-14  Steven Dake  <sdake at mvista.com>
+2004-10-15  Steven Dake  <sdake at mvista.com>
 
 	Make testevs exit on evs_initialize if the return code is not EVS_OK.
 	(Logical change 1.94)
@@ -12360,7 +13236,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@318 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-10-01  Steven Dake  <sdake at mvista.com>
+2004-10-02  Steven Dake  <sdake at mvista.com>
 
 	Fix a bunch of errors in node get and async node get.
 	(Logical change 1.87)
@@ -12380,7 +13256,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@315 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-28  Miyotaka Sakai  <sakai at unknown.org>
+2004-09-29  Miyotaka Sakai  <sakai at unknown.org>
 
 	get rid of compile warning
 	(Logical change 1.86)
@@ -12535,7 +13411,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@292 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-23  Steven Dake  <sdake at mvista.com>
+2004-09-24  Steven Dake  <sdake at mvista.com>
 
 	testparse.c:   Fix commit error in changeset 1.77.
 	BKrev: 41534ab0cY4dYHQw-qoPHLMpXQTAAQ
@@ -12620,7 +13496,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@281 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-22  Steven Dake  <sdake at mvista.com>
+2004-09-23  Steven Dake  <sdake at mvista.com>
 
 	Store handle address in timer structure.  When timer expires, wipe out the handle address's value, since the timer is no longer valid. This allows double frees, or frees on handles that haven't been added. One note of caution: a handle cannot be moved into another variable and be expected to work properly for double frees.
 	(Logical change 1.79)
@@ -12646,6 +13522,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@277 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-09-22  Steven Dake  <sdake at mvista.com>
+
 	Fix annoying build failure because of code coverage increases.
 	(Logical change 1.78)
 
@@ -12658,7 +13536,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@275 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-20  Steven Dake  <sdake at mvista.com>
+2004-09-21  Steven Dake  <sdake at mvista.com>
 
 	Add retainined events while also cleaning up memory leakage that occurs because of a lack of retained events.
 	(Logical change 1.77)
@@ -12776,7 +13654,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@259 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-15  Steven Dake  <sdake at mvista.com>
+2004-09-16  Steven Dake  <sdake at mvista.com>
 
 	gmi.c:   Bug 44.   Fixes assertion in executive when running ckptbenchth.
 	BKrev: 4148dc42NSqyi9F4s6exhsVarsF10Q
@@ -12790,6 +13668,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@257 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-09-15  Steven Dake  <sdake at mvista.com>
+
 	main.c:   Call poll_destroy when executing ais_done.  This increases code   coverage from 66.9% to 82.3%.
 	BKrev: 4148ac12oFAraidHBF8lhdpMgBXc1w
 
@@ -12844,7 +13724,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@248 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-09  Steven Dake  <sdake at mvista.com>
+2004-09-10  Steven Dake  <sdake at mvista.com>
 
 	BUG 37.  Fix several leaks during configuration changes.  Also fixes a possible assert with many large messages being sent from multiple processors at the same time.
 	(Logical change 1.68)
@@ -12886,7 +13766,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@243 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-09-07  Steven Dake  <sdake at broked.org>
+2004-09-08  Steven Dake  <sdake at broked.org>
 
 	Get rid of magic number 1500 and replace with PACKET_SIZE_MAX. Also fix a glaring memory overwrite bug in gmi_init which would init 256k of memory instead of PACKET_SIZE_MAX memory.
 	(Logical change 1.66)
@@ -12900,6 +13780,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@241 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-09-07  Steven Dake  <sdake at broked.org>
+
 	EVS library makes compiler warning on some compilers.  Found and fixed by Sakai Miyotaka.
 	(Logical change 1.65)
 
@@ -13142,7 +14024,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@210 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-27  Steven Dake  <sdake at mvista.com>
+2004-08-28  Steven Dake  <sdake at mvista.com>
 
 	gmi.c:   Flush all multicast messages by delivering them before   processing the token.  This ensures that the mcast fd   doesn't buffer too many old messages and avoids an assert.
 	BKrev: 412fd3cesE7M-pXl9OZs1X2CyK7Y4A
@@ -13156,7 +14038,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@208 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-23  Steven Dake  <sdake at mvista.com>
+2004-08-24  Steven Dake  <sdake at mvista.com>
 
 	Add initial support for multipathing to group messaging.
 	(Logical change 1.60)
@@ -13188,7 +14070,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@203 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-23  Mark Haverkamp  <markh at osdl.org>
+2004-08-24  Mark Haverkamp  <markh at osdl.org>
 
 	Need to check the size of the response header here.
 	(Logical change 1.59)
@@ -13202,7 +14084,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@201 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-22  Steven Dake  <sdake at mvista.com>
+2004-08-23  Steven Dake  <sdake at mvista.com>
 
 	Clean up usage of ais_done.  This includes passing a value for each done type.  Also, libais_disconnect cleaned up so it doesn't ais_done when its queues are full.  Instead it disconnects the library connection.  A new connection state variable added to the conn_info structure in place of active.
 	(Logical change 1.58)
@@ -13261,7 +14143,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@192 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-20  Steven Dake  <sdake at mvista.com>
+2004-08-21  Steven Dake  <sdake at mvista.com>
 
 	Cleanup errors in Makefile.
 	(Logical change 1.55)
@@ -13415,7 +14297,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@169 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-08-09  Steven Dake  <sdake at broked.org>
+2004-08-10  Steven Dake  <sdake at broked.org>
 
 	gmi.c:   When 2 processors are part of the configuration, then one   of the members leaves, then a new configuration occurs   with 2 or more members, the "joined" list was not   being properly passed to the rest of the executive   services.  This bug fixed.
 	BKrev: 41185349SwUWKZU-QQ_K91jAnvqYpA
@@ -13528,7 +14410,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@152 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-29  Steven Dake  <sdake at mvista.com>
+2004-07-30  Steven Dake  <sdake at mvista.com>
 
 	Change RecvQueue to use a stack structure for receiving the response instead of passing in the maximum sized value for a response message.
 	(Logical change 1.48)
@@ -13554,6 +14436,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@148 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-07-29  Steven Dake  <sdake at mvista.com>
+
 	(Logical change 1.47)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@147 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
@@ -13636,7 +14520,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@134 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-28  Steven Dake  <sdake at mvista.com>
+2004-07-29  Steven Dake  <sdake at mvista.com>
 
 	README.devmap:   Document new changes to exec handler function prototype   and recommend using the source_addr for deferring requests   instead of recording the ip address in the message itself. main.c, handlers.h, clm.c, ckpt.c, amf.c:   Add source_addr to exec message handler for event service.
 	BKrev: 41082a5cY6cLQK7NG_rxZrkb7lERfw
@@ -13656,7 +14540,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@131 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-27  Steven Dake  <sdake at mvista.com>
+2004-07-28  Steven Dake  <sdake at mvista.com>
 
 	Major cleanup and use hdb.c abstracted out functions now instead of internal hacked together stuff that was there previously.
 	(Logical change 1.44)
@@ -13709,7 +14593,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@122 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-26  Steven Dake  <sdake at mvista.com>
+2004-07-27  Steven Dake  <sdake at mvista.com>
 
 	Remove BINDTODEVICE socket option and replace with MULTICAST_IF to be more portable and require less root privs.
 	(Logical change 1.42)
@@ -13723,7 +14607,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@120 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-23  Steven Dake  <sdake at mvista.com>
+2004-07-24  Steven Dake  <sdake at mvista.com>
 
 	Additional information for using the saRecvQueue call in a library.
 	(Logical change 1.41)
@@ -13737,7 +14621,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@118 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-20  Steven Dake  <sdake at mvista.com>
+2004-07-21  Steven Dake  <sdake at mvista.com>
 
 	(Logical change 1.40)
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@117 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -13751,7 +14635,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@115 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-14  Steven Dake  <sdake at mvista.com>
+2004-07-15  Steven Dake  <sdake at mvista.com>
 
 	Major improvements to fragmentation.  It works alot better now.
 	(Logical change 1.39)
@@ -13791,8 +14675,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@109 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-12  Steven Dake  <sdake at mvista.com>
-
 	Add ip to deliver_fn callback
 	(Logical change 1.36)
 
@@ -13823,6 +14705,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@104 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-07-12  Steven Dake  <sdake at mvista.com>
+
 	gmi.c:   Fix debug exit.
 	BKrev: 40f3069ao4cKWSuICZHrMdMIqJDlMw
 
@@ -13868,7 +14752,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@100 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-11  Steven Dake  <sdake at broked.org>
+2004-07-12  Steven Dake  <sdake at broked.org>
 
 	Retransmit orf token if no multicast or token received within a timeout period.  This could mean that the token was lost, but no configuration change has really occured.  Rather then execute the heavyweight membership protocol, just retry the token and if it fails after the token timeout, execute a configuration change sequence.
 	BKrev: 40f21082dvUxH0aOPvKmpqoqlkEgEA
@@ -13914,7 +14798,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@93 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-09  Steven Dake  <sdake at mvista.com>
+2004-07-10  Steven Dake  <sdake at mvista.com>
 
 	Removes the external dependency from the gmi to the global variable this_ip.  This is still passed in for gmi_init users to be notified of which IP was selected, but copied for local use.
 	BKrev: 40ef692cfv-e5JCQ8T9iC-_i3AaBcg
@@ -13934,6 +14818,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@90 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-07-09  Steven Dake  <sdake at mvista.com>
+
 	Rename: exec/poll.h -> exec/aispoll.h
 	}(Logical change 1.28)
 
@@ -14005,8 +14891,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@78 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-07-07  Steven Dake  <sdake at mvista.com>
-
 	Fix build errors after previous commit.
 	(Logical change 1.25)
 
@@ -14085,6 +14969,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@65 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-07-07  Steven Dake  <sdake at mvista.com>
+
 	Change memcpy to memmove to quiet down valgrind.
 	(Logical change 1.23)
 
@@ -14277,7 +15163,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@33 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-28  Steven Dake  <sdake at mvista.com>
+2004-06-29  Steven Dake  <sdake at mvista.com>
 
 	Cluster membership API not being authenticated by openais executive. This results in testclm locking on start in saClmInitialize.
 	BKrev: 40e095e4VUojyuQYOBeAUqjZnbBTCA
@@ -14329,8 +15215,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@26 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-22  Steven Dake  <sdake at mvista.com>
-
 	QUICKSTART:   Modified quickstart guide thanks to comments from Yixiong Zou   Information about adding groups added   Information about testclm blocking until cluster membership   event occurs added.
 	BKrev: 40d920ffgjnZO35fZ2d947AV5TWGWQ
 
@@ -14407,8 +15291,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@15 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-17  Steven Dake  <sdake at mvista.com>
-
 	Fix single-node AMF assertion failure (cause runaway recursion).
 	BKrev: 40d22e42IsByk3WqoRIGSlETLqdUgw
 
@@ -14421,6 +15303,8 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@13 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
+2004-06-17  Steven Dake  <sdake at mvista.com>
+
 	Crash when no network.conf file present (missing error checking).
 	(Logical change 1.6)
 
@@ -14433,8 +15317,6 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@11 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-16  Steven Dake  <sdake at mvista.com>
-
 	Fix bug in membership protocol where form token sometimes times out because the initial send of the token is sent to the wrong address.
 	2004/06/16 15:42:49-07:00 mvista.com!sdake
 	Performance enhancements: Allow more messages to be multicast per
@@ -14453,7 +15335,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@9 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-15  Steven Dake  <sdake at mvista.com>
+2004-06-16  Steven Dake  <sdake at mvista.com>
 
 	QUICKSTART:   Test change
 	BKrev: 40cfe45fPOa0mbN6jPO9bRiSG_tZWA
@@ -14467,7 +15349,7 @@
 
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@7 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-15  John Cherry  <cherry at osdl.net>
+2004-06-16  John Cherry  <cherry at osdl.net>
 
 	Import changeset
 	BKrev: 40cf759cAkpvgQbZ43nWNRClHYqlXQ
@@ -14481,7 +15363,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@4 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-15  cem  <cem at osdl.net>
+2004-06-16  cem  <cem at osdl.net>
 
 	Initial repository create
 	BKrev: 40cf7521T7yNtYdteqiCUMgD7RdOCA
@@ -14492,7 +15374,7 @@
 	Initial revision
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2 fd59a12c-fef9-0310-b244-a6a79926bd2f
 
-2004-06-15  Steven Dake  <sdake at broked.org>
+2004-06-16  Steven Dake  <sdake at broked.org>
 
 	New repository initialized by cvs2svn.
 	git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1 fd59a12c-fef9-0310-b244-a6a79926bd2f
diff --git a/INSTALL b/INSTALL
index 2809df9..53a8230 100644
--- a/INSTALL
+++ b/INSTALL
@@ -123,6 +123,56 @@ balance:~/corosync/trunk% ./configure --enable-rdma
 Hopefully pkgconfig support is added in your distribution's version of
 libibverbs and librdmacm soon if you run into this problem.
 
+-----------------------------------------
+* Building with SNMP/DBUS support *
+-----------------------------------------
+
+You can get SNMP traps on the following corosync events:
+1) node joine/leave
+2) application connect/dissconnect from corosync
+3) quorum gain/lost
+
+There are 2 modes of achieving this DBUS + foghorn and snmp-agentx.
+
+Setting up to get dbus events.
+------------------------------
+foghorn (http://git.fedorahosted.org/git/foghorn.git) converts
+dbus signals into snmp traps. So install foghorn.
+
+$ ./configure --enable-dbus
+$ make && sudo make install
+$ /etc/init.d/corosync start
+$ echo "OPTIONS=\"-d\"" > /etc/sysconfig/corosync-notifyd
+$ /etc/init.d/corosync-notifyd start
+Start foghorn
+
+to see the dbus signals getting sent try:
+$ dbus-monitor --system
+
+Setting up snmp-agentx.
+-----------------------
+If you don't want to use dbus then you can use snmp-agentx.
+
+$ ./configure --enable-snmp
+$ make && sudo make install
+$ /etc/init.d/corosync start
+$ vim /etc/snmp/snmptrapd.conf
+
+Add the following:
+authCommunity   log,execute,net public
+$ /etc/init.d/snmptrapd start
+$ echo "OPTIONS=\"-s\"" > /etc/sysconfig/corosync-notifyd
+$ /etc/init.d/corosync-notifyd start
+
+I start up wireshark to see if there are any snmp traps been sent
+as I am too lazy to setup a manager to receive traps.
+
+run a program that talks to corosync e.g.
+$ corosync-objctl
+
+And you should get traps
+
+
 ------------------------
 * Configuring Corosync *
 ------------------------
diff --git a/Makefile.am b/Makefile.am
index f22f03f..315bbaa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,7 +55,12 @@ corosysconf_DATA	= conf/corosync.conf.example \
 			  conf/corosync.conf.example.udpu
 
 SUBDIRS			= include lcr lib exec services tools test pkgconfig \
-			  man init
+			  man init conf
+
+coverity:
+	cov-build --dir=cov make
+	cov-analyze --dir cov
+	cov-format-errors --dir cov
 
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)/${COROSYSCONFDIR}/service.d
@@ -87,7 +92,7 @@ clean-generic:
 
 $(SPEC): $(SPEC).in
 	rm -f $@-t $@
-	LC_ALL=C date="$(shell date "+%a %b %d %Y")" && \
+	date="$(shell LC_ALL=C date "+%a %b %d %Y")" && \
 	if [ -f .tarball-version ]; then \
 		gitver="$(shell cat .tarball-version)" && \
 		rpmver=$$gitver && \
@@ -154,7 +159,7 @@ gen_start_date = 2000-01-01
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
 	if test -d .git; then						\
-		$(top_srcdir)/build-aux/gitlog-to-changelog		\
+		LC_ALL=C $(top_srcdir)/build-aux/gitlog-to-changelog		\
 			--since=$(gen_start_date) > $(distdir)/cl-t;	\
 		rm -f $(distdir)/ChangeLog;				\
 		mv $(distdir)/cl-t $(distdir)/ChangeLog;		\
diff --git a/Makefile.in b/Makefile.in
index c90765a..11f8442 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -186,6 +186,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -220,7 +222,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -231,6 +232,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -291,6 +295,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
@@ -318,7 +323,7 @@ corosysconf_DATA = conf/corosync.conf.example \
 			  conf/corosync.conf.example.udpu
 
 SUBDIRS = include lcr lib exec services tools test pkgconfig \
-			  man init
+			  man init conf
 
 RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \
 		  --define "_specdir $(abs_builddir)" \
@@ -878,6 +883,11 @@ uninstall-am: uninstall-corosysconfDATA uninstall-dist_docDATA \
 	uninstall-local
 
 
+coverity:
+	cov-build --dir=cov make
+	cov-analyze --dir cov
+	cov-format-errors --dir cov
+
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)/${COROSYSCONFDIR}/service.d
 	$(INSTALL) -d $(DESTDIR)/${COROSYSCONFDIR}/uidgid.d
@@ -906,7 +916,7 @@ clean-generic:
 
 $(SPEC): $(SPEC).in
 	rm -f $@-t $@
-	LC_ALL=C date="$(shell date "+%a %b %d %Y")" && \
+	date="$(shell LC_ALL=C date "+%a %b %d %Y")" && \
 	if [ -f .tarball-version ]; then \
 		gitver="$(shell cat .tarball-version)" && \
 		rpmver=$$gitver && \
@@ -962,7 +972,7 @@ dist-hook: gen-ChangeLog
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
 	if test -d .git; then						\
-		$(top_srcdir)/build-aux/gitlog-to-changelog		\
+		LC_ALL=C $(top_srcdir)/build-aux/gitlog-to-changelog		\
 			--since=$(gen_start_date) > $(distdir)/cl-t;	\
 		rm -f $(distdir)/ChangeLog;				\
 		mv $(distdir)/cl-t $(distdir)/ChangeLog;		\
diff --git a/TODO b/TODO
index 21a7a51..9a2db8f 100644
--- a/TODO
+++ b/TODO
@@ -46,13 +46,14 @@ automatically reenable a redundant ring when it has been back in service.
 ------------------------------------------------------------------------------
 topic-snmp
 ------------------------------------------------------------------------------
-Main Developer: Steven Dake
+Main Developer: Angus Salkeld
 Started: Not Started
-Finished: 0%
+Finished: 100%
 target: needle
 Description:
 This topic involves investigation of adding SNMP support into Corosync.
 
+
 ------------------------------------------------------------------------------
 topic-udpu
 ------------------------------------------------------------------------------
diff --git a/aclocal.m4 b/aclocal.m4
index 721df62..f5c1242 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+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'.])])
diff --git a/conf/COROSYNC-MIB.txt b/conf/COROSYNC-MIB.txt
new file mode 100644
index 0000000..d8071f9
--- /dev/null
+++ b/conf/COROSYNC-MIB.txt
@@ -0,0 +1,197 @@
+COROSYNC-MIB DEFINITIONS ::= BEGIN
+
+--
+-- MIB objects for Corosync
+--
+
+IMPORTS
+    MODULE-IDENTITY,NOTIFICATION-TYPE,
+    Integer32,enterprises,OBJECT-TYPE,
+    Counter64                                   FROM SNMPv2-SMI
+    MODULE-COMPLIANCE, OBJECT-GROUP,
+    NOTIFICATION-GROUP                          FROM SNMPv2-CONF
+;
+
+corosync MODULE-IDENTITY
+    LAST-UPDATED    "201101211300Z"
+    ORGANIZATION    "www.corosync.org"
+    CONTACT-INFO    "name:  Yuki Sato
+                     email: openais at lists.linux-foundation.org"
+    DESCRIPTION     "Add cluster quorum traps, fix smilint errors, and fix notification block ID"
+    REVISION        "201101211300Z"
+    DESCRIPTION     "MIB objects for Corosync"
+    REVISION        "201003251209Z"
+    DESCRIPTION     "First draft"
+    REVISION        "200911061318Z"
+    DESCRIPTION
+        "Private Enterprise Number has been assigned."
+        ::= { enterprises 35488 }
+
+--
+-- top level structure
+--
+corosyncNotices OBJECT IDENTIFIER ::= { corosync 0 }
+corosyncObjects OBJECT IDENTIFIER ::= { corosync 1 }
+corosyncConformance OBJECT IDENTIFIER ::= { corosync 200 }
+
+--
+--  Corosync MIB entries
+--
+
+--
+-- Node Information
+--
+corosyncObjectsNodeName OBJECT-TYPE
+    SYNTAX      OCTET STRING (SIZE(1..64))
+    MAX-ACCESS  accessible-for-notify
+    STATUS      current
+    DESCRIPTION "Hostname of the cluster node."
+::= { corosyncObjects 1 }
+
+corosyncObjectsNodeID OBJECT-TYPE
+    SYNTAX      Integer32
+    MAX-ACCESS  accessible-for-notify
+    STATUS      current
+    DESCRIPTION "The unique integer of the node."
+::= { corosyncObjects 2 }
+
+corosyncObjectsNodeStatus OBJECT-TYPE
+    SYNTAX	OCTET STRING
+    MAX-ACCESS  accessible-for-notify
+    STATUS      current
+    DESCRIPTION
+        "The status of the node."
+::= { corosyncObjects 3 }
+
+corosyncObjectsNodeAddress OBJECT-TYPE
+    SYNTAX      OCTET STRING
+    MAX-ACCESS  accessible-for-notify
+    STATUS      current
+    DESCRIPTION "The address of the node."
+::= { corosyncObjects 4 }
+
+
+--
+-- Quorum Information
+--
+--
+
+-- not currently used, but here for future use
+corosyncObjectsRingSeq OBJECT-TYPE
+    SYNTAX	Counter64
+    MAX-ACCESS	accessible-for-notify
+    STATUS	current
+    DESCRIPTION
+	"Ring ID Sequence number"
+::= { corosyncObjects 20 }
+
+corosyncObjectsQuorumStatus OBJECT-TYPE
+    SYNTAX	OCTET STRING
+    MAX-ACCESS  accessible-for-notify
+    STATUS      current
+    DESCRIPTION
+	"Quorum Status"
+::= { corosyncObjects 21 }
+
+
+--
+-- Application Information
+--
+corosyncObjectsAppName OBJECT-TYPE
+    SYNTAX	OCTET STRING
+    MAX-ACCESS	accessible-for-notify
+    STATUS	current
+    DESCRIPTION
+	"Application name"
+::= { corosyncObjects 40 }
+
+corosyncObjectsAppStatus OBJECT-TYPE
+    SYNTAX	OCTET STRING
+    MAX-ACCESS	accessible-for-notify
+    STATUS	current
+    DESCRIPTION
+	"Application status"
+::= { corosyncObjects 41 }
+
+--
+-- Notification Information
+--
+corosyncNoticesNodeStatus NOTIFICATION-TYPE
+    OBJECTS	{ corosyncObjectsNodeName,
+		  corosyncObjectsNodeID,
+		  corosyncObjectsNodeAddress,
+		  corosyncObjectsNodeStatus }
+    STATUS      current
+    DESCRIPTION
+      "Produced when a node 'corosyncObjectsNodeName' joins or leaves
+       the cluster.
+
+       The notification includes the node name, nodeid, the node's
+       IP address and the status (either 'joined' or 'left')."
+::= { corosyncNotices 1 }
+
+corosyncNoticesQuorumStatus NOTIFICATION-TYPE
+    OBJECTS	{ corosyncObjectsNodeName,
+		  corosyncObjectsNodeID,
+		  corosyncObjectsQuorumStatus }
+    STATUS  current
+    DESCRIPTION
+      "Produced when the quorum state changes.
+
+       The notification also includes the node name, nodeid
+       and the new state (either 'quorate' or 'NOT quorate')."
+::= { corosyncNotices 2 }
+
+corosyncNoticesAppStatus NOTIFICATION-TYPE
+    OBJECTS	{ corosyncObjectsNodeName,
+		  corosyncObjectsNodeID,
+		  corosyncObjectsAppName, 
+		  corosyncObjectsAppStatus }
+    STATUS  current
+    DESCRIPTION
+      "Produced when a client application 'corosyncObjectsAppName' connects or
+       disconnects from Corosync.
+
+       The notification also includes the node name, nodeid, the application
+       name and the new state (either 'connected' or 'disconnected')."
+::= { corosyncNotices 3 }
+
+
+--
+-- Compliance Information
+--
+corosyncCompliances OBJECT IDENTIFIER ::= { corosyncConformance 1 }
+
+corosyncConformanceGroups OBJECT IDENTIFIER ::= { corosyncConformance 2 }
+
+corosyncCompliance MODULE-COMPLIANCE
+    STATUS      current
+    DESCRIPTION "Corosync compliance information"
+    MODULE    -- this module
+    MANDATORY-GROUPS { corosyncObjectGroup, corosyncNotificationGroup }
+::= { corosyncCompliances 1 }
+
+corosyncObjectGroup OBJECT-GROUP
+    OBJECTS { corosyncObjectsNodeName,
+              corosyncObjectsNodeID,
+              corosyncObjectsNodeStatus,
+              corosyncObjectsNodeAddress,
+              corosyncObjectsRingSeq,
+              corosyncObjectsQuorumStatus,
+	      corosyncObjectsAppName,
+	      corosyncObjectsAppStatus
+            }
+    STATUS      current
+    DESCRIPTION "Corosync Object Conformance Group"
+::= { corosyncConformanceGroups 1 }
+
+corosyncNotificationGroup NOTIFICATION-GROUP
+    NOTIFICATIONS { corosyncNoticesNodeStatus,
+                    corosyncNoticesQuorumStatus,
+		    corosyncNoticesAppStatus
+                  }
+    STATUS      current
+    DESCRIPTION "Corosync Notification Conformance Group"
+::= { corosyncConformanceGroups 2 }
+
+END
diff --git a/tools/corosync-blackbox b/conf/Makefile.am
old mode 100755
new mode 100644
similarity index 80%
copy from tools/corosync-blackbox
copy to conf/Makefile.am
index b1c27ec..3d7adcc
--- a/tools/corosync-blackbox
+++ b/conf/Makefile.am
@@ -1,7 +1,7 @@
-#!/bin/sh
-# Copyright (c) 2010 Red Hat, Inc.
+# Copyright (c) 2009 Red Hat, Inc.
 #
-# Authors: Angus Salkeld <asalkeld at redhat.com
+# Authors: Andrew Beekhof
+#         Steven Dake (sdake at redhat.com)
 #
 # This software licensed under BSD license, the text of which follows:
 #
@@ -29,7 +29,16 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-corosync-objctl -w runtime.blackbox.dump_state=$(date +%s)
-corosync-objctl -w runtime.blackbox.dump_flight_data=$(date +%s)
-corosync-fplay
+EXTRA_DIST     = COROSYNC-MIB.txt corosync-signals.conf
 
+MAINTAINERCLEANFILES    = Makefile.in
+
+if INSTALL_MIB
+mibdir = $(datadir)/snmp/mibs
+mib_DATA = COROSYNC-MIB.txt
+endif
+
+if INSTALL_DBUSCONF
+dbusdir = $(sysconfdir)/dbus-1/system.d
+dbus_DATA = corosync-signals.conf
+endif
diff --git a/services/Makefile.in b/conf/Makefile.in
similarity index 73%
copy from services/Makefile.in
copy to conf/Makefile.in
index af41f3e..b0fb66d 100644
--- a/services/Makefile.in
+++ b/conf/Makefile.in
@@ -18,7 +18,7 @@
 # Copyright (c) 2009 Red Hat, Inc.
 #
 # Authors: Andrew Beekhof
-#	   Steven Dake (sdake at redhat.com)
+#         Steven Dake (sdake at redhat.com)
 #
 # This software licensed under BSD license, the text of which follows:
 #
@@ -45,6 +45,7 @@
 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -64,7 +65,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = services
+subdir = conf
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/lib/libcfg.verso \
@@ -82,7 +83,31 @@ CONFIG_HEADER = $(top_builddir)/include/corosync/config.h \
 	$(top_builddir)/include/corosync/cs_config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
 DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(dbusdir)" "$(DESTDIR)$(mibdir)"
+DATA = $(dbus_DATA) $(mib_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -104,6 +129,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -138,7 +165,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -149,6 +175,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -209,23 +238,18 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+EXTRA_DIST = COROSYNC-MIB.txt corosync-signals.conf
 MAINTAINERCLEANFILES = Makefile.in
-AM_CFLAGS = -fPIC
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-			  -I$(top_builddir)/include/corosync \
-			  -I$(top_srcdir)/include/corosync
-
-SERVICE_LCRSO = evs cfg cpg confdb pload
-QUORUM_LCRSO = votequorum testquorum
-SOURCES = $(SERVICE_LCRSO:%=%.c) $(QUORUM_LCRSO:%=%.c)
-EXTRA_DIST = $(SOURCES)
-LCRSO = $(SERVICE_LCRSO:%=service_%.lcrso) $(QUORUM_LCRSO:%=quorum_%.lcrso)
-LCRSO_OBJS = $(SOURCES:%.c=%.o)
+ at INSTALL_MIB_TRUE@mibdir = $(datadir)/snmp/mibs
+ at INSTALL_MIB_TRUE@mib_DATA = COROSYNC-MIB.txt
+ at INSTALL_DBUSCONF_TRUE@dbusdir = $(sysconfdir)/dbus-1/system.d
+ at INSTALL_DBUSCONF_TRUE@dbus_DATA = corosync-signals.conf
 all: all-am
 
 .SUFFIXES:
@@ -238,9 +262,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu conf/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu services/Makefile
+	  $(AUTOMAKE) --gnu conf/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -259,6 +283,46 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+install-dbusDATA: $(dbus_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(dbusdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusdir)"
+	@list='$(dbus_DATA)'; test -n "$(dbusdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusdir)" || exit $$?; \
+	done
+
+uninstall-dbusDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dbus_DATA)'; test -n "$(dbusdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(dbusdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(dbusdir)" && rm -f $$files
+install-mibDATA: $(mib_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(mibdir)" || $(MKDIR_P) "$(DESTDIR)$(mibdir)"
+	@list='$(mib_DATA)'; test -n "$(mibdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mibdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(mibdir)" || exit $$?; \
+	done
+
+uninstall-mibDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(mib_DATA)'; test -n "$(mibdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(mibdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(mibdir)" && rm -f $$files
 tags: TAGS
 TAGS:
 
@@ -298,8 +362,11 @@ distdir: $(DISTFILES)
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile all-local
+all-am: Makefile $(DATA)
 installdirs:
+	for dir in "$(DESTDIR)$(dbusdir)" "$(DESTDIR)$(mibdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -328,7 +395,7 @@ maintainer-clean-generic:
 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
-clean-am: clean-generic clean-local mostlyclean-am
+clean-am: clean-generic mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
@@ -346,13 +413,13 @@ info: info-am
 
 info-am:
 
-install-data-am:
+install-data-am: install-dbusDATA install-mibDATA
 
 install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am: install-exec-local
+install-exec-am:
 
 install-html: install-html-am
 
@@ -390,60 +457,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-local
+uninstall-am: uninstall-dbusDATA uninstall-mibDATA
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am all-local check check-am clean clean-generic \
-	clean-local distclean distclean-generic distdir dvi dvi-am \
-	html html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-exec-local install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-local
-
-
- at BUILD_DARWIN_TRUE@quorum_%.lcrso: %.o
- at BUILD_DARWIN_TRUE@	$(CC) $(LDFLAGS) $(CFLAGS) -L$(top_builddir)/exec -llogsys -bundle -bundle_loader $(top_builddir)/exec/corosync $^ -o $@
-
- at BUILD_DARWIN_TRUE@service_%.lcrso: %.o
- at BUILD_DARWIN_TRUE@	$(CC) $(LDFLAGS) $(CFLAGS) -L$(top_builddir)/exec -llogsys -bundle -bundle_loader $(top_builddir)/exec/corosync $^ -o $@
-
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_TRUE at quorum_%.lcrso: %.o
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_TRUE@	$(LD) $(LDFLAGS) -G $^ -o $@
-
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_TRUE at service_%.lcrso: %.o
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_TRUE@	$(LD) $(LDFLAGS) -G $^ -o $@
-
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_FALSE at quorum_%.lcrso: %.o
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_FALSE@	$(CC) $(LDFLAGS) $(CFLAGS) $(COVERAGE_LCRSO_EXTRA_LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
-
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_FALSE at service_%.lcrso: %.o
- at BUILD_DARWIN_FALSE@@BUILD_SOLARIS_FALSE@	$(CC) $(LDFLAGS) $(CFLAGS) $(COVERAGE_LCRSO_EXTRA_LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
-
-%.o: %.c
-	$(CC) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
-
-lint:
-	-splint $(INCLUDES) $(LINT_FLAGS) $(CFLAGS) *.c
-
-all-local: $(LCRSO_OBJS) $(LCRSO)
-	@echo Built Service Engines
-
-install-exec-local:
-	$(INSTALL) -d $(DESTDIR)/$(LCRSODIR)
-	$(INSTALL) -m 755 $(LCRSO) $(DESTDIR)/$(LCRSODIR)
-
-uninstall-local:
-	cd $(DESTDIR)/$(LCRSODIR) && \
-		rm -f $(LCRSO)
+.PHONY: all all-am check check-am clean clean-generic distclean \
+	distclean-generic distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am \
+	install-dbusDATA install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-mibDATA install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am uninstall uninstall-am uninstall-dbusDATA \
+	uninstall-mibDATA
 
-clean-local:
-	rm -f *.o *.a *.so* *.da *.bb *.bbg *.lcrso
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/conf/corosync-signals.conf b/conf/corosync-signals.conf
new file mode 100644
index 0000000..4112d0c
--- /dev/null
+++ b/conf/corosync-signals.conf
@@ -0,0 +1,26 @@
+<!DOCTYPE busconfig PUBLIC
+	  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+	  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+	<!-- Only root can own the corosync service. -->
+	<policy user="root">
+		<allow own="org.corosync"/>
+	</policy>
+
+	<policy context="default">
+		<allow send_destination="org.corosync"
+		       send_path="/org/corosync"
+		       send_interface="org.corosync"
+		       send_member="NodeStateChange"/>
+		<allow send_destination="org.corosync"
+		       send_path="/org/corosync"
+		       send_interface="org.corosync"
+		       send_member="ConnectionStateChange"/>
+		<allow send_destination="org.corosync"
+		       send_path="/org/corosync"
+		       send_interface="org.corosync"
+		       send_member="QuorumStateChange"/>
+	</policy>
+
+</busconfig>
diff --git a/conf/corosync.conf.example b/conf/corosync.conf.example
index 3305366..9dfd873 100644
--- a/conf/corosync.conf.example
+++ b/conf/corosync.conf.example
@@ -10,6 +10,7 @@ totem {
 		bindnetaddr: 192.168.1.1
 		mcastaddr: 226.94.1.1
 		mcastport: 5405
+		ttl: 1
 	}
 }
 
diff --git a/conf/corosync.conf.example.udpu b/conf/corosync.conf.example.udpu
index 8bfbc6e..45c24ca 100644
--- a/conf/corosync.conf.example.udpu
+++ b/conf/corosync.conf.example.udpu
@@ -56,6 +56,7 @@ totem {
 		ringnumber: 0
 		bindnetaddr: 10.16.35.0
 		mcastport: 5405
+		ttl: 1
 	}
 	transport: udpu
 }
diff --git a/configure b/configure
index 10ac5ef..67f09e8 100755
--- a/configure
+++ b/configure
@@ -1,24 +1,20 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for corosync 1.3.0.
+# Generated by GNU Autoconf 2.63 for corosync 1.4.1.
 #
 # Report bugs to <openais at lists.osdl.org>.
 #
-#
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-#
-#
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -26,15 +22,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
 esac
+
 fi
 
 
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
 as_nl='
 '
 export as_nl
@@ -42,13 +46,7 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -59,7 +57,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in #(
+      case $arg in
       *"$as_nl"*)
 	expr "X$arg" : "X\\(.*\\)$as_nl";
 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -82,6 +80,13 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -91,15 +96,15 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
+case $0 in
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 IFS=$as_save_IFS
 
      ;;
@@ -111,16 +116,12 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
+  { (exit 1); exit 1; }
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
 done
 PS1='$ '
 PS2='> '
@@ -132,249 +133,7 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf at gnu.org and
-$0: openais at lists.osdl.org about your system, including any
-$0: error possibly output before this message. Then install
-$0: a modern shell, or manually run the script under such a
-$0: shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
+# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -388,12 +147,8 @@ else
   as_basename=false
 fi
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
 
+# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
@@ -413,126 +168,414 @@ $as_echo X/"$0" |
 	  }
 	  s/.*/./; q'`
 
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# CDPATH.
+$as_unset CDPATH
 
 
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
 
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
+  if test $as_have_required = yes &&	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
 }
 
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
+exitcode=0
+if as_func_success; then
+  :
 else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
+  exitcode=1
+  echo as_func_success failed.
 fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
 fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
 
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
+if as_func_ret_success; then
+  :
 else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
+  exitcode=1
+  echo as_func_ret_success failed.
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
 else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
+  exitcode=1
+  echo positional parameters were not saved.
 fi
-as_executable_p=$as_test_x
 
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+test \$exitcode = 0) || { (exit 1); exit 1; }
 
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
 
 
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
 
-# Name of the host.
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+	done
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell bug-autoconf at gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -548,14 +591,14 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='corosync'
 PACKAGE_TARNAME='corosync'
-PACKAGE_VERSION='1.3.0'
-PACKAGE_STRING='corosync 1.3.0'
+PACKAGE_VERSION='1.4.1'
+PACKAGE_STRING='corosync 1.4.1'
 PACKAGE_BUGREPORT='openais at lists.osdl.org'
-PACKAGE_URL=''
 
 ac_unique_file="lib/coroipcc.c"
 # Factoring default headers for most tests.
@@ -608,6 +651,10 @@ BUILD_SOLARIS_TRUE
 BUILD_DARWIN_FALSE
 BUILD_DARWIN_TRUE
 NSS_LDFLAGS
+INSTALL_DBUSCONF_FALSE
+INSTALL_DBUSCONF_TRUE
+INSTALL_MIB_FALSE
+INSTALL_MIB_TRUE
 OS_LDL
 OS_DYFLAGS
 COVERAGE_LCRSO_EXTRA_LDFLAGS
@@ -618,10 +665,18 @@ SOMAJOR
 SOCKETDIR
 LCRSODIR
 INITDDIR
+BUILD_SNMP_FALSE
+BUILD_SNMP_TRUE
+SNMP_LCRSO
+SNMPLIBS
+SNMPCONFIG
+statgrab_LIBS
 ibverbs_LIBS
 ibverbs_CFLAGS
 rdmacm_LIBS
 rdmacm_CFLAGS
+DBUS_LIBS
+DBUS_CFLAGS
 nss_LIBS
 nss_CFLAGS
 PKG_CONFIG
@@ -722,7 +777,6 @@ bindir
 program_transform_name
 prefix
 exec_prefix
-PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -741,10 +795,13 @@ enable_user_flags
 enable_coverage
 enable_small_memory_footprint
 enable_nss
+enable_dbus
+enable_testagents
 enable_rdma
 with_initddir
 with_lcrso_dir
 with_socket_dir
+enable_snmp
 '
       ac_precious_vars='build_alias
 host_alias
@@ -758,6 +815,8 @@ CPP
 PKG_CONFIG
 nss_CFLAGS
 nss_LIBS
+DBUS_CFLAGS
+DBUS_LIBS
 rdmacm_CFLAGS
 rdmacm_LIBS
 ibverbs_CFLAGS
@@ -870,7 +929,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -896,7 +956,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1100,7 +1161,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1116,7 +1178,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1146,17 +1209,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
-    esac
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
@@ -1173,13 +1236,15 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+   { (exit 1); exit 1; }; } ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1202,7 +1267,8 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1232,9 +1298,11 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  { $as_echo "$as_me: error: working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
 
 
 # Find the source files, if location was not specified.
@@ -1273,11 +1341,13 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1303,7 +1373,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 corosync 1.3.0 to adapt to many kinds of systems.
+\`configure' configures corosync 1.4.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1373,7 +1443,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of corosync 1.3.0:";;
+     short | recursive ) echo "Configuration of corosync 1.4.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1390,7 +1460,10 @@ Optional Features:
   --enable-coverage       : coverage analysis of the codebase.
   --enable-small-memory-footprint : Use small message queues and small messages sizes.
   --enable-nss            : Network Security Services encryption.
+  --enable-dbus                    : dbus events.
+  --enable-testagents             : Install Test Agents.
   --enable-rdma           : Infiniband RDMA transport support
+  --enable-snmp           : SNMP protocol support
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1405,12 +1478,14 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
   nss_CFLAGS  C compiler flags for nss, overriding pkg-config
   nss_LIBS    linker flags for nss, overriding pkg-config
+  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
+  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
   rdmacm_CFLAGS
               C compiler flags for rdmacm, overriding pkg-config
   rdmacm_LIBS linker flags for rdmacm, overriding pkg-config
@@ -1485,5767 +1560,10132 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-corosync configure 1.3.0
-generated by GNU Autoconf 2.65
+corosync configure 1.4.1
+generated by GNU Autoconf 2.63
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
 
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
+It was created by corosync $as_me 1.4.1, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
 
-} # ac_fn_c_try_compile
+  $ $0 $@
 
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+_ACEOF
+exec 5>>config.log
 {
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 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_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
 
-	ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
-} # ac_fn_c_try_link
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
 
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test -r "$ac_site_file"; then
+    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# 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`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='corosync'
+ VERSION='1.4.1'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers include/corosync/config.h include/corosync/cs_config.h"
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "$prefix" = "NONE"; then
+	prefix="/usr"
+
+		if test "$localstatedir" = "\${prefix}/var"; then
+		localstatedir="/var"
+	fi
+		if test "$sysconfdir" = "\${prefix}/etc"; then
+		sysconfdir="/etc"
+	fi
+		if test "$libdir" = "\${exec_prefix}/lib"; then
+		if test -e /usr/lib64; then
+			libdir="/usr/lib64"
+		else
+			libdir="/usr/lib"
+		fi
+	fi
+fi
+
+if test "$srcdir" = "."; then
+	{ $as_echo "$as_me:$LINENO: building in place srcdir:$srcdir" >&5
+$as_echo "$as_me: building in place srcdir:$srcdir" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define BUILDING_IN_PLACE 1
+_ACEOF
+
+else
+	{ $as_echo "$as_me:$LINENO: building out of tree srcdir:$srcdir" >&5
+$as_echo "$as_me: building out of tree srcdir:$srcdir" >&6;}
+fi
+
+# Checks for programs.
+
+# check stolen from gnulib/m4/gnu-make.m4
+if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
+	{ { $as_echo "$as_me:$LINENO: error: you don't seem to have GNU make; it is required" >&5
+$as_echo "$as_me: error: you don't seem to have GNU make; it is required" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  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
-       }; then :
-  ac_retval=0
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-    ac_retval=1
+
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
 
-} # ac_fn_c_try_cpp
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
 
-#undef $2
+ac_config_commands="$ac_config_commands depfiles"
 
-/* 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 $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
 
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# 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
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
-} # ac_fn_c_check_func
 
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
 
-       ac_retval=$ac_status
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
 
-} # ac_fn_c_try_run
 
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  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
+    # 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
 
-} # ac_fn_c_check_header_compile
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	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
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
+  cd ..
+  rm -rf conftest.dir
 else
-  ac_header_compiler=no
+  am_cv_CC_dependencies_compiler_type=none
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------- ##
-## Report this to openais at lists.osdl.org ##
-## ------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
 else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
-} # ac_fn_c_check_header_mongrel
 
-# ac_fn_c_find_intX_t LINENO BITS VAR
-# -----------------------------------
-# Finds a signed integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_intX_t ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
-$as_echo_n "checking for int$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  eval "$3=no"
-     # Order is important - never check a type that is potentially smaller
-     # than half of the expected target width.
-     for ac_type in int$2_t 'int' 'long int' \
-	 'long long int' 'short int' 'signed char'; do
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
-	     0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
-test_array [0] = 0
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
-		($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
-		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
-test_array [0] = 0
+done
+IFS=$as_save_IFS
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+rm -rf conftest.one conftest.two conftest.dir
 
-else
-  case $ac_type in #(
-  int$2_t) :
-    eval "$3=yes" ;; #(
-  *) :
-    eval "$3=\$ac_type" ;;
-esac
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       eval as_val=\$$3
-   if test "x$as_val" = x""no; then :
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
-else
-  break
-fi
-     done
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-} # ac_fn_c_find_intX_t
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-	 return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
 fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
 
-# ac_fn_c_find_uintX_t LINENO BITS VAR
-# ------------------------------------
-# Finds an unsigned integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_uintX_t ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  eval "$3=no"
-     # Order is important - never check a type that is potentially smaller
-     # than half of the expected target width.
-     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
-	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  case $ac_type in #(
-  uint$2_t) :
-    eval "$3=yes" ;; #(
-  *) :
-    eval "$3=\$ac_type" ;;
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
 esac
+rm -f conftest.make
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       eval as_val=\$$3
-   if test "x$as_val" = x""no; then :
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-else
-  break
 fi
-     done
 fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-} # ac_fn_c_find_uintX_t
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $2
-  (void) $2;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
-  eval "$3=no"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_decl
-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 corosync $as_me 1.3.0, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-_ASUNAME
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
 
+for ac_prog in groff
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GROFF+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GROFF"; then
+  ac_cv_prog_GROFF="$GROFF" # 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=.
-    $as_echo "PATH: $as_dir"
-  done
+  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_GROFF="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 IFS=$as_save_IFS
 
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+fi
+fi
+GROFF=$ac_cv_prog_GROFF
+if test -n "$GROFF"; then
+  { $as_echo "$as_me:$LINENO: result: $GROFF" >&5
+$as_echo "$GROFF" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-_ACEOF
 
+  test -n "$GROFF" && break
+done
 
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
+for ac_prog in pkg-config
 do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # 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_PKGCONFIG="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
+done
+IFS=$as_save_IFS
 
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
 
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+  test -n "$PKGCONFIG" && break
 done
-ac_signal=0
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
 
-$as_echo "/* confdefs.h */" > confdefs.h
+# Checks for libraries.
 
-# Predefined preprocessor variables.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
+{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
 _ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
 _ACEOF
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
+  LIBS="-ldl $LIBS"
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  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_pthread_pthread_create=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
+	ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
 _ACEOF
 
+  LIBS="-lpthread $LIBS"
 
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
 
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
+
+{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+/* 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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  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_socket_socket=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_socket_socket=no
 fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+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_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
 
+  LIBS="-lsocket $LIBS"
 
+fi
 
-am__api_version='1.11'
 
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
+$as_echo_n "checking for t_open in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_t_open+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $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 t_open ();
+int
+main ()
+{
+return t_open ();
+  ;
+  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_nsl_t_open=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_nsl_t_open=no
 fi
 
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+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_nsl_t_open" >&5
+$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
+if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
 
+  LIBS="-lnsl $LIBS"
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for sched_getscheduler in -lrt" >&5
+$as_echo_n "checking for sched_getscheduler in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sched_getscheduler+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-  done
-IFS=$as_save_IFS
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-rm -rf conftest.one conftest.two conftest.dir
+/* 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 sched_getscheduler ();
+int
+main ()
+{
+return sched_getscheduler ();
+  ;
+  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_rt_sched_getscheduler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_rt_sched_getscheduler=no
 fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
+
+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:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_getscheduler" >&5
+$as_echo "$ac_cv_lib_rt_sched_getscheduler" >&6; }
+if test "x$ac_cv_lib_rt_sched_getscheduler" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+  LIBS="-lrt $LIBS"
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+fi
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+# Checks for header files.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# 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
+  # Broken: fails on valid input.
+continue
+fi
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
+rm -f conftest.err conftest.$ac_ext
 
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
 else
-   as_fn_error "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+rm -f conftest.err conftest.$ac_ext
 
-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
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
 fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  ac_cv_prog_CPP=$CPP
 fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-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
+  # Broken: fails on valid input.
+continue
 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:${as_lineno-$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.
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
 else
-as_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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-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:${as_lineno-$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 "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -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
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
-  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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
-    STRIP=$ac_ct_STRIP
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
   fi
 else
-  STRIP="$ac_cv_prog_STRIP"
+  ac_cv_path_GREP=$GREP
 fi
 
 fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
+  for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
   done
-IFS=$as_save_IFS
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_EGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
 fi
 
-  test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
-  fi
+   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_header_stdc=no
 fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
+fi
 
-  test -n "$AWK" && break
-done
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
 fi
-rmdir .tst 2>/dev/null
 
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-  fi
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
-# 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
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
 
-# Define the identity of the package.
- PACKAGE='corosync'
- VERSION='1.3.0'
+fi
 
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
 
-# Some tools Automake needs.
 
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
 
 
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
 
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+	eval "$as_ac_Header=no"
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+fi
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
+done
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
 
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+			  if (p) return 0;
+  ;
+  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_working_alloca_h=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_working_alloca_h=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
 
+int
+main ()
+{
+char *p = (char *) alloca (1);
+				    if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_alloca_works=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_func_alloca_works=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
 
+if test $ac_cv_func_alloca_works = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
 
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
 
-ac_config_headers="$ac_config_headers include/corosync/config.h include/corosync/cs_config.h"
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
 
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_var=no"
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
 
+    break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
+  done
+fi
 
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+int
+main ()
+{
+  return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_stack_direction=1
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
-if test "$prefix" = "NONE"; then
-	prefix="/usr"
 
-		if test "$localstatedir" = "\${prefix}/var"; then
-		localstatedir="/var"
-	fi
-		if test "$sysconfdir" = "\${prefix}/etc"; then
-		sysconfdir="/etc"
-	fi
-		if test "$libdir" = "\${exec_prefix}/lib"; then
-		if test -e /usr/lib64; then
-			libdir="/usr/lib64"
-		else
-			libdir="/usr/lib"
-		fi
-	fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
 
-if test "$srcdir" = "."; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: building in place srcdir:$srcdir" >&5
-$as_echo "$as_me: building in place srcdir:$srcdir" >&6;}
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
 
-$as_echo "#define BUILDING_IN_PLACE 1" >>confdefs.h
 
-else
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: building out of tree srcdir:$srcdir" >&5
-$as_echo "$as_me: building out of tree srcdir:$srcdir" >&6;}
 fi
 
-# Checks for programs.
 
-# check stolen from gnulib/m4/gnu-make.m4
-if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
-	as_fn_error "you don't seem to have GNU make; it is required" "$LINENO" 5
-fi
 
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_Header=no"
 fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+/* 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 opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_opendir=$ac_res
 else
-  CC="$ac_cv_prog_CC"
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
 fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then
+  break
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_opendir=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-
-  fi
 fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+/* 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 opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  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_search_opendir=$ac_res
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then
+  break
 fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
-    test -n "$CC" && break
-  done
 fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdc=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-  test -n "$ac_ct_CC" && break
-done
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
 fi
 
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
+fi
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
 main ()
 {
-
-  ;
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
   return 0;
 }
 _ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
 else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: program exited with status $ac_status" >&5
 $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
 
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+
 fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
 int
 main ()
 {
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
   ;
   return 0;
 }
 _ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
+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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
-    fi
-  fi
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_sys_wait_h=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_sys_wait_h=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
 
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h \
+		  stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h \
+		  sys/time.h syslog.h unistd.h sys/types.h getopt.h malloc.h \
+		  sys/sockio.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-int
-main ()
-{
+	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; }
 
-  ;
-  return 0;
-}
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
+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=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
+  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
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+  ac_header_preproc=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_compiler_gnu=no
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
+done
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
 main ()
 {
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_const=yes
 else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	ac_cv_c_const=no
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
 
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define const /**/
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
+
 fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
 
+{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+rm -f conftest*
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
+cat >>confdefs.h <<\_ACEOF
+#define uid_t int
+_ACEOF
 
-ac_config_commands="$ac_config_commands depfiles"
 
+cat >>confdefs.h <<\_ACEOF
+#define gid_t int
+_ACEOF
 
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# 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
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
 fi
 
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_inline=$ac_kw
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
 
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
 fi
 
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
 
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
 
-depcc="$CC"   am_compiler_list=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  { $as_echo "$as_me:$LINENO: checking for int16_t" >&5
+$as_echo_n "checking for int16_t... " >&6; }
+if test "${ac_cv_c_int16_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  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
-    # 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
+  ac_cv_c_int16_t=no
+     for ac_type in 'int16_t' 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       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
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	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
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 1)
+		 < ($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
 
-  cd ..
-  rm -rf conftest.dir
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-  am_cv_CC_dependencies_compiler_type=none
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $ac_type in
+  int16_t) ac_cv_c_int16_t=yes ;;
+  *) ac_cv_c_int16_t=$ac_type ;;
+esac
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_int16_t" != no && break
+     done
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int16_t" >&5
+$as_echo "$ac_cv_c_int16_t" >&6; }
+  case $ac_cv_c_int16_t in #(
+  no|yes) ;; #(
+  *)
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+  esac
+
+
+  { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
+$as_echo_n "checking for int32_t... " >&6; }
+if test "${ac_cv_c_int32_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
+  ac_cv_c_int32_t=no
+     for ac_type in 'int32_t' 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-rm -f conftest.make
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
+		 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $ac_type in
+  int32_t) ac_cv_c_int32_t=yes ;;
+  *) ac_cv_c_int32_t=$ac_type ;;
+esac
+
 fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_int32_t" != no && break
+     done
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
+$as_echo "$ac_cv_c_int32_t" >&6; }
+  case $ac_cv_c_int32_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+  esac
+
+
+  { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
+$as_echo_n "checking for int64_t... " >&6; }
+if test "${ac_cv_c_int64_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  ac_cv_c_int64_t=no
+     for ac_type in 'int64_t' 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       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
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
+		 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $ac_type in
+  int64_t) ac_cv_c_int64_t=yes ;;
+  *) ac_cv_c_int64_t=$ac_type ;;
+esac
 
 fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_int64_t" != no && break
+     done
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
+$as_echo "$ac_cv_c_int64_t" >&6; }
+  case $ac_cv_c_int64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+  esac
+
+
+  { $as_echo "$as_me:$LINENO: checking for int8_t" >&5
+$as_echo_n "checking for int8_t... " >&6; }
+if test "${ac_cv_c_int8_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+  ac_cv_c_int8_t=no
+     for ac_type in 'int8_t' 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       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
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 1)
+		 < ($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $ac_type in
+  int8_t) ac_cv_c_int8_t=yes ;;
+  *) ac_cv_c_int8_t=$ac_type ;;
+esac
 
 fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_int8_t" != no && break
+     done
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int8_t" >&5
+$as_echo "$ac_cv_c_int8_t" >&6; }
+  case $ac_cv_c_int8_t in #(
+  no|yes) ;; #(
+  *)
 
-for ac_prog in groff
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GROFF+set}" = set; then :
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
+_ACEOF
+;;
+  esac
+
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GROFF"; then
-  ac_cv_prog_GROFF="$GROFF" # Let the user override the test.
+  ac_cv_type_size_t=no
+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
+int
+main ()
+{
+if (sizeof (size_t))
+       return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+	  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-as_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_GROFF="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_type_size_t=yes
 fi
-fi
-GROFF=$ac_cv_prog_GROFF
-if test -n "$GROFF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
-$as_echo "$GROFF" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+  :
+else
 
-  test -n "$GROFF" && break
-done
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
 
-for ac_prog in pkg-config
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${ac_cv_type_ssize_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$PKGCONFIG"; then
-  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+  ac_cv_type_ssize_t=no
+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
+int
+main ()
+{
+if (sizeof (ssize_t))
+       return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ssize_t)))
+	  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-as_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_PKGCONFIG="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_type_ssize_t=yes
 fi
-fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-  test -n "$PKGCONFIG" && break
-done
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+$as_echo "$ac_cv_type_ssize_t" >&6; }
+if test "x$ac_cv_type_ssize_t" = x""yes; then
+  :
+else
 
-# Checks for libraries.
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if test "${ac_cv_header_time+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
 int
 main ()
 {
-return dlopen ();
+if ((struct tm *) 0)
+return 0;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_time=yes
 else
-  ac_cv_lib_dl_dlopen=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_time=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
 
-  LIBS="-ldl $LIBS"
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+
+  { $as_echo "$as_me:$LINENO: checking for uint16_t" >&5
+$as_echo_n "checking for uint16_t... " >&6; }
+if test "${ac_cv_c_uint16_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_uint16_t=no
+     for ac_type in 'uint16_t' 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       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 pthread_create ();
+$ac_includes_default
 int
 main ()
 {
-return pthread_create ();
+static int test_array [1 - 2 * !(($ac_type) -1 >> (16 - 1) == 1)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_create=yes
+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
+  case $ac_type in
+  uint16_t) ac_cv_c_uint16_t=yes ;;
+  *) ac_cv_c_uint16_t=$ac_type ;;
+esac
+
 else
-  ac_cv_lib_pthread_pthread_create=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_uint16_t" != no && break
+     done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint16_t" >&5
+$as_echo "$ac_cv_c_uint16_t" >&6; }
+  case $ac_cv_c_uint16_t in #(
+  no|yes) ;; #(
+  *)
 
-  LIBS="-lpthread $LIBS"
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+  esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
-$as_echo_n "checking for socket in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_socket+set}" = set; then :
+
+  { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
+$as_echo_n "checking for uint32_t... " >&6; }
+if test "${ac_cv_c_uint32_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_uint32_t=no
+     for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       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 socket ();
+$ac_includes_default
 int
 main ()
 {
-return socket ();
+static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_socket=yes
+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
+  case $ac_type in
+  uint32_t) ac_cv_c_uint32_t=yes ;;
+  *) ac_cv_c_uint32_t=$ac_type ;;
+esac
+
 else
-  ac_cv_lib_socket_socket=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_uint32_t" != no && break
+     done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
-$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
+$as_echo "$ac_cv_c_uint32_t" >&6; }
+  case $ac_cv_c_uint32_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<\_ACEOF
+#define _UINT32_T 1
 _ACEOF
 
-  LIBS="-lsocket $LIBS"
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+  esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
-$as_echo_n "checking for t_open in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
+
+  { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
+$as_echo_n "checking for uint64_t... " >&6; }
+if test "${ac_cv_c_uint64_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_uint64_t=no
+     for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       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 t_open ();
+$ac_includes_default
 int
 main ()
 {
-return t_open ();
+static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_t_open=yes
+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
+  case $ac_type in
+  uint64_t) ac_cv_c_uint64_t=yes ;;
+  *) ac_cv_c_uint64_t=$ac_type ;;
+esac
+
 else
-  ac_cv_lib_nsl_t_open=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_uint64_t" != no && break
+     done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
-$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
-if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
+$as_echo "$ac_cv_c_uint64_t" >&6; }
+  case $ac_cv_c_uint64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<\_ACEOF
+#define _UINT64_T 1
 _ACEOF
 
-  LIBS="-lnsl $LIBS"
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+  esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_getscheduler in -lrt" >&5
-$as_echo_n "checking for sched_getscheduler in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_sched_getscheduler+set}" = set; then :
+
+  { $as_echo "$as_me:$LINENO: checking for uint8_t" >&5
+$as_echo_n "checking for uint8_t... " >&6; }
+if test "${ac_cv_c_uint8_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_uint8_t=no
+     for ac_type in 'uint8_t' 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       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 sched_getscheduler ();
+$ac_includes_default
 int
 main ()
 {
-return sched_getscheduler ();
+static int test_array [1 - 2 * !(($ac_type) -1 >> (8 - 1) == 1)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_sched_getscheduler=yes
+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
+  case $ac_type in
+  uint8_t) ac_cv_c_uint8_t=yes ;;
+  *) ac_cv_c_uint8_t=$ac_type ;;
+esac
+
 else
-  ac_cv_lib_rt_sched_getscheduler=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_uint8_t" != no && break
+     done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_getscheduler" >&5
-$as_echo "$ac_cv_lib_rt_sched_getscheduler" >&6; }
-if test "x$ac_cv_lib_rt_sched_getscheduler" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint8_t" >&5
+$as_echo "$ac_cv_c_uint8_t" >&6; }
+  case $ac_cv_c_uint8_t in #(
+  no|yes) ;; #(
+  *)
 
-  LIBS="-lrt $LIBS"
+cat >>confdefs.h <<\_ACEOF
+#define _UINT8_T 1
+_ACEOF
 
-fi
 
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+  esac
 
-# Checks for header files.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if test "${ac_cv_c_volatile+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
+int
+main ()
+{
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_volatile=yes
 else
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_c_volatile=no
 fi
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
 
-    done
-    ac_cv_prog_CPP=$CPP
+cat >>confdefs.h <<\_ACEOF
+#define volatile /**/
+_ACEOF
 
 fi
-  CPP=$ac_cv_prog_CPP
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:$LINENO: checking whether closedir returns void" >&5
+$as_echo_n "checking whether closedir returns void... " >&6; }
+if test "${ac_cv_func_closedir_void+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_closedir_void=yes
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
+$ac_includes_default
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
 #endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
+int
+main ()
+{
+return closedir (opendir (".")) != 0;
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_closedir_void=no
 else
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_closedir_void=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
+$as_echo "$ac_cv_func_closedir_void" >&6; }
+if test $ac_cv_func_closedir_void = yes; then
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+cat >>confdefs.h <<\_ACEOF
+#define CLOSEDIR_VOID 1
+_ACEOF
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
+  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
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
+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_error_at_line=yes
 else
-  ac_cv_path_GREP=$GREP
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_error_at_line=no
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+  case " $LIBOBJS " in
+  *" error.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS error.$ac_objext"
+ ;;
+esac
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  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 <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_mbstate_t=yes
 else
-  ac_cv_path_EGREP=$EGREP
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_mbstate_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+   if test $ac_cv_type_mbstate_t = yes; then
 
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
 
+   else
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+cat >>confdefs.h <<\_ACEOF
+#define mbstate_t int
+_ACEOF
+
+   fi
+{ $as_echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
+$as_echo_n "checking for working POSIX fnmatch... " >&6; }
+if test "${ac_cv_func_fnmatch_works+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Some versions of Solaris, SCO, and the GNU C Library
+   # have a broken or incompatible fnmatch.
+   # So we run a test program.  If we are cross-compiling, take no chance.
+   # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
+   if test "$cross_compiling" = yes; then
+  ac_cv_func_fnmatch_works=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+#include <fnmatch.h>
+#	   define y(a, b, c) (fnmatch (a, b, c) == 0)
+#	   define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
 
 int
 main ()
 {
-
+return
+	   (!(y ("a*", "abc", 0)
+	      && n ("d*/*1", "d/s/1", FNM_PATHNAME)
+	      && y ("a\\\\bc", "abc", 0)
+	      && n ("a\\\\bc", "abc", FNM_NOESCAPE)
+	      && y ("*x", ".x", 0)
+	      && n ("*x", ".x", FNM_PERIOD)
+	      && 1));
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fnmatch_works=yes
 else
-  ac_cv_header_stdc=no
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fnmatch_works=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
+$as_echo "$ac_cv_func_fnmatch_works" >&6; }
+if test $ac_cv_func_fnmatch_works = yes; then
+  rm -f "$ac_config_libobj_dir/fnmatch.h"
+else
+  { $as_echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+$as_echo_n "checking whether getenv is declared... " >&6; }
+if test "${ac_cv_have_decl_getenv+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getenv
+  (void) getenv;
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_getenv=yes
 else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_have_decl_getenv=no
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+$as_echo "$ac_cv_have_decl_getenv" >&6; }
+if test "x$ac_cv_have_decl_getenv" = x""yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+
 
 else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
 
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+
+
+
+
+
+for ac_func in btowc mbsrtowcs mempcpy wmempcpy
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
 #else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
 #endif
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
 main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
+return $ac_func ();
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  ac_cv_header_stdc=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
+
+
+
+for ac_header in wchar.h wctype.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+	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 $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 
-done
+done
+
+case " $LIBOBJS " in
+  *" fnmatch.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
+ ;;
+esac
+
+ac_config_links="$ac_config_links $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define fnmatch rpl_fnmatch
+_ACEOF
+
+
+fi
+
 
 
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
+$as_echo_n "checking for pid_t... " >&6; }
+if test "${ac_cv_type_pid_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_type_pid_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <alloca.h>
+$ac_includes_default
 int
 main ()
 {
-char *p = (char *) alloca (2 * sizeof (int));
-			  if (p) return 0;
+if (sizeof (pid_t))
+       return 0;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_working_alloca_h=yes
-else
-  ac_cv_working_alloca_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
-if test $ac_cv_working_alloca_h = yes; then
-
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  ifdef HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
+$ac_includes_default
 int
 main ()
 {
-char *p = (char *) alloca (1);
-				    if (p) return 0;
+if (sizeof ((pid_t)))
+	  return 0;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_func_alloca_works=yes
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-  ac_cv_func_alloca_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_pid_t=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
 
-if test $ac_cv_func_alloca_works = yes; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
 
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+$as_echo "$ac_cv_type_pid_t" >&6; }
+if test "x$ac_cv_type_pid_t" = x""yes; then
+  :
 else
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble.  Some versions do not even contain alloca or
-# contain a buggy version.  If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
 
-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
 
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
+fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+for ac_header in vfork.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "webecray" >/dev/null 2>&1; then :
-  ac_cv_os_cray=yes
+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
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_header_compiler=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
 _ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    break
+  ac_header_preproc=no
 fi
 
-  done
-fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_c_stack_direction=0
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-
-int
-main ()
-{
-  return find_stack_direction () < 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_stack_direction=1
-else
-  ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-
 fi
 
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+done
+
+
+
+for ac_func in fork vfork
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
-if ((DIR *) 0)
-return 0;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  eval "$as_ac_Header=no"
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-ac_header_dirent=$ac_hdr; break
-fi
-
+fi
 done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+
+if test "x$ac_cv_func_fork" = xyes; then
+  { $as_echo "$as_me:$LINENO: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if test "${ac_cv_func_fork_works+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_fork_works=cross
+else
+  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 opendir ();
+$ac_includes_default
 int
 main ()
 {
-return opendir ();
+
+	  /* By Ruediger Kuhlmann. */
+	  return fork () < 0;
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fork_works=yes
 else
-  ac_cv_search_opendir=no
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fork_works=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
 
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+  ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)
+      # Override, as these systems have only a dummy fork() stub
+      ac_cv_func_fork_works=no
+      ;;
+    *)
+      ac_cv_func_fork_works=yes
+      ;;
+  esac
+  { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+  { $as_echo "$as_me:$LINENO: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if test "${ac_cv_func_vfork_works+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_vfork_works=cross
+else
+  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.  */
+/* Thanks to Paul Eggert for this test.  */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.  The compiler
+   is told about this with #include <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+   static variable whose address is put into a register that is
+   clobbered by the vfork.  */
+static void
 #ifdef __cplusplus
-extern "C"
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
 #endif
-char opendir ();
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+
 int
 main ()
 {
-return opendir ();
-  ;
-  return 0;
+  pid_t parent = getpid ();
+  pid_t child;
+
+  sparc_address_test (0);
+
+  child = vfork ();
+
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.  This
+       test uses lots of local variables, at least as many local
+       variables as main has allocated so far including compiler
+       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+       reuse the register of parent for one of the local variables,
+       since it will think that parent can't possibly be used any more
+       in this routine.  Assigning to the local variable will thus
+       munge parent in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+	|| p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+       from child file descriptors.  If the child closes a descriptor
+       before it execs or exits, this munges the parent's descriptor
+       as well.  Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    return (
+	 /* Was there some problem with vforking?  */
+	 child < 0
+
+	 /* Did the child fail?  (This shouldn't happen.)  */
+	 || status
+
+	 /* Did the vfork/compiler bug occur?  */
+	 || parent != getpid()
+
+	 /* Did the file descriptor bug occur?  */
+	 || fstat(fileno(stdout), &st) != 0
+	 );
+  }
 }
 _ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_vfork_works=yes
 else
-  ac_cv_search_opendir=no
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_vfork_works=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
 
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+  ac_cv_func_vfork_works=$ac_cv_func_vfork
+  { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_VFORK 1
+_ACEOF
+
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
-int
-main ()
-{
+cat >>confdefs.h <<\_ACEOF
+#define vfork fork
+_ACEOF
 
-  ;
-  return 0;
-}
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_FORK 1
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
+
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test $ac_cv_c_compiler_gnu = yes; then
+    { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <string.h>
-
+#include <sgtty.h>
+Autoconf TIOCGETP
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
 else
-  ac_cv_header_stdc=no
+  ac_cv_prog_gcc_traditional=no
 fi
 rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-
+#include <termio.h>
+Autoconf TCGETA
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
 fi
 rm -f conftest*
 
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+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
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  $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 $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
 fi
+
+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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then :
+done
+
+{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
 #endif
 
 int
 main ()
 {
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+return ! malloc (0);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_sys_wait_h=yes
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_malloc_0_nonnull=yes
 else
-  ac_cv_header_sys_wait_h=no
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_malloc_0_nonnull=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
 
-$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then
 
-for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h \
-		  stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h \
-		  sys/time.h syslog.h unistd.h sys/types.h getopt.h malloc.h \
-		  sys/sockio.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 1
+_ACEOF
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 0
+_ACEOF
+
+   case " $LIBOBJS " in
+  *" malloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define malloc rpl_malloc
 _ACEOF
 
 fi
 
-done
 
 
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
+$as_echo_n "checking for working memcmp... " >&6; }
+if test "${ac_cv_func_memcmp_working+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_working=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_includes_default
 int
 main ()
 {
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = '\100', c1 = '\200', c2 = '\201';
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    return 1;
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+	char *a = foo + i;
+	char *b = bar + i;
+	strcpy (a, "--------01111111");
+	strcpy (b, "--------10000000");
+	if (memcmp (a, b, 16) >= 0)
+	  return 1;
+      }
+    return 0;
+  }
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_const=yes
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_memcmp_working=yes
 else
-  ac_cv_c_const=no
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
 
-$as_echo "#define const /**/" >>confdefs.h
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+$as_echo "$ac_cv_func_memcmp_working" >&6; }
+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if test "${ac_cv_type_uid_t+set}" = set; then :
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then :
-  ac_cv_type_uid_t=yes
+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
-  ac_cv_type_uid_t=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
 fi
-rm -f conftest*
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
 
-$as_echo "#define uid_t int" >>confdefs.h
+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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-$as_echo "#define gid_t int" >>confdefs.h
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+done
+
+{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
+$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_realloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *realloc ();
 #endif
 
+int
+main ()
+{
+return ! realloc (0, 0);
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_inline=$ac_kw
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_realloc_0_nonnull=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_realloc_0_nonnull=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
+if test $ac_cv_func_realloc_0_nonnull = yes; then
 
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 1
 _ACEOF
-    ;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
-case $ac_cv_c_int16_t in #(
-  no|yes) ;; #(
-  *)
 
-cat >>confdefs.h <<_ACEOF
-#define int16_t $ac_cv_c_int16_t
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 0
 _ACEOF
-;;
+
+   case " $LIBOBJS " in
+  *" realloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
+ ;;
 esac
 
-ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
-case $ac_cv_c_int32_t in #(
-  no|yes) ;; #(
-  *)
 
-cat >>confdefs.h <<_ACEOF
-#define int32_t $ac_cv_c_int32_t
+cat >>confdefs.h <<\_ACEOF
+#define realloc rpl_realloc
 _ACEOF
-;;
-esac
 
-ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
-case $ac_cv_c_int64_t in #(
-  no|yes) ;; #(
-  *)
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define int64_t $ac_cv_c_int64_t
-_ACEOF
-;;
-esac
 
-ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
-case $ac_cv_c_int8_t in #(
-  no|yes) ;; #(
-  *)
 
-cat >>confdefs.h <<_ACEOF
-#define int8_t $ac_cv_c_int8_t
+
+
+for ac_header in sys/select.h sys/socket.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-;;
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+	ac_header_compiler=no
+fi
 
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
 _ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
 
-ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = x""yes; then :
+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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define ssize_t int
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+done
+
+{ $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5
+$as_echo_n "checking types of arguments for select... " >&6; }
+if test "${ac_cv_func_select_args+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
+  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+$ac_includes_default
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 
 int
 main ()
 {
-if ((struct tm *) 0)
-return 0;
+extern int select ($ac_arg1,
+					    $ac_arg234, $ac_arg234, $ac_arg234,
+					    $ac_arg5);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
 else
-  ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
 fi
 
-ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
-case $ac_cv_c_uint16_t in #(
-  no|yes) ;; #(
-  *)
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+ done
+done
+# Provide a safe default value.
+: ${ac_cv_func_select_args='int,int *,struct timeval *'}
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
+$as_echo "$ac_cv_func_select_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
 
 cat >>confdefs.h <<_ACEOF
-#define uint16_t $ac_cv_c_uint16_t
+#define SELECT_TYPE_ARG1 $1
 _ACEOF
-;;
-  esac
-
-ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
-case $ac_cv_c_uint32_t in #(
-  no|yes) ;; #(
-  *)
-
-$as_echo "#define _UINT32_T 1" >>confdefs.h
 
 
 cat >>confdefs.h <<_ACEOF
-#define uint32_t $ac_cv_c_uint32_t
+#define SELECT_TYPE_ARG234 ($2)
 _ACEOF
-;;
-  esac
-
-ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
-case $ac_cv_c_uint64_t in #(
-  no|yes) ;; #(
-  *)
-
-$as_echo "#define _UINT64_T 1" >>confdefs.h
 
 
 cat >>confdefs.h <<_ACEOF
-#define uint64_t $ac_cv_c_uint64_t
+#define SELECT_TYPE_ARG5 ($3)
 _ACEOF
-;;
-  esac
-
-ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
-case $ac_cv_c_uint8_t in #(
-  no|yes) ;; #(
-  *)
-
-$as_echo "#define _UINT8_T 1" >>confdefs.h
-
 
-cat >>confdefs.h <<_ACEOF
-#define uint8_t $ac_cv_c_uint8_t
-_ACEOF
-;;
-  esac
+rm -f conftest*
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if test "${ac_cv_c_volatile+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
 
 int
 main ()
 {
-
-volatile int x;
-int * volatile y = (int *) 0;
-return !x && !y;
+return *(signal (0, 0)) (0) == 1;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_volatile=yes
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_signal=int
 else
-  ac_cv_c_volatile=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_signal=void
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
-if test $ac_cv_c_volatile = no; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
 
-$as_echo "#define volatile /**/" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
 
-fi
 
 
-# Checks for library functions.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
-$as_echo_n "checking whether closedir returns void... " >&6; }
-if test "${ac_cv_func_closedir_void+set}" = set; then :
+for ac_func in vprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_closedir_void=yes
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header_dirent>
-#ifndef __cplusplus
-int closedir ();
-#endif
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-int
-main ()
-{
-return closedir (opendir (".")) != 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_closedir_void=no
-else
-  ac_cv_func_closedir_void=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
-$as_echo "$ac_cv_func_closedir_void" >&6; }
-if test $ac_cv_func_closedir_void = yes; then
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+#undef $ac_func
 
-fi
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
-$as_echo_n "checking for error_at_line... " >&6; }
-if test "${ac_cv_lib_error_at_line+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <error.h>
 int
 main ()
 {
-error_at_line (0, 0, "", 0, "an error occurred");
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_error_at_line=yes
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  ac_cv_lib_error_at_line=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
-$as_echo "$ac_cv_lib_error_at_line" >&6; }
-if test $ac_cv_lib_error_at_line = no; then
-  case " $LIBOBJS " in
-  *" error.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS error.$ac_objext"
- ;;
-esac
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-$as_echo_n "checking for mbstate_t... " >&6; }
-if test "${ac_cv_type_mbstate_t+set}" = set; then :
+{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5
+$as_echo_n "checking for _doprnt... " >&6; }
+if test "${ac_cv_func__doprnt+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-#	    include <wchar.h>
-int
-main ()
-{
-mbstate_t x; return sizeof x;
-  ;
-  return 0;
-}
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_mbstate_t=yes
-else
-  ac_cv_type_mbstate_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-$as_echo "$ac_cv_type_mbstate_t" >&6; }
-   if test $ac_cv_type_mbstate_t = yes; then
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define _doprnt innocuous__doprnt
 
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-   else
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-$as_echo "#define mbstate_t int" >>confdefs.h
+#undef _doprnt
 
-   fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working POSIX fnmatch" >&5
-$as_echo_n "checking for working POSIX fnmatch... " >&6; }
-if test "${ac_cv_func_fnmatch_works+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  # Some versions of Solaris, SCO, and the GNU C Library
-   # have a broken or incompatible fnmatch.
-   # So we run a test program.  If we are cross-compiling, take no chance.
-   # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
-   if test "$cross_compiling" = yes; then :
-  ac_cv_func_fnmatch_works=cross
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <fnmatch.h>
-#	   define y(a, b, c) (fnmatch (a, b, c) == 0)
-#	   define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
+/* 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 _doprnt ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub__doprnt || defined __stub____doprnt
+choke me
+#endif
 
 int
 main ()
 {
-return
-	   (!(y ("a*", "abc", 0)
-	      && n ("d*/*1", "d/s/1", FNM_PATHNAME)
-	      && y ("a\\\\bc", "abc", 0)
-	      && n ("a\\\\bc", "abc", FNM_NOESCAPE)
-	      && y ("*x", ".x", 0)
-	      && n ("*x", ".x", FNM_PERIOD)
-	      && 1));
+return _doprnt ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_fnmatch_works=yes
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func__doprnt=yes
 else
-  ac_cv_func_fnmatch_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_func__doprnt=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fnmatch_works" >&5
-$as_echo "$ac_cv_func_fnmatch_works" >&6; }
-if test $ac_cv_func_fnmatch_works = yes; then :
-  rm -f "$ac_config_libobj_dir/fnmatch.h"
-else
-  ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getenv" = x""yes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+$as_echo "$ac_cv_func__doprnt" >&6; }
+if test "x$ac_cv_func__doprnt" = x""yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV $ac_have_decl
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
 _ACEOF
 
-for ac_func in btowc mbsrtowcs mempcpy wmempcpy
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
 
 fi
 done
 
-for ac_header in wchar.h wctype.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-fi
 
-done
 
-case " $LIBOBJS " in
-  *" fnmatch.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
- ;;
-esac
 
-ac_config_links="$ac_config_links $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h"
 
 
-$as_echo "#define fnmatch rpl_fnmatch" >>confdefs.h
 
 
-fi
 
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = x""yes; then :
 
-else
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
 
-fi
 
-for ac_header in vfork.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
 
-fi
 
-done
 
-for ac_func in fork vfork
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
-if test "x$ac_cv_func_fork" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if test "${ac_cv_func_fork_works+set}" = set; then :
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in alarm alphasort atexit bzero dup2 endgrent endpwent fcntl \
+		getcwd getpeerucred getpeereid gettimeofday inet_ntoa memmove \
+		memset mkdir scandir select socket strcasecmp strchr strdup \
+		strerror strrchr strspn strstr pthread_setschedparam \
+		sched_get_priority_max sched_setscheduler
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_fork_works=cross
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
-
-	  /* By Ruediger Kuhlmann. */
-	  return fork () < 0;
-
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_fork_works=yes
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  ac_cv_func_fork_works=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+done
+
+
+ac_config_files="$ac_config_files Makefile exec/Makefile include/Makefile init/Makefile lcr/Makefile lib/Makefile man/Makefile pkgconfig/Makefile services/Makefile test/Makefile tools/Makefile conf/Makefile"
 
+
+### Local business
+
+
+
+
+
+
+# ===============================================
+# Helpers
+# ===============================================
+
+## helper for CC stuff
+cc_supports_flag() {
+	local CFLAGS="$@"
+	{ $as_echo "$as_me:$LINENO: checking whether $CC supports \"$@\"" >&5
+$as_echo_n "checking whether $CC supports \"$@\"... " >&6; }
+	cat >conftest.$ac_ext <<_ACEOF
+int main(){return 0;}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  RC=0; { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_func_fork_works=$ac_cv_func_fork
-fi
-if test "x$ac_cv_func_fork_works" = xcross; then
-  case $host in
-    *-*-amigaos* | *-*-msdosdjgpp*)
-      # Override, as these systems have only a dummy fork() stub
-      ac_cv_func_fork_works=no
-      ;;
-    *)
-      ac_cv_func_fork_works=yes
-      ;;
-  esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	RC=1; { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if test "${ac_cv_func_vfork_works+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_vfork_works=cross
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Thanks to Paul Eggert for this test.  */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
-   argument registers are propagated back to the parent.  The compiler
-   is told about this with #include <vfork.h>, but some compilers
-   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
-   static variable whose address is put into a register that is
-   clobbered by the vfork.  */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
-  static pid_t child;
-  if (!child) {
-    child = vfork ();
-    if (child < 0) {
-      perror ("vfork");
-      _exit(2);
-    }
-    if (!child) {
-      arg = getpid();
-      write(-1, "", 0);
-      _exit (arg);
-    }
-  }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	return $RC
 }
 
-int
-main ()
-{
-  pid_t parent = getpid ();
-  pid_t child;
+## cleanup
+{ $as_echo "$as_me:$LINENO: Sanitizing prefix: ${prefix}" >&5
+$as_echo "$as_me: Sanitizing prefix: ${prefix}" >&6;}
+case $prefix in
+  NONE) prefix=/usr/local;;
+esac
+
+{ $as_echo "$as_me:$LINENO: Sanitizing exec_prefix: ${exec_prefix}" >&5
+$as_echo "$as_me: Sanitizing exec_prefix: ${exec_prefix}" >&6;}
+case $exec_prefix in
+    NONE)   exec_prefix=$prefix;;
+  prefix) exec_prefix=$prefix;;
+esac
+
+## local defines
+PACKAGE_FEATURES=""
+
+LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \
+	-badflag -D__gnuc_va_list=va_list -D__attribute\(x\)="
+
+# default libraries SONAME
+SOMAJOR="4"
+SOMINOR="0"
+SOMICRO="0"
+SONAME="${SOMAJOR}.${SOMINOR}.${SOMICRO}"
+
+# specific libraries SONAME
+CFG_SONAME="4.0.1"
+CONFDB_SONAME="4.1.0"
+CPG_SONAME="4.1.0"
+EVS_SONAME="4.0.0"
+PLOAD_SONAME="4.0.0"
+QUORUM_SONAME="4.0.0"
+SAM_SONAME="4.1.0"
+VOTEQUORUM_SONAME="4.0.0"
+
+# local options
+# Check whether --enable-ansi was given.
+if test "${enable_ansi+set}" = set; then
+  enableval=$enable_ansi;  default="no"
+fi
 
-  sparc_address_test (0);
 
-  child = vfork ();
+# Check whether --enable-fatal-warnings was given.
+if test "${enable_fatal_warnings+set}" = set; then
+  enableval=$enable_fatal_warnings;  default="no"
+fi
 
-  if (child == 0) {
-    /* Here is another test for sparc vfork register problems.  This
-       test uses lots of local variables, at least as many local
-       variables as main has allocated so far including compiler
-       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
-       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
-       reuse the register of parent for one of the local variables,
-       since it will think that parent can't possibly be used any more
-       in this routine.  Assigning to the local variable will thus
-       munge parent in the parent process.  */
-    pid_t
-      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
-      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
-    /* Convince the compiler that p..p7 are live; otherwise, it might
-       use the same hardware register for all 8 local variables.  */
-    if (p != p1 || p != p2 || p != p3 || p != p4
-	|| p != p5 || p != p6 || p != p7)
-      _exit(1);
 
-    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
-       from child file descriptors.  If the child closes a descriptor
-       before it execs or exits, this munges the parent's descriptor
-       as well.  Test for this by closing stdout in the child.  */
-    _exit(close(fileno(stdout)) != 0);
-  } else {
-    int status;
-    struct stat st;
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug;  default="no"
+fi
 
-    while (wait(&status) != child)
-      ;
-    return (
-	 /* Was there some problem with vforking?  */
-	 child < 0
 
-	 /* Did the child fail?  (This shouldn't happen.)  */
-	 || status
+# Check whether --enable-user-flags was given.
+if test "${enable_user_flags+set}" = set; then
+  enableval=$enable_user_flags;  default="no"
+fi
 
-	 /* Did the vfork/compiler bug occur?  */
-	 || parent != getpid()
 
-	 /* Did the file descriptor bug occur?  */
-	 || fstat(fileno(stdout), &st) != 0
-	 );
-  }
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_vfork_works=yes
-else
-  ac_cv_func_vfork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+# Check whether --enable-coverage was given.
+if test "${enable_coverage+set}" = set; then
+  enableval=$enable_coverage;  default="no"
 fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
 
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
-  ac_cv_func_vfork_works=$ac_cv_func_vfork
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+# Check whether --enable-small-memory-footprint was given.
+if test "${enable_small_memory_footprint+set}" = set; then
+  enableval=$enable_small_memory_footprint;  default="no"
 fi
 
-if test "x$ac_cv_func_vfork_works" = xyes; then
 
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+# Check whether --enable-nss was given.
+if test "${enable_nss+set}" = set; then
+  enableval=$enable_nss;
+else
+   enable_nss="yes"
+fi
+
 
+# Check whether --enable-dbus was given.
+if test "${enable_dbus+set}" = set; then
+  enableval=$enable_dbus;
 else
+   enable_dbus="no"
+fi
 
-$as_echo "#define vfork fork" >>confdefs.h
 
+# Check whether --enable-testagents was given.
+if test "${enable_testagents+set}" = set; then
+  enableval=$enable_testagents;
+else
+   default="no"
 fi
-if test "x$ac_cv_func_fork_works" = xyes; then
 
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 
+# Check whether --enable-rdma was given.
+if test "${enable_rdma+set}" = set; then
+  enableval=$enable_rdma;
+else
+   enable_rdma="no"
 fi
 
-if test $ac_cv_c_compiler_gnu = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+ if test x$enable_rdma = xyes; then
+  BUILD_RDMA_TRUE=
+  BUILD_RDMA_FALSE='#'
 else
-    ac_pattern="Autoconf.*'x'"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sgtty.h>
-Autoconf TIOCGETP
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
-  ac_cv_prog_gcc_traditional=yes
+  BUILD_RDMA_TRUE='#'
+  BUILD_RDMA_FALSE=
+fi
+
+
+
+# Check whether --with-initddir was given.
+if test "${with_initddir+set}" = set; then
+  withval=$with_initddir;  INITDDIR="$withval"
 else
-  ac_cv_prog_gcc_traditional=no
+   INITDDIR="$sysconfdir/init.d"
 fi
-rm -f conftest*
 
 
-  if test $ac_cv_prog_gcc_traditional = no; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <termio.h>
-Autoconf TCGETA
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
-  ac_cv_prog_gcc_traditional=yes
+
+# Check whether --with-lcrso-dir was given.
+if test "${with_lcrso_dir+set}" = set; then
+  withval=$with_lcrso_dir;  LCRSODIR="$withval"
+else
+   LCRSODIR="$libexecdir/lcrso"
 fi
-rm -f conftest*
 
-  fi
+
+
+# Check whether --with-socket-dir was given.
+if test "${with_socket_dir+set}" = set; then
+  withval=$with_socket_dir;  SOCKETDIR="$withval"
+else
+   SOCKETDIR="$localstatedir/run"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
-  if test $ac_cv_prog_gcc_traditional = yes; then
-    CC="$CC -traditional"
-  fi
+
+
+# Check whether --enable-snmp was given.
+if test "${enable_snmp+set}" = set; then
+  enableval=$enable_snmp;  default="no"
 fi
 
-for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
+
+# OS detection
+# THIS SECTION MUST DIE!
+CP=cp
+OS_LDL="-ldl"
+case "$host_os" in
+	*linux*)
+
+cat >>confdefs.h <<_ACEOF
+#define COROSYNC_LINUX 1
 _ACEOF
 
-fi
+		OS_CFLAGS=""
+		OS_CPPFLAGS="-D_GNU_SOURCE"
+		OS_LDFLAGS=""
+		OS_DYFLAGS="-rdynamic"
+		DARWIN_OPTS=""
+	;;
+	darwin*)
 
-done
+cat >>confdefs.h <<_ACEOF
+#define COROSYNC_DARWIN 1
+_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_malloc_0_nonnull=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
+		CP=rsync
+		OS_CFLAGS=""
+		OS_CPPFLAGS=""
+		OS_LDFLAGS=""
+		OS_DYFLAGS=""
+		DARWIN_OPTS="-dynamiclib -bind_at_load \
+			     -current_version ${SONAME} \
+			     -compatibility_version ${SONAME} -install_name \$(libdir)/\$(@)"
 
-int
-main ()
-{
-return ! malloc (0);
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define MAP_ANONYMOUS MAP_ANON
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_malloc_0_nonnull=yes
-else
-  ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
 
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define PATH_MAX 4096
+_ACEOF
 
-else
-  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
 
-   case " $LIBOBJS " in
-  *" malloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
+cat >>confdefs.h <<_ACEOF
+#define NAME_MAX 255
+_ACEOF
 
+	;;
+	*bsd*)
+
+cat >>confdefs.h <<_ACEOF
+#define COROSYNC_BSD 1
+_ACEOF
 
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define MAP_ANONYMOUS MAP_ANON
+_ACEOF
+
+		OS_CFLAGS=""
+		OS_CPPFLAGS="-I/usr/local/include"
+		OS_LDFLAGS="-L/usr/local/lib"
+		OS_DYFLAGS="-export-dynamic"
+		DARWIN_OPTS=""
+		OS_LDL=""
+		case "$host_os" in
+			*freebsd[234567]*)
+			;;
+			*freebsd*)
+
+cat >>confdefs.h <<_ACEOF
+#define COROSYNC_FREEBSD_GE_8 1
+_ACEOF
+
+			;;
+		esac
+	;;
+	*solaris*)
+
+cat >>confdefs.h <<_ACEOF
+#define COROSYNC_SOLARIS 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define TS_CLASS 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define _SEM_SEMUN_UNDEFINED 1
+_ACEOF
+
+		CP=rsync
+		OS_CFLAGS=""
+		OS_CPPFLAGS="-D_REENTRANT"
+		OS_LDFLAGS=""
+		OS_DYFLAGS="-Wl,-z,lazyload"
+		DARWIN_OPTS=""
+		SOLARIS_OPTS=" "
+	;;
+	*)
+		{ { $as_echo "$as_me:$LINENO: error: Unsupported OS? hmmmm" >&5
+$as_echo "$as_me: error: Unsupported OS? hmmmm" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
-$as_echo_n "checking for working memcmp... " >&6; }
-if test "${ac_cv_func_memcmp_working+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_memcmp_working=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
+# *FLAGS handling goes here
 
-  /* Some versions of memcmp are not 8-bit clean.  */
-  char c0 = '\100', c1 = '\200', c2 = '\201';
-  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-    return 1;
+ENV_CFLAGS="$CFLAGS"
+ENV_CPPFLAGS="$CPPFLAGS"
+ENV_LDFLAGS="$LDFLAGS"
 
-  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-     or more and with at least one buffer not starting on a 4-byte boundary.
-     William Lewis provided this test program.   */
-  {
-    char foo[21];
-    char bar[21];
-    int i;
-    for (i = 0; i < 4; i++)
-      {
-	char *a = foo + i;
-	char *b = bar + i;
-	strcpy (a, "--------01111111");
-	strcpy (b, "--------10000000");
-	if (memcmp (a, b, 16) >= 0)
-	  return 1;
-      }
-    return 0;
-  }
+# debug build stuff
+if test "x${enable_debug}" = xyes; then
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define DEBUG 1
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_memcmp_working=yes
+
+	OPT_CFLAGS="-O0"
+	PACKAGE_FEATURES="$PACKAGE_FEATURES debug"
 else
-  ac_cv_func_memcmp_working=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+	OPT_CFLAGS="-O3"
 fi
 
+# gdb flags
+if test "x${GCC}" = xyes; then
+	GDB_FLAGS="-ggdb3"
+else
+	GDB_FLAGS="-g"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-$as_echo "$ac_cv_func_memcmp_working" >&6; }
-test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-  *" memcmp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
- ;;
-esac
 
+# Look for libnss
+if test "x${enable_nss}" = xyes; then
 
-for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
 
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
-$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
-if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_realloc_0_nonnull=no
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *realloc ();
-#endif
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-int
-main ()
-{
-return ! realloc (0, 0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_realloc_0_nonnull=yes
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
 else
-  ac_cv_func_realloc_0_nonnull=no
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
 fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+		PKG_CONFIG=""
+	fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
-if test $ac_cv_func_realloc_0_nonnull = yes; then :
 
-$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for nss" >&5
+$as_echo_n "checking for nss... " >&6; }
 
+if test -n "$nss_CFLAGS"; then
+    pkg_cv_nss_CFLAGS="$nss_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null`
 else
-  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
-
-   case " $LIBOBJS " in
-  *" realloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define realloc rpl_realloc" >>confdefs.h
-
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$nss_LIBS"; then
+    pkg_cv_nss_LIBS="$nss_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
-for ac_header in sys/select.h sys/socket.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
 
-done
+if test $pkg_failed = yes; then
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
-$as_echo_n "checking types of arguments for select... " >&6; }
-if test "${ac_cv_func_select_args+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
- for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
-  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-
-int
-main ()
-{
-extern int select ($ac_arg1,
-					    $ac_arg234, $ac_arg234, $ac_arg234,
-					    $ac_arg5);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+        _pkg_short_errors_supported=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
- done
-done
-# Provide a safe default value.
-: ${ac_cv_func_select_args='int,int *,struct timeval *'}
+        if test $_pkg_short_errors_supported = yes; then
+	        nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss" 2>&1`
+        else
+	        nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$nss_PKG_ERRORS" >&5
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
-$as_echo "$ac_cv_func_select_args" >&6; }
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
+	{ { $as_echo "$as_me:$LINENO: error: Package requirements (nss) were not met:
 
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG1 $1
-_ACEOF
+$nss_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG234 ($2)
-_ACEOF
+Alternatively, you may set the environment variables nss_CFLAGS
+and nss_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+$as_echo "$as_me: error: Package requirements (nss) were not met:
 
+$nss_PKG_ERRORS
 
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG5 ($3)
-_ACEOF
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-rm -f conftest*
+Alternatively, you may set the environment variables nss_CFLAGS
+and nss_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
+Alternatively, you may set the environment variables nss_CFLAGS
+and nss_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables nss_CFLAGS
+and nss_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 else
-  ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	nss_CFLAGS=$pkg_cv_nss_CFLAGS
+	nss_LIBS=$pkg_cv_nss_LIBS
+        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	:
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
 
 cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
+#define HAVE_LIBNSS 1
 _ACEOF
 
+	PACKAGE_FEATURES="$PACKAGE_FEATURES nss"
+fi
 
-for ac_func in vprintf
-do :
-  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
-
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = x""yes; then :
+# Look for dbus-1
+if test "x${enable_dbus}" = xyes; then
 
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for DBUS" >&5
+$as_echo_n "checking for DBUS... " >&6; }
 
+if test -n "$DBUS_CFLAGS"; then
+    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
+else
+  pkg_failed=yes
 fi
-
+ else
+    pkg_failed=untried
+fi
+if test -n "$DBUS_LIBS"; then
+    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
-done
 
 
-for ac_func in alarm alphasort atexit bzero dup2 endgrent endpwent fcntl \
-		getcwd getpeerucred getpeereid gettimeofday inet_ntoa memmove \
-		memset mkdir scandir select socket strcasecmp strchr strdup \
-		strerror strrchr strspn strstr pthread_spin_lock \
-		pthread_spin_unlock pthread_setschedparam \
-		sched_get_priority_max sched_setscheduler
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
-done
+        if test $_pkg_short_errors_supported = yes; then
+	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1`
+        else
+	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DBUS_PKG_ERRORS" >&5
 
+	{ { $as_echo "$as_me:$LINENO: error: Package requirements (dbus-1) were not met:
 
-ac_config_files="$ac_config_files Makefile exec/Makefile include/Makefile init/Makefile lcr/Makefile lib/Makefile man/Makefile pkgconfig/Makefile services/Makefile test/Makefile tools/Makefile"
+$DBUS_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-### Local business
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+$as_echo "$as_me: error: Package requirements (dbus-1) were not met:
 
+$DBUS_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-# ===============================================
-# Helpers
-# ===============================================
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-## helper for CC stuff
-cc_supports_flag() {
-	local CFLAGS="$@"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports \"$@\"" >&5
-$as_echo_n "checking whether $CC supports \"$@\"... " >&6; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(){return 0;}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  RC=0; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 else
-  RC=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
+	DBUS_LIBS=$pkg_cv_DBUS_LIBS
+        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	:
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	return $RC
-}
 
-## cleanup
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Sanitizing prefix: ${prefix}" >&5
-$as_echo "$as_me: Sanitizing prefix: ${prefix}" >&6;}
-case $prefix in
-  NONE) prefix=/usr/local;;
-esac
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DBUS 1
+_ACEOF
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Sanitizing exec_prefix: ${exec_prefix}" >&5
-$as_echo "$as_me: Sanitizing exec_prefix: ${exec_prefix}" >&6;}
-case $exec_prefix in
-    NONE)   exec_prefix=$prefix;;
-  prefix) exec_prefix=$prefix;;
-esac
+	PACKAGE_FEATURES="$PACKAGE_FEATURES dbus"
+fi
 
-## local defines
-PACKAGE_FEATURES=""
+if test "x${enable_testagents}" = xyes; then
 
-LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \
-	-badflag -D__gnuc_va_list=va_list -D__attribute\(x\)="
+cat >>confdefs.h <<_ACEOF
+#define HAVE_TESTAGENTS 1
+_ACEOF
 
-# default libraries SONAME
-SOMAJOR="4"
-SOMINOR="0"
-SOMICRO="0"
-SONAME="${SOMAJOR}.${SOMINOR}.${SOMICRO}"
+	PACKAGE_FEATURES="$PACKAGE_FEATURES testagents"
+fi
 
-# specific libraries SONAME
-CFG_SONAME="4.0.0"
-CONFDB_SONAME="4.1.0"
-CPG_SONAME="4.1.0"
-EVS_SONAME="4.0.0"
-PLOAD_SONAME="4.0.0"
-QUORUM_SONAME="4.0.0"
-SAM_SONAME="4.1.0"
-VOTEQUORUM_SONAME="4.0.0"
+if test "x${enable_rdma}" = xyes; then
 
-# local options
-# Check whether --enable-ansi was given.
-if test "${enable_ansi+set}" = set; then :
-  enableval=$enable_ansi;  default="no"
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for rdmacm" >&5
+$as_echo_n "checking for rdmacm... " >&6; }
+
+if test -n "$rdmacm_CFLAGS"; then
+    pkg_cv_rdmacm_CFLAGS="$rdmacm_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rdmacm\"") >&5
+  ($PKG_CONFIG --exists --print-errors "rdmacm") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_rdmacm_CFLAGS=`$PKG_CONFIG --cflags "rdmacm" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$rdmacm_LIBS"; then
+    pkg_cv_rdmacm_LIBS="$rdmacm_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rdmacm\"") >&5
+  ($PKG_CONFIG --exists --print-errors "rdmacm") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_rdmacm_LIBS=`$PKG_CONFIG --libs "rdmacm" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
-# Check whether --enable-fatal-warnings was given.
-if test "${enable_fatal_warnings+set}" = set; then :
-  enableval=$enable_fatal_warnings;  default="no"
-fi
 
+if test $pkg_failed = yes; then
 
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug;  default="no"
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        rdmacm_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rdmacm" 2>&1`
+        else
+	        rdmacm_PKG_ERRORS=`$PKG_CONFIG --print-errors "rdmacm" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$rdmacm_PKG_ERRORS" >&5
 
+	{ { $as_echo "$as_me:$LINENO: error: Package requirements (rdmacm) were not met:
 
-# Check whether --enable-user-flags was given.
-if test "${enable_user_flags+set}" = set; then :
-  enableval=$enable_user_flags;  default="no"
-fi
+$rdmacm_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables rdmacm_CFLAGS
+and rdmacm_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+$as_echo "$as_me: error: Package requirements (rdmacm) were not met:
 
-# Check whether --enable-coverage was given.
-if test "${enable_coverage+set}" = set; then :
-  enableval=$enable_coverage;  default="no"
-fi
+$rdmacm_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-# Check whether --enable-small-memory-footprint was given.
-if test "${enable_small_memory_footprint+set}" = set; then :
-  enableval=$enable_small_memory_footprint;  default="no"
-fi
+Alternatively, you may set the environment variables rdmacm_CFLAGS
+and rdmacm_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables rdmacm_CFLAGS
+and rdmacm_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-# Check whether --enable-nss was given.
-if test "${enable_nss+set}" = set; then :
-  enableval=$enable_nss;
+Alternatively, you may set the environment variables rdmacm_CFLAGS
+and rdmacm_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 else
-   enable_nss="yes"
+	rdmacm_CFLAGS=$pkg_cv_rdmacm_CFLAGS
+	rdmacm_LIBS=$pkg_cv_rdmacm_LIBS
+        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	:
 fi
 
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for ibverbs" >&5
+$as_echo_n "checking for ibverbs... " >&6; }
 
-# Check whether --enable-rdma was given.
-if test "${enable_rdma+set}" = set; then :
-  enableval=$enable_rdma;
+if test -n "$ibverbs_CFLAGS"; then
+    pkg_cv_ibverbs_CFLAGS="$ibverbs_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ibverbs\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ibverbs") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_ibverbs_CFLAGS=`$PKG_CONFIG --cflags "ibverbs" 2>/dev/null`
 else
-   enable_rdma="no"
+  pkg_failed=yes
 fi
-
- if test x$enable_rdma = xyes; then
-  BUILD_RDMA_TRUE=
-  BUILD_RDMA_FALSE='#'
-else
-  BUILD_RDMA_TRUE='#'
-  BUILD_RDMA_FALSE=
+ else
+    pkg_failed=untried
 fi
-
-
-
-# Check whether --with-initddir was given.
-if test "${with_initddir+set}" = set; then :
-  withval=$with_initddir;  INITDDIR="$withval"
+if test -n "$ibverbs_LIBS"; then
+    pkg_cv_ibverbs_LIBS="$ibverbs_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ibverbs\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ibverbs") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_ibverbs_LIBS=`$PKG_CONFIG --libs "ibverbs" 2>/dev/null`
 else
-   INITDDIR="$sysconfdir/init.d"
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
 
-# Check whether --with-lcrso-dir was given.
-if test "${with_lcrso_dir+set}" = set; then :
-  withval=$with_lcrso_dir;  LCRSODIR="$withval"
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-   LCRSODIR="$libexecdir/lcrso"
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        ibverbs_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibverbs" 2>&1`
+        else
+	        ibverbs_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibverbs" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$ibverbs_PKG_ERRORS" >&5
 
+	{ { $as_echo "$as_me:$LINENO: error: Package requirements (ibverbs) were not met:
 
+$ibverbs_PKG_ERRORS
 
-# Check whether --with-socket-dir was given.
-if test "${with_socket_dir+set}" = set; then :
-  withval=$with_socket_dir;  SOCKETDIR="$withval"
-else
-   SOCKETDIR="$localstatedir/run"
-fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables ibverbs_CFLAGS
+and ibverbs_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+$as_echo "$as_me: error: Package requirements (ibverbs) were not met:
 
-# OS detection
-# THIS SECTION MUST DIE!
-CP=cp
-OS_LDL="-ldl"
-case "$host_os" in
-	*linux*)
+$ibverbs_PKG_ERRORS
 
-cat >>confdefs.h <<_ACEOF
-#define COROSYNC_LINUX 1
-_ACEOF
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-		OS_CFLAGS=""
-		OS_CPPFLAGS="-D_GNU_SOURCE"
-		OS_LDFLAGS=""
-		OS_DYFLAGS="-rdynamic"
-		DARWIN_OPTS=""
-	;;
-	darwin*)
+Alternatively, you may set the environment variables ibverbs_CFLAGS
+and ibverbs_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-cat >>confdefs.h <<_ACEOF
-#define COROSYNC_DARWIN 1
-_ACEOF
+Alternatively, you may set the environment variables ibverbs_CFLAGS
+and ibverbs_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-		CP=rsync
-		OS_CFLAGS=""
-		OS_CPPFLAGS=""
-		OS_LDFLAGS=""
-		OS_DYFLAGS=""
-		DARWIN_OPTS="-dynamiclib -bind_at_load \
-			     -current_version ${SONAME} \
-			     -compatibility_version ${SONAME} -install_name \$(libdir)/\$(@)"
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-cat >>confdefs.h <<_ACEOF
-#define MAP_ANONYMOUS MAP_ANON
-_ACEOF
+Alternatively, you may set the environment variables ibverbs_CFLAGS
+and ibverbs_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+else
+	ibverbs_CFLAGS=$pkg_cv_ibverbs_CFLAGS
+	ibverbs_LIBS=$pkg_cv_ibverbs_LIBS
+        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	:
+fi
 
 cat >>confdefs.h <<_ACEOF
-#define PATH_MAX 4096
+#define HAVE_RDMA 1
 _ACEOF
 
+	PACKAGE_FEATURES="$PACKAGE_FEATURES rdma"
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define NAME_MAX 255
-_ACEOF
-
-	;;
-	*bsd*)
+if test "x${enable_monitoring}" = xyes; then
 
-cat >>confdefs.h <<_ACEOF
-#define COROSYNC_BSD 1
+	{ $as_echo "$as_me:$LINENO: checking for sg_get_mem_stats in -lstatgrab" >&5
+$as_echo_n "checking for sg_get_mem_stats in -lstatgrab... " >&6; }
+if test "${ac_cv_lib_statgrab_sg_get_mem_stats+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lstatgrab  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-
-cat >>confdefs.h <<_ACEOF
-#define MAP_ANONYMOUS MAP_ANON
+/* 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 sg_get_mem_stats ();
+int
+main ()
+{
+return sg_get_mem_stats ();
+  ;
+  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_statgrab_sg_get_mem_stats=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-		OS_CFLAGS=""
-		OS_CPPFLAGS="-I/usr/local/include"
-		OS_LDFLAGS="-L/usr/local/lib"
-		OS_DYFLAGS="-export-dynamic"
-		DARWIN_OPTS=""
-		OS_LDL=""
-		case "$host_os" in
-			*freebsd[234567]*)
-			;;
-			*freebsd*)
+	ac_cv_lib_statgrab_sg_get_mem_stats=no
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define COROSYNC_FREEBSD_GE_8 1
-_ACEOF
+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_statgrab_sg_get_mem_stats" >&5
+$as_echo "$ac_cv_lib_statgrab_sg_get_mem_stats" >&6; }
+if test "x$ac_cv_lib_statgrab_sg_get_mem_stats" = x""yes; then
+  have_libstatgrab="yes"
+else
+  have_libstatgrab="no"
+fi
 
-			;;
-		esac
-	;;
-	*solaris*)
+
+	if test "x${have_libstatgrab}" = xyes; then
 
 cat >>confdefs.h <<_ACEOF
-#define COROSYNC_SOLARIS 1
+#define HAVE_LIBSTATGRAB 1
 _ACEOF
 
+		statgrab_LIBS="-lstatgrab"
+	else
+		if test "x${have_linux}" = xno; then
+			{ { $as_echo "$as_me:$LINENO: error: monitoring requires libstatgrab on non-linux systems" >&5
+$as_echo "$as_me: error: monitoring requires libstatgrab on non-linux systems" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
 
 cat >>confdefs.h <<_ACEOF
-#define TS_CLASS 1
+#define HAVE_MONITORING 1
 _ACEOF
 
+	PACKAGE_FEATURES="$PACKAGE_FEATURES monitoring"
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define _SEM_SEMUN_UNDEFINED 1
+if test "x${enable_watchdog}" = xyes; then
+	if test "${ac_cv_header_linux_watchdog_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for linux/watchdog.h" >&5
+$as_echo_n "checking for linux/watchdog.h... " >&6; }
+if test "${ac_cv_header_linux_watchdog_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_watchdog_h" >&5
+$as_echo "$ac_cv_header_linux_watchdog_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking linux/watchdog.h usability" >&5
+$as_echo_n "checking linux/watchdog.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-
-		CP=rsync
-		OS_CFLAGS=""
-		OS_CPPFLAGS="-D_REENTRANT"
-		OS_LDFLAGS=""
-		OS_DYFLAGS="-Wl,-z,lazyload"
-		DARWIN_OPTS=""
-		SOLARIS_OPTS=" "
-	;;
-	*)
-		as_fn_error "Unsupported OS? hmmmm" "$LINENO" 5
-	;;
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <linux/watchdog.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
 
-# *FLAGS handling goes here
-
-ENV_CFLAGS="$CFLAGS"
-ENV_CPPFLAGS="$CPPFLAGS"
-ENV_LDFLAGS="$LDFLAGS"
-
-# debug build stuff
-if test "x${enable_debug}" = xyes; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define DEBUG 1
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking linux/watchdog.h presence" >&5
+$as_echo_n "checking linux/watchdog.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 <linux/watchdog.h>
 _ACEOF
-
-	OPT_CFLAGS="-O0"
-	PACKAGE_FEATURES="$PACKAGE_FEATURES debug"
+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
-	OPT_CFLAGS="-O3"
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# gdb flags
-if test "x${GCC}" = xyes; then
-	GDB_FLAGS="-ggdb3"
-else
-	GDB_FLAGS="-g"
+  ac_header_preproc=no
 fi
 
-# Look for libnss
-if test "x${enable_nss}" = xyes; then
-
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+# 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: linux/watchdog.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/watchdog.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: linux/watchdog.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for linux/watchdog.h" >&5
+$as_echo_n "checking for linux/watchdog.h... " >&6; }
+if test "${ac_cv_header_linux_watchdog_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  ac_cv_header_linux_watchdog_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_watchdog_h" >&5
+$as_echo "$ac_cv_header_linux_watchdog_h" >&6; }
 
-  ;;
-esac
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+if test "x$ac_cv_header_linux_watchdog_h" = x""yes; then
+  :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { { $as_echo "$as_me:$LINENO: error: watchdog requires linux/watchdog.h" >&5
+$as_echo "$as_me: error: watchdog requires linux/watchdog.h" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+	if test "${ac_cv_header_linux_reboot_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for linux/reboot.h" >&5
+$as_echo_n "checking for linux/reboot.h... " >&6; }
+if test "${ac_cv_header_linux_reboot_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_reboot_h" >&5
+$as_echo "$ac_cv_header_linux_reboot_h" >&6; }
 else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking linux/reboot.h usability" >&5
+$as_echo_n "checking linux/reboot.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 <linux/reboot.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
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+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:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
 fi
 
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+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 linux/reboot.h presence" >&5
+$as_echo_n "checking linux/reboot.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 <linux/reboot.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
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
+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
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss" >&5
-$as_echo_n "checking for nss... " >&6; }
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-if test -n "$nss_CFLAGS"; then
-    pkg_cv_nss_CFLAGS="$nss_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null`
+# 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: linux/reboot.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: linux/reboot.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: linux/reboot.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for linux/reboot.h" >&5
+$as_echo_n "checking for linux/reboot.h... " >&6; }
+if test "${ac_cv_header_linux_reboot_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
+  ac_cv_header_linux_reboot_h=$ac_header_preproc
 fi
- else
-    pkg_failed=untried
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_reboot_h" >&5
+$as_echo "$ac_cv_header_linux_reboot_h" >&6; }
+
 fi
-if test -n "$nss_LIBS"; then
-    pkg_cv_nss_LIBS="$nss_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null`
+if test "x$ac_cv_header_linux_reboot_h" = x""yes; then
+  :
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  { { $as_echo "$as_me:$LINENO: error: watchdog requires linux/reboot.h" >&5
+$as_echo "$as_me: error: watchdog requires linux/reboot.h" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 
 
-if test $pkg_failed = yes; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WATCHDOG 1
+_ACEOF
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+	PACKAGE_FEATURES="$PACKAGE_FEATURES watchdog"
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss" 2>&1`
-        else
-	        nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$nss_PKG_ERRORS" >&5
 
-	as_fn_error "Package requirements (nss) were not met:
+if test "x${enable_augeas}" = xyes; then
+	PACKAGE_FEATURES="$PACKAGE_FEATURES augeas"
+fi
 
-$nss_PKG_ERRORS
+if test "x${enable_snmp}" = xyes; then
+       SNMPCONFIG=""
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+for ac_header in net-snmp/net-snmp-config.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-Alternatively, you may set the environment variables nss_CFLAGS
-and nss_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+	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 $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-Alternatively, you may set the environment variables nss_CFLAGS
-and nss_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+  ac_header_preproc=no
+fi
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+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: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------- ##
+## Report this to openais at lists.osdl.org ##
+## ------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-	nss_CFLAGS=$pkg_cv_nss_CFLAGS
-	nss_LIBS=$pkg_cv_nss_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	:
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSS 1
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-	PACKAGE_FEATURES="$PACKAGE_FEATURES nss"
 fi
 
-if test "x${enable_rdma}" = xyes; then
+done
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdmacm" >&5
-$as_echo_n "checking for rdmacm... " >&6; }
 
-if test -n "$rdmacm_CFLAGS"; then
-    pkg_cv_rdmacm_CFLAGS="$rdmacm_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rdmacm\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "rdmacm") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_rdmacm_CFLAGS=`$PKG_CONFIG --cflags "rdmacm" 2>/dev/null`
+       if test "x${ac_cv_header_net_snmp_net_snmp_config_h}" != "xyes"; then
+               enable_snmp=no
+       fi
+
+       if test $enable_snmp != no; then
+               for ac_prog in net-snmp-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SNMPCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  case $SNMPCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SNMPCONFIG="$SNMPCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SNMPCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
-if test -n "$rdmacm_LIBS"; then
-    pkg_cv_rdmacm_LIBS="$rdmacm_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rdmacm\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "rdmacm") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_rdmacm_LIBS=`$PKG_CONFIG --libs "rdmacm" 2>/dev/null`
+SNMPCONFIG=$ac_cv_path_SNMPCONFIG
+if test -n "$SNMPCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $SNMPCONFIG" >&5
+$as_echo "$SNMPCONFIG" >&6; }
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+  test -n "$SNMPCONFIG" && break
+done
 
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+               if test "X${SNMPCONFIG}" = "X"; then
+                       { $as_echo "$as_me:$LINENO: result: You need the net_snmp development package to continue." >&5
+$as_echo "You need the net_snmp development package to continue." >&6; }
+                       enable_snmp=no
+               fi
+       fi
+
+       if test $enable_snmp != no; then
+               { $as_echo "$as_me:$LINENO: checking for special snmp libraries" >&5
+$as_echo_n "checking for special snmp libraries... " >&6; }
+               SNMPLIBS=`$SNMPCONFIG --libs`
+               { $as_echo "$as_me:$LINENO: result: $SNMPLIBS" >&5
+$as_echo "$SNMPLIBS" >&6; }
+       fi
+
+       if test $enable_snmp != no; then
+               savedLibs=$LIBS
+               LIBS="$LIBS $SNMPLIBS"
+
+for ac_func in netsnmp_transport_open_client
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        rdmacm_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rdmacm" 2>&1`
-        else
-	        rdmacm_PKG_ERRORS=`$PKG_CONFIG --print-errors "rdmacm" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$rdmacm_PKG_ERRORS" >&5
-
-	as_fn_error "Package requirements (rdmacm) were not met:
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-$rdmacm_PKG_ERRORS
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-Alternatively, you may set the environment variables rdmacm_CFLAGS
-and rdmacm_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+#undef $ac_func
 
-Alternatively, you may set the environment variables rdmacm_CFLAGS
-and rdmacm_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-	rdmacm_CFLAGS=$pkg_cv_rdmacm_CFLAGS
-	rdmacm_LIBS=$pkg_cv_rdmacm_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	:
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibverbs" >&5
-$as_echo_n "checking for ibverbs... " >&6; }
+	eval "$as_ac_var=no"
+fi
 
-if test -n "$ibverbs_CFLAGS"; then
-    pkg_cv_ibverbs_CFLAGS="$ibverbs_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibverbs\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ibverbs") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ibverbs_CFLAGS=`$PKG_CONFIG --cflags "ibverbs" 2>/dev/null`
-else
-  pkg_failed=yes
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
- else
-    pkg_failed=untried
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
 fi
-if test -n "$ibverbs_LIBS"; then
-    pkg_cv_ibverbs_LIBS="$ibverbs_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibverbs\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ibverbs") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ibverbs_LIBS=`$PKG_CONFIG --libs "ibverbs" 2>/dev/null`
+done
+
+               if test $ac_cv_func_netsnmp_transport_open_client != yes; then
+
+for ac_func in netsnmp_tdomain_transport
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-if test $pkg_failed = yes; then
+#undef $ac_func
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-        _pkg_short_errors_supported=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        ibverbs_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibverbs" 2>&1`
-        else
-	        ibverbs_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibverbs" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$ibverbs_PKG_ERRORS" >&5
 
-	as_fn_error "Package requirements (ibverbs) were not met:
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-$ibverbs_PKG_ERRORS
+fi
+done
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+                       if test $ac_cv_func_netsnmp_tdomain_transport != yes; then
+                               enable_snmp=no
+                       fi
+               else
 
-Alternatively, you may set the environment variables ibverbs_CFLAGS
-and ibverbs_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+cat >>confdefs.h <<_ACEOF
+#define NETSNMPV54 $NETSNMP_NEW_SUPPORT
+_ACEOF
+
+               fi
+               LIBS=$savedLibs
+       fi
+
+       { $as_echo "$as_me:$LINENO: checking for snmp" >&5
+$as_echo_n "checking for snmp... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_snmp" >&5
+$as_echo "$enable_snmp" >&6; }
+   if test $enable_snmp = no; then
+               enable_snmp=0
+               { { $as_echo "$as_me:$LINENO: error: Unable to support SNMP" >&5
+$as_echo "$as_me: error: Unable to support SNMP" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+               enable_snmp=1
+               PACKAGE_FEATURES="$PACKAGE_FEATURES snmp"
 
-Alternatively, you may set the environment variables ibverbs_CFLAGS
-and ibverbs_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_SNMP $enable_snmp
+_ACEOF
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+   fi
 else
-	ibverbs_CFLAGS=$pkg_cv_ibverbs_CFLAGS
-	ibverbs_LIBS=$pkg_cv_ibverbs_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	:
+       enable_snmp=0
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RDMA 1
-_ACEOF
 
-	PACKAGE_FEATURES="$PACKAGE_FEATURES rdma"
+ if test "${enable_snmp}" = "1"; then
+  BUILD_SNMP_TRUE=
+  BUILD_SNMP_FALSE='#'
+else
+  BUILD_SNMP_TRUE='#'
+  BUILD_SNMP_FALSE=
 fi
 
+
 # extra warnings
 EXTRA_WARNINGS=""
 
@@ -7279,7 +11719,7 @@ done
 if test "x${enable_coverage}" = xyes && \
 		cc_supports_flag -ftest-coverage && \
 		cc_supports_flag -fprofile-arcs ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Enabling Coverage (enable -O0 by default)" >&5
+	{ $as_echo "$as_me:$LINENO: Enabling Coverage (enable -O0 by default)" >&5
 $as_echo "$as_me: Enabling Coverage (enable -O0 by default)" >&6;}
 	OPT_CFLAGS="-O0"
 	COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
@@ -7302,7 +11742,7 @@ fi
 
 if test "x${enable_ansi}" = xyes && \
 		cc_supports_flag -std=iso9899:199409 ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Enabling ANSI Compatibility" >&5
+	{ $as_echo "$as_me:$LINENO: Enabling ANSI Compatibility" >&5
 $as_echo "$as_me: Enabling ANSI Compatibility" >&6;}
 	ANSI_CPPFLAGS="-ansi -D_GNU_SOURCE -DANSI_ONLY"
 	PACKAGE_FEATURES="$PACKAGE_FEATURES ansi"
@@ -7312,7 +11752,7 @@ fi
 
 if test "x${enable_fatal_warnings}" = xyes && \
 		cc_supports_flag -Werror ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Enabling Fatal Warnings (-Werror)" >&5
+	{ $as_echo "$as_me:$LINENO: Enabling Fatal Warnings (-Werror)" >&5
 $as_echo "$as_me: Enabling Fatal Warnings (-Werror)" >&6;}
 	WERROR_CFLAGS="-Werror"
 	PACKAGE_FEATURES="$PACKAGE_FEATURES fatal-warnings"
@@ -7346,6 +11786,21 @@ LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
 
 
 
+ if test "${enable_snmp}" = "1"; then
+  INSTALL_MIB_TRUE=
+  INSTALL_MIB_FALSE='#'
+else
+  INSTALL_MIB_TRUE='#'
+  INSTALL_MIB_FALSE=
+fi
+
+ if test "${enable_dbus}" = "1"; then
+  INSTALL_DBUSCONF_TRUE=
+  INSTALL_DBUSCONF_FALSE='#'
+else
+  INSTALL_DBUSCONF_TRUE='#'
+  INSTALL_DBUSCONF_FALSE=
+fi
 
 
 
@@ -7436,13 +11891,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
+      *) $as_unset $ac_var ;;
       esac ;;
     esac
   done
@@ -7450,8 +11905,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -7474,11 +11929,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
@@ -7498,8 +11953,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -7515,38 +11970,76 @@ else
 fi
 
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 if test -z "${BUILD_RDMA_TRUE}" && test -z "${BUILD_RDMA_FALSE}"; then
-  as_fn_error "conditional \"BUILD_RDMA\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_RDMA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_RDMA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_SNMP_TRUE}" && test -z "${BUILD_SNMP_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_SNMP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_SNMP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${INSTALL_MIB_TRUE}" && test -z "${INSTALL_MIB_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_MIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"INSTALL_MIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${INSTALL_DBUSCONF_TRUE}" && test -z "${INSTALL_DBUSCONF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_DBUSCONF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"INSTALL_DBUSCONF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 if test -z "${BUILD_DARWIN_TRUE}" && test -z "${BUILD_DARWIN_FALSE}"; then
-  as_fn_error "conditional \"BUILD_DARWIN\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_DARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_DARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 if test -z "${BUILD_SOLARIS_TRUE}" && test -z "${BUILD_SOLARIS_FALSE}"; then
-  as_fn_error "conditional \"BUILD_SOLARIS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_SOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_SOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 if test -z "${BUILD_HTML_DOCS_TRUE}" && test -z "${BUILD_HTML_DOCS_FALSE}"; then
-  as_fn_error "conditional \"BUILD_HTML_DOCS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_HTML_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_HTML_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -7556,18 +12049,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-
 SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -7575,15 +12067,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
 esac
+
 fi
 
 
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
 as_nl='
 '
 export as_nl
@@ -7591,13 +12091,7 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -7608,7 +12102,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in #(
+      case $arg in
       *"$as_nl"*)
 	expr "X$arg" : "X\\(.*\\)$as_nl";
 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -7631,6 +12125,13 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -7640,15 +12141,15 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
+case $0 in
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 IFS=$as_save_IFS
 
      ;;
@@ -7660,16 +12161,12 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
+  { (exit 1); exit 1; }
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
 done
 PS1='$ '
 PS2='> '
@@ -7681,89 +12178,7 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
+# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -7777,12 +12192,8 @@ else
   as_basename=false
 fi
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
 
+# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
@@ -7802,25 +12213,76 @@ $as_echo X/"$0" |
 	  }
 	  s/.*/./; q'`
 
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
+case `echo -n x` in
 -n*)
-  case `echo 'xy\c'` in
+  case `echo 'x\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
+  *)   ECHO_C='\c';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
@@ -7849,56 +12311,8 @@ fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
+  as_mkdir_p=:
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
@@ -7917,10 +12331,10 @@ else
       if test -d "$1"; then
 	test -d "$1/.";
       else
-	case $1 in #(
+	case $1 in
 	-*)set "./$1";;
 	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
 	???[sx]*):;;*)false;;esac;fi
     '\'' sh
   '
@@ -7935,19 +12349,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by corosync $as_me 1.3.0, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by corosync $as_me 1.4.1, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -7980,15 +12388,13 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
+\`$as_me' instantiates files from templates according to the
+current configuration.
 
-Usage: $0 [OPTION]... [TAG]...
+Usage: $0 [OPTION]... [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
   -q, --quiet, --silent
                    do not print progress messages
   -d, --debug      don't remove temporary files
@@ -8010,17 +12416,16 @@ $config_links
 Configuration commands:
 $config_commands
 
-Report bugs to <openais at lists.osdl.org>."
+Report bugs to <bug-autoconf at gnu.org>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-corosync config.status 1.3.0
-configured by $0, generated by GNU Autoconf 2.65,
-  with options \\"\$ac_cs_config\\"
+corosync config.status 1.4.1
+configured by $0, generated by GNU Autoconf 2.63,
+  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -8056,8 +12461,6 @@ do
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
@@ -8065,19 +12468,20 @@ do
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
+    { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -8085,10 +12489,11 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+  -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
 
-  *) as_fn_append ac_config_targets " $1"
+  *) ac_config_targets="$ac_config_targets $1"
      ac_need_defaults=false ;;
 
   esac
@@ -8154,8 +12559,11 @@ do
     "services/Makefile") CONFIG_FILES="$CONFIG_FILES services/Makefile" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
     "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+    "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
   esac
 done
 
@@ -8183,7 +12591,7 @@ $debug ||
   trap 'exit_status=$?
   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
 ' 0
-  trap 'as_fn_exit 1' 1 2 13 15
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
 # Create a (secure) tmp directory for tmp files.
 
@@ -8194,7 +12602,11 @@ $debug ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} ||
+{
+   $as_echo "$as_me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -8202,16 +12614,10 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
+ac_cr='
'
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -8225,18 +12631,24 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -8258,7 +12670,7 @@ s/'"$ac_delim"'$//
 t delim
 :nl
 h
-s/\(.\{148\}\)..*/\1/
+s/\(.\{148\}\).*/\1/
 t more1
 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
 p
@@ -8272,7 +12684,7 @@ s/.\{148\}//
 t nl
 :delim
 h
-s/\(.\{148\}\)..*/\1/
+s/\(.\{148\}\).*/\1/
 t more2
 s/["\\]/\\&/g; s/^/"/; s/$/"/
 p
@@ -8325,7 +12737,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+   { (exit 1); exit 1; }; }
 _ACEOF
 
 # VPATH may cause trouble with some makes, so we remove $(srcdir),
@@ -8366,7 +12780,9 @@ for ac_last_try in false false :; do
   if test -z "$ac_t"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+   { (exit 1); exit 1; }; }
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -8451,7 +12867,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+   { (exit 1); exit 1; }; }
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -8464,7 +12882,9 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+   { (exit 1); exit 1; }; };;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -8492,10 +12912,12 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -8506,7 +12928,7 @@ do
 	`' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
 $as_echo "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
@@ -8519,7 +12941,9 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; } ;;
     esac
     ;;
   esac
@@ -8547,7 +12971,47 @@ $as_echo X"$ac_file" |
 	    q
 	  }
 	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
   ac_builddir=.
 
 case "$ac_dir" in
@@ -8604,6 +13068,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
+
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -8613,11 +13078,12 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p'
+/@mandir@/p
+'
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -8627,7 +13093,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
+    s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -8656,12 +13122,14 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&2;}
@@ -8671,7 +13139,9 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
  ;;
   :H)
   #
@@ -8682,19 +13152,25 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
       $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
     fi
   else
     $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+   { (exit 1); exit 1; }; }
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -8744,11 +13220,13 @@ $as_echo X"$_am_arg" |
       ac_source=$srcdir/$ac_source
     fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+    { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
 
     if test ! -r "$ac_source"; then
-      as_fn_error "$ac_source: file not found" "$LINENO" 5
+      { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
+$as_echo "$as_me: error: $ac_source: file not found" >&2;}
+   { (exit 1); exit 1; }; }
     fi
     rm -f "$ac_file"
 
@@ -8760,10 +13238,12 @@ $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
       ln "$ac_source" "$ac_file" 2>/dev/null ||
       cp -p "$ac_source" "$ac_file" ||
-      as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+      { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
+$as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
   fi
  ;;
-  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
 $as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
@@ -8858,7 +13338,47 @@ $as_echo X"$file" |
 	    q
 	  }
 	  s/.*/./; q'`
-      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
       # echo "creating $dirpart/$file"
       echo '# dummy' > "$dirpart/$file"
     done
@@ -8870,12 +13390,15 @@ $as_echo X"$file" |
 done # for ac_tag
 
 
-as_fn_exit 0
+{ (exit 0); exit 0; }
 _ACEOF
+chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -8896,103 +13419,103 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || { (exit 1); exit 1; }
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+{ $as_echo "$as_me:$LINENO: result: " >&5
 $as_echo "" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE configuration:" >&5
+{ $as_echo "$as_me:$LINENO: result: $PACKAGE configuration:" >&5
 $as_echo "$PACKAGE configuration:" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Version                  = ${VERSION}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Version                  = ${VERSION}" >&5
 $as_echo "  Version                  = ${VERSION}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Prefix                   = ${prefix}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Prefix                   = ${prefix}" >&5
 $as_echo "  Prefix                   = ${prefix}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Executables              = ${sbindir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Executables              = ${sbindir}" >&5
 $as_echo "  Executables              = ${sbindir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Man pages                = ${mandir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Man pages                = ${mandir}" >&5
 $as_echo "  Man pages                = ${mandir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Doc dir                  = ${docdir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Doc dir                  = ${docdir}" >&5
 $as_echo "  Doc dir                  = ${docdir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Libraries                = ${libdir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Libraries                = ${libdir}" >&5
 $as_echo "  Libraries                = ${libdir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Header files             = ${includedir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Header files             = ${includedir}" >&5
 $as_echo "  Header files             = ${includedir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Arch-independent files   = ${datadir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Arch-independent files   = ${datadir}" >&5
 $as_echo "  Arch-independent files   = ${datadir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   State information        = ${localstatedir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   State information        = ${localstatedir}" >&5
 $as_echo "  State information        = ${localstatedir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   System configuration     = ${sysconfdir}" >&5
+{ $as_echo "$as_me:$LINENO: result:   System configuration     = ${sysconfdir}" >&5
 $as_echo "  System configuration     = ${sysconfdir}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   System init.d directory  = ${INITDDIR}" >&5
+{ $as_echo "$as_me:$LINENO: result:   System init.d directory  = ${INITDDIR}" >&5
 $as_echo "  System init.d directory  = ${INITDDIR}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   corosync config dir      = ${COROSYSCONFDIR}" >&5
+{ $as_echo "$as_me:$LINENO: result:   corosync config dir      = ${COROSYSCONFDIR}" >&5
 $as_echo "  corosync config dir      = ${COROSYSCONFDIR}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   LCRSO                    = ${LCRSODIR}" >&5
+{ $as_echo "$as_me:$LINENO: result:   LCRSO                    = ${LCRSODIR}" >&5
 $as_echo "  LCRSO                    = ${LCRSODIR}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   SOCKETDIR                = ${SOCKETDIR}" >&5
+{ $as_echo "$as_me:$LINENO: result:   SOCKETDIR                = ${SOCKETDIR}" >&5
 $as_echo "  SOCKETDIR                = ${SOCKETDIR}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Features                 =${PACKAGE_FEATURES}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Features                 =${PACKAGE_FEATURES}" >&5
 $as_echo "  Features                 =${PACKAGE_FEATURES}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+{ $as_echo "$as_me:$LINENO: result: " >&5
 $as_echo "" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE build info:" >&5
+{ $as_echo "$as_me:$LINENO: result: $PACKAGE build info:" >&5
 $as_echo "$PACKAGE build info:" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Library SONAME           = ${SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Library SONAME           = ${SONAME}" >&5
 $as_echo "  Library SONAME           = ${SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   CFG Library SONAME       = ${CFG_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   CFG Library SONAME       = ${CFG_SONAME}" >&5
 $as_echo "  CFG Library SONAME       = ${CFG_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   CONFDB Library SONAME    = ${CONFDB_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   CONFDB Library SONAME    = ${CONFDB_SONAME}" >&5
 $as_echo "  CONFDB Library SONAME    = ${CONFDB_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   CPG Library SONAME       = ${CPG_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   CPG Library SONAME       = ${CPG_SONAME}" >&5
 $as_echo "  CPG Library SONAME       = ${CPG_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   EVS Library SONAME       = ${EVS_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   EVS Library SONAME       = ${EVS_SONAME}" >&5
 $as_echo "  EVS Library SONAME       = ${EVS_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   PLOAD Library SONAME     = ${PLOAD_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   PLOAD Library SONAME     = ${PLOAD_SONAME}" >&5
 $as_echo "  PLOAD Library SONAME     = ${PLOAD_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   QUORUM Library SONAME    = ${QUORUM_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   QUORUM Library SONAME    = ${QUORUM_SONAME}" >&5
 $as_echo "  QUORUM Library SONAME    = ${QUORUM_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   SAM Library SONAME       = ${SAM_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   SAM Library SONAME       = ${SAM_SONAME}" >&5
 $as_echo "  SAM Library SONAME       = ${SAM_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   VOTEQUORUM Library SONAME  = ${VOTEQUORUM_SONAME}" >&5
+{ $as_echo "$as_me:$LINENO: result:   VOTEQUORUM Library SONAME  = ${VOTEQUORUM_SONAME}" >&5
 $as_echo "  VOTEQUORUM Library SONAME  = ${VOTEQUORUM_SONAME}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Default optimization     = ${OPT_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Default optimization     = ${OPT_CFLAGS}" >&5
 $as_echo "  Default optimization     = ${OPT_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Default debug options    = ${GDB_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Default debug options    = ${GDB_CFLAGS}" >&5
 $as_echo "  Default debug options    = ${GDB_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Extra compiler warnings  = ${EXTRA_WARNING}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Extra compiler warnings  = ${EXTRA_WARNING}" >&5
 $as_echo "  Extra compiler warnings  = ${EXTRA_WARNING}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Env. defined CFLAG       = ${ENV_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Env. defined CFLAG       = ${ENV_CFLAGS}" >&5
 $as_echo "  Env. defined CFLAG       = ${ENV_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Env. defined CPPFLAGS    = ${ENV_CPPFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Env. defined CPPFLAGS    = ${ENV_CPPFLAGS}" >&5
 $as_echo "  Env. defined CPPFLAGS    = ${ENV_CPPFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Env. defined LDFLAGS     = ${ENV_LDFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Env. defined LDFLAGS     = ${ENV_LDFLAGS}" >&5
 $as_echo "  Env. defined LDFLAGS     = ${ENV_LDFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OS   defined CFLAGS      = ${OS_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   OS   defined CFLAGS      = ${OS_CFLAGS}" >&5
 $as_echo "  OS   defined CFLAGS      = ${OS_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OS   defined CPPFLAGS    = ${OS_CPPFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   OS   defined CPPFLAGS    = ${OS_CPPFLAGS}" >&5
 $as_echo "  OS   defined CPPFLAGS    = ${OS_CPPFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OS   defined LDFLAGS     = ${OS_LDFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   OS   defined LDFLAGS     = ${OS_LDFLAGS}" >&5
 $as_echo "  OS   defined LDFLAGS     = ${OS_LDFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OS   defined LDL         = ${OS_LDL}" >&5
+{ $as_echo "$as_me:$LINENO: result:   OS   defined LDL         = ${OS_LDL}" >&5
 $as_echo "  OS   defined LDL         = ${OS_LDL}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OS   defined DYFLAGS     = ${OS_DYFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   OS   defined DYFLAGS     = ${OS_DYFLAGS}" >&5
 $as_echo "  OS   defined DYFLAGS     = ${OS_DYFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   ANSI defined CPPFLAGS    = ${ANSI_CPPFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   ANSI defined CPPFLAGS    = ${ANSI_CPPFLAGS}" >&5
 $as_echo "  ANSI defined CPPFLAGS    = ${ANSI_CPPFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Coverage     CFLAGS      = ${COVERAGE_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Coverage     CFLAGS      = ${COVERAGE_CFLAGS}" >&5
 $as_echo "  Coverage     CFLAGS      = ${COVERAGE_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Coverage     LDFLAGS     = ${COVERAGE_LDFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Coverage     LDFLAGS     = ${COVERAGE_LDFLAGS}" >&5
 $as_echo "  Coverage     LDFLAGS     = ${COVERAGE_LDFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Fatal War.   CFLAGS      = ${WERROR_CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Fatal War.   CFLAGS      = ${WERROR_CFLAGS}" >&5
 $as_echo "  Fatal War.   CFLAGS      = ${WERROR_CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Final        CFLAGS      = ${CFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Final        CFLAGS      = ${CFLAGS}" >&5
 $as_echo "  Final        CFLAGS      = ${CFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Final        CPPFLAGS    = ${CPPFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Final        CPPFLAGS    = ${CPPFLAGS}" >&5
 $as_echo "  Final        CPPFLAGS    = ${CPPFLAGS}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Final        LDFLAGS     = ${LDFLAGS}" >&5
+{ $as_echo "$as_me:$LINENO: result:   Final        LDFLAGS     = ${LDFLAGS}" >&5
 $as_echo "  Final        LDFLAGS     = ${LDFLAGS}" >&6; }
diff --git a/configure.ac b/configure.ac
index 08df3a1..fd4200b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,8 +112,7 @@ AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([alarm alphasort atexit bzero dup2 endgrent endpwent fcntl \
 		getcwd getpeerucred getpeereid gettimeofday inet_ntoa memmove \
 		memset mkdir scandir select socket strcasecmp strchr strdup \
-		strerror strrchr strspn strstr pthread_spin_lock \
-		pthread_spin_unlock pthread_setschedparam \
+		strerror strrchr strspn strstr pthread_setschedparam \
 		sched_get_priority_max sched_setscheduler])
 
 AC_CONFIG_FILES([Makefile
@@ -126,7 +125,8 @@ AC_CONFIG_FILES([Makefile
 		 pkgconfig/Makefile
 		 services/Makefile
 		 test/Makefile
-		 tools/Makefile])
+		 tools/Makefile
+		 conf/Makefile])
 
 ### Local business
 
@@ -237,6 +237,14 @@ AC_ARG_ENABLE([nss],
 	[  --enable-nss            : Network Security Services encryption. ],,
 	[ enable_nss="yes" ])
 
+AC_ARG_ENABLE([dbus],
+	[  --enable-dbus                    : dbus events. ],,
+	[ enable_dbus="no" ])
+
+AC_ARG_ENABLE([testagents],
+	[  --enable-testagents             : Install Test Agents. ],,
+	[ default="no" ])
+
 AC_ARG_ENABLE([rdma],
 	[  --enable-rdma           : Infiniband RDMA transport support ],,
 	[ enable_rdma="no" ])
@@ -257,6 +265,10 @@ AC_ARG_WITH([socket-dir],
 	[ SOCKETDIR="$withval" ],
 	[ SOCKETDIR="$localstatedir/run" ])
 
+AC_ARG_ENABLE([snmp],
+       [  --enable-snmp           : SNMP protocol support ],
+       [ default="no" ])
+
 # OS detection
 # THIS SECTION MUST DIE!
 CP=cp
@@ -359,6 +371,18 @@ if test "x${enable_nss}" = xyes; then
 	PACKAGE_FEATURES="$PACKAGE_FEATURES nss"
 fi
 
+# Look for dbus-1
+if test "x${enable_dbus}" = xyes; then
+	PKG_CHECK_MODULES([DBUS],[dbus-1])
+	AC_DEFINE_UNQUOTED([HAVE_DBUS], 1, [have dbus])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES dbus"
+fi
+
+if test "x${enable_testagents}" = xyes; then
+	AC_DEFINE_UNQUOTED([HAVE_TESTAGENTS], 1, [have testagents])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES testagents"
+fi
+
 if test "x${enable_rdma}" = xyes; then
 	PKG_CHECK_MODULES([rdmacm],[rdmacm])
 	PKG_CHECK_MODULES([ibverbs],[ibverbs])
@@ -366,6 +390,88 @@ if test "x${enable_rdma}" = xyes; then
 	PACKAGE_FEATURES="$PACKAGE_FEATURES rdma"
 fi
 
+if test "x${enable_monitoring}" = xyes; then
+
+	AC_CHECK_LIB([statgrab], [sg_get_mem_stats], have_libstatgrab="yes", have_libstatgrab="no")
+
+	if test "x${have_libstatgrab}" = xyes; then
+		AC_DEFINE_UNQUOTED([HAVE_LIBSTATGRAB], 1, [have libstatgrab])
+		statgrab_LIBS="-lstatgrab"
+	else
+		if test "x${have_linux}" = xno; then
+			AC_MSG_ERROR(monitoring requires libstatgrab on non-linux systems)
+		fi
+	fi
+	AC_SUBST([statgrab_LIBS])
+	AC_DEFINE_UNQUOTED([HAVE_MONITORING], 1, [have resource monitoring])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES monitoring"
+fi
+
+if test "x${enable_watchdog}" = xyes; then
+	AC_CHECK_HEADER(linux/watchdog.h,,AC_MSG_ERROR(watchdog requires linux/watchdog.h))
+	AC_CHECK_HEADER(linux/reboot.h,,AC_MSG_ERROR(watchdog requires linux/reboot.h))
+	AC_DEFINE_UNQUOTED([HAVE_WATCHDOG], 1, [have watchdog])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES watchdog"
+fi
+
+if test "x${enable_augeas}" = xyes; then
+	PACKAGE_FEATURES="$PACKAGE_FEATURES augeas"
+fi
+
+if test "x${enable_snmp}" = xyes; then
+       SNMPCONFIG=""
+       AC_CHECK_HEADERS(net-snmp/net-snmp-config.h)
+
+       if test "x${ac_cv_header_net_snmp_net_snmp_config_h}" != "xyes"; then
+               enable_snmp=no
+       fi
+
+       if test $enable_snmp != no; then
+               AC_PATH_PROGS(SNMPCONFIG, net-snmp-config)
+               if test "X${SNMPCONFIG}" = "X"; then
+                       AC_MSG_RESULT(You need the net_snmp development package to continue.)
+                       enable_snmp=no
+               fi
+       fi
+
+       if test $enable_snmp != no; then
+               AC_MSG_CHECKING(for special snmp libraries)
+               SNMPLIBS=`$SNMPCONFIG --libs`
+               AC_MSG_RESULT($SNMPLIBS)
+       fi
+
+       if test $enable_snmp != no; then
+               savedLibs=$LIBS
+               LIBS="$LIBS $SNMPLIBS"
+               AC_CHECK_FUNCS(netsnmp_transport_open_client)
+               if test $ac_cv_func_netsnmp_transport_open_client != yes; then
+                       AC_CHECK_FUNCS(netsnmp_tdomain_transport)
+                       if test $ac_cv_func_netsnmp_tdomain_transport != yes; then
+                               enable_snmp=no
+                       fi
+               else
+                       AC_DEFINE_UNQUOTED([NETSNMPV54], $NETSNMP_NEW_SUPPORT, [have net-snmp5.4 over])
+               fi
+               LIBS=$savedLibs
+       fi
+
+       AC_MSG_CHECKING(for snmp)
+       AC_MSG_RESULT($enable_snmp)
+   if test $enable_snmp = no; then
+               enable_snmp=0
+               AC_MSG_ERROR(Unable to support SNMP)
+   else
+               enable_snmp=1
+               PACKAGE_FEATURES="$PACKAGE_FEATURES snmp"
+               AC_DEFINE_UNQUOTED([ENABLE_SNMP], $enable_snmp, [Build in support for sending SNMP traps])
+   fi
+else
+       enable_snmp=0
+fi
+AC_SUBST([SNMPLIBS])
+AC_SUBST([SNMP_LCRSO])
+AM_CONDITIONAL(BUILD_SNMP, test "${enable_snmp}" = "1")
+
 # extra warnings
 EXTRA_WARNINGS=""
 
@@ -459,7 +565,8 @@ AC_SUBST([COVERAGE_LCRSO_EXTRA_LDFLAGS])
 AC_SUBST([OS_DYFLAGS])
 
 AC_SUBST([OS_LDL])
-
+AM_CONDITIONAL(INSTALL_MIB, test "${enable_snmp}" = "1")
+AM_CONDITIONAL(INSTALL_DBUSCONF, test "${enable_dbus}" = "1")
 AC_SUBST([NSS_LDFLAGS])
 
 AM_CONDITIONAL(BUILD_DARWIN, test -n "${DARWIN_OPTS}")
diff --git a/corosync.spec.in b/corosync.spec.in
index 6b0c464..74ab851 100644
--- a/corosync.spec.in
+++ b/corosync.spec.in
@@ -2,14 +2,24 @@
 %global numcomm @numcomm@
 %global dirty @dirty@
 
+# Conditionals
+# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
+# to disable or enable specific features
+%bcond_with testagents
+%bcond_with watchdog
+%bcond_with monitoring
+%bcond_with snmp
+%bcond_with dbus
+%bcond_with rdma
+
 Name: corosync
 Summary: The Corosync Cluster Engine and Application Programming Interfaces
 Version: @version@
 Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
 License: BSD
 Group: System Environment/Base
-URL: http://www.openais.org
-Source0: http://developer.osdl.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
+URL: http://ftp.corosync.org
+Source0: ftp://ftp:user@ftp.corosync.org/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
 
 # Runtime bits
 Requires: corosynclib = %{version}-%{release}
@@ -27,7 +37,15 @@ Conflicts: openais <= 0.89, openais-devel <= 0.89
 BuildRequires: autoconf automake
 %endif
 BuildRequires: nss-devel
+%if %{with rdma}
 BuildRequires: libibverbs-devel librdmacm-devel
+%endif
+%if %{with snmp}
+BuildRequires: net-snmp-devel
+%endif
+%if %{with dbus}
+BuildRequires: dbus-devel
+%endif
 
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -39,13 +57,32 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 ./autogen.sh
 %endif
 
+%if %{with rdma}
 export ibverbs_CFLAGS=-I/usr/include/infiniband \
 export ibverbs_LIBS=-libverbs \
 export rdmacm_CFLAGS=-I/usr/include/rdma \
 export rdmacm_LIBS=-lrdmacm \
+%endif
 %{configure} \
 	--enable-nss \
+%if %{with testagents}
+	--enable-testagents \
+%endif
+%if %{with watchdog}
+	--enable-watchdog \
+%endif
+%if %{with monitoring}
+	--enable-monitoring \
+%endif
+%if %{with snmp}
+	--enable-snmp \
+%endif
+%if %{with dbus}
+	--enable-dbus \
+%endif
+%if %{with rdma}
 	--enable-rdma \
+%endif
 	--with-initddir=%{_initrddir}
 
 make %{_smp_mflags}
@@ -55,6 +92,11 @@ rm -rf %{buildroot}
 
 make install DESTDIR=%{buildroot}
 
+%if %{with dbus}
+mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
+install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
+%endif
+
 ## tree fixup
 # drop static libs
 rm -f %{buildroot}%{_libdir}/*.a
@@ -91,12 +133,20 @@ fi
 %{_sbindir}/corosync-pload
 %{_sbindir}/corosync-cpgtool
 %{_sbindir}/corosync-quorumtool
+%{_sbindir}/corosync-notifyd
 %dir %{_sysconfdir}/corosync
 %dir %{_sysconfdir}/corosync/service.d
 %dir %{_sysconfdir}/corosync/uidgid.d
 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
+%if %{with dbus}
+%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
+%endif
+%if %{with snmp}
+%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
+%endif
 %{_initrddir}/corosync
+%{_initrddir}/corosync-notifyd
 %dir %{_libexecdir}/lcrso
 %{_libexecdir}/lcrso/coroparse.lcrso
 %{_libexecdir}/lcrso/objdb.lcrso
@@ -120,6 +170,7 @@ fi
 %{_mandir}/man8/corosync-cpgtool.8*
 %{_mandir}/man8/corosync-fplay.8*
 %{_mandir}/man8/corosync-pload.8*
+%{_mandir}/man8/corosync-notifyd.8*
 %{_mandir}/man8/corosync-quorumtool.8*
 %{_mandir}/man5/corosync.conf.5*
 
diff --git a/exec/Makefile.in b/exec/Makefile.in
index cf1afeb..09e6be2 100644
--- a/exec/Makefile.in
+++ b/exec/Makefile.in
@@ -181,6 +181,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -215,7 +217,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -226,6 +227,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -286,6 +290,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/exec/apidef.c b/exec/apidef.c
index b22b17f..72bfc62 100644
--- a/exec/apidef.c
+++ b/exec/apidef.c
@@ -144,7 +144,9 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
 	.fatal_error = _corosync_public_exit_error,
 	.shutdown_request = corosync_shutdown_request,
 	.state_dump = corosync_state_dump,
-	.poll_handle_get = corosync_poll_handle_get
+	.poll_handle_get = corosync_poll_handle_get,
+	.poll_dispatch_add = poll_dispatch_add,
+	.poll_dispatch_delete = poll_dispatch_delete
 };
 
 void apidef_init (struct objdb_iface_ver0 *objdb) {
diff --git a/exec/coroipcs.c b/exec/coroipcs.c
index 0ca22d3..2227c07 100644
--- a/exec/coroipcs.c
+++ b/exec/coroipcs.c
@@ -117,17 +117,6 @@ struct zcb_mapped {
 	size_t size;
 };
 
-#if _POSIX_THREAD_PROCESS_SHARED < 1
-#if defined(_SEM_SEMUN_UNDEFINED)
-union semun {
-	int val;
-	struct semid_ds *buf;
-	unsigned short int *array;
-	struct seminfo *__buf;
-};
-#endif
-#endif
-
 
 enum conn_state {
 	CONN_STATE_THREAD_INACTIVE = 0,
@@ -357,12 +346,12 @@ circular_memory_unmap (void *buf, size_t bytes)
 	return (res);
 }
 
-static void flow_control_state_set (
+static int32_t flow_control_state_set (
 	struct conn_info *conn_info,
 	int flow_control_state)
 {
 	if (conn_info->control_buffer->flow_control_enabled == flow_control_state) {
-		return;
+		return 0;
 	}
 	if (flow_control_state == 0) {
 		log_printf (LOGSYS_LEVEL_DEBUG,
@@ -375,14 +364,18 @@ static void flow_control_state_set (
 			conn_info->client_pid);
 	}
 
-
 	conn_info->control_buffer->flow_control_enabled = flow_control_state;
-	api->stats_update_value (conn_info->stats_handle,
-		"flow_control",
-		&flow_control_state,
-		sizeof(flow_control_state));
-	api->stats_increment_value (conn_info->stats_handle,
-		"flow_control_count");
+	return 1;
+}
+
+static void flow_control_stats_update (
+	hdb_handle_t stats_handle,
+	int flow_control_state)
+{
+	uint32_t fc_state = flow_control_state;
+	api->stats_update_value (stats_handle, "flow_control",
+				 &fc_state, sizeof(fc_state));
+	api->stats_increment_value (stats_handle, "flow_control_count");
 }
 
 static inline int zcb_free (struct zcb_mapped *zcb_mapped)
@@ -523,15 +516,15 @@ static inline int conn_info_destroy (struct conn_info *conn_info)
 		return (0);
 	}
 
-	api->serialize_lock ();
 	/*
 	 * Retry library exit function if busy
 	 */
 	if (conn_info->state == CONN_STATE_THREAD_DESTROYED) {
-		api->stats_destroy_connection (conn_info->stats_handle);
+		api->serialize_lock ();
 		res = api->exit_fn_get (conn_info->service) (conn_info);
+		api->serialize_unlock ();
+		api->stats_destroy_connection (conn_info->stats_handle);
 		if (res == -1) {
-			api->serialize_unlock ();
 			return (0);
 		} else {
 			conn_info->state = CONN_STATE_LIB_EXIT_CALLED;
@@ -541,7 +534,6 @@ static inline int conn_info_destroy (struct conn_info *conn_info)
 	pthread_mutex_lock (&conn_info->mutex);
 	if (conn_info->refcount > 0) {
 		pthread_mutex_unlock (&conn_info->mutex);
-		api->serialize_unlock ();
 		return (0);
 	}
 	list_del (&conn_info->list);
@@ -579,7 +571,6 @@ static inline int conn_info_destroy (struct conn_info *conn_info)
 	res = circular_memory_unmap (conn_info->dispatch_buffer, conn_info->dispatch_size);
 	zcb_all_free (conn_info);
 	api->free (conn_info);
-	api->serialize_unlock ();
 	return (-1);
 }
 
@@ -714,6 +705,7 @@ static void *pthread_ipc_consumer (void *conn)
 		 * parameter, such as an invalid size
 		 */
 		if (send_ok == -1) {
+			api->stats_increment_value (conn_info->stats_handle, "invalid_request");
 			coroipc_response_header.size = sizeof (coroipc_response_header_t);
 			coroipc_response_header.id = 0;
 			coroipc_response_header.error = CS_ERR_INVALID_PARAM;
@@ -722,14 +714,15 @@ static void *pthread_ipc_consumer (void *conn)
 				sizeof (coroipc_response_header_t));
 		} else 
 		if (send_ok) {
-			api->serialize_lock();
 			api->stats_increment_value (conn_info->stats_handle, "requests");
+			api->serialize_lock();
 			api->handler_fn_get (conn_info->service, header->id) (conn_info, header);
 			api->serialize_unlock();
 		} else {
 			/*
 			 * Overload, tell library to retry
 			 */
+			api->stats_increment_value (conn_info->stats_handle, "overload");
 			coroipc_response_header.size = sizeof (coroipc_response_header_t);
 			coroipc_response_header.id = 0;
 			coroipc_response_header.error = CS_ERR_TRY_AGAIN;
@@ -1039,9 +1032,8 @@ static void _corosync_ipc_init(void)
 
 	res = fcntl (server_fd, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_CRIT, "Could not set non-blocking operation on server socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_CRIT,
+			"Could not set non-blocking operation on server socket");
 		api->fatal_error ("Could not set non-blocking operation on server socket");
 	}
 
@@ -1068,9 +1060,8 @@ static void _corosync_ipc_init(void)
 
 	res = bind (server_fd, (struct sockaddr *)&un_addr, COROSYNC_SUN_LEN(&un_addr));
 	if (res) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_CRIT, "Could not bind AF_UNIX (%s): %s.\n", un_addr.sun_path, error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_CRIT,
+				"Could not bind AF_UNIX (%s)", un_addr.sun_path);
 		api->fatal_error ("Could not bind to AF_UNIX socket\n");
 	}
 
@@ -1240,7 +1231,7 @@ static void memcpy_dwrap (struct conn_info *conn_info, void *msg, unsigned int l
 	write_idx = conn_info->control_buffer->write;
 
 	memcpy (&conn_info->dispatch_buffer[write_idx], msg, len);
-	conn_info->control_buffer->write = (write_idx + len) % conn_info->dispatch_size;
+	conn_info->control_buffer->write = ((write_idx + len + 7) & 0xFFFFFFF8) % conn_info->dispatch_size;
 }
 
 static void msg_send (void *conn, const struct iovec *iov, unsigned int iov_len,
@@ -1267,8 +1258,6 @@ static void msg_send (void *conn, const struct iovec *iov, unsigned int iov_len,
 	}
 
 	ipc_sem_post (conn_info->control_buffer, SEMAPHORE_DISPATCH);
-
-	api->stats_increment_value (conn_info->stats_handle, "dispatched");
 }
 
 static void outq_flush (struct conn_info *conn_info) {
@@ -1276,11 +1265,17 @@ static void outq_flush (struct conn_info *conn_info) {
 	struct outq_item *outq_item;
 	unsigned int bytes_left;
 	struct iovec iov;
+	int32_t q_size_dec = 0;
+	int32_t i;
+	int32_t fc_set;
 
 	pthread_mutex_lock (&conn_info->mutex);
 	if (list_empty (&conn_info->outq_head)) {
-		flow_control_state_set (conn_info, 0);
+		fc_set = flow_control_state_set (conn_info, 0);
 		pthread_mutex_unlock (&conn_info->mutex);
+		if (fc_set) {
+			flow_control_stats_update (conn_info->stats_handle, 0);
+		}
 		return;
 	}
 	for (list = conn_info->outq_head.next;
@@ -1296,12 +1291,20 @@ static void outq_flush (struct conn_info *conn_info) {
 			list_del (list);
 			api->free (iov.iov_base);
 			api->free (outq_item);
-			api->stats_decrement_value (conn_info->stats_handle, "queue_size");
+			q_size_dec++;
 		} else {
 			break;
 		}
 	}
 	pthread_mutex_unlock (&conn_info->mutex);
+
+	/*
+	 * these need to be sent out of the conn_info->mutex
+	 */
+	for (i = 0; i < q_size_dec; i++) {
+		api->stats_decrement_value (conn_info->stats_handle, "queue_size");
+		api->stats_increment_value (conn_info->stats_handle, "dispatched");
+	}
 }
 
 static int priv_change (struct conn_info *conn_info)
@@ -1375,7 +1378,9 @@ static void msg_send_or_queue (void *conn, const struct iovec *iov, unsigned int
 		bytes_msg += iov[i].iov_len;
 	}
 	if (bytes_left < bytes_msg || list_empty (&conn_info->outq_head) == 0) {
-		flow_control_state_set (conn_info, 1);
+		if (flow_control_state_set (conn_info, 1)) {
+			flow_control_stats_update(conn_info->stats_handle, 1);
+		}
 		outq_item = api->malloc (sizeof (struct outq_item));
 		if (outq_item == NULL) {
 			ipc_disconnect (conn);
@@ -1402,6 +1407,7 @@ static void msg_send_or_queue (void *conn, const struct iovec *iov, unsigned int
 		return;
 	}
 	msg_send (conn, iov, iov_len, MSG_SEND_LOCKED);
+	api->stats_increment_value (conn_info->stats_handle, "dispatched");
 }
 
 void coroipcs_refcount_inc (void *conn)
@@ -1461,20 +1467,15 @@ retry_accept:
 	}
 
 	if (new_fd == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_ERROR,
-			"Could not accept Library connection: %s\n", error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_ERROR,
+			"Could not accept Library connection");
 		return (0); /* This is an error, but -1 would indicate disconnect from poll loop */
 	}
 
 	res = fcntl (new_fd, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_ERROR,
-			"Could not set non-blocking operation on library connection: %s\n",
-			error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_ERROR,
+			"Could not set non-blocking operation on library connection");
 		close (new_fd);
 		return (0); /* This is an error, but -1 would indicate disconnect from poll loop */
 	}
@@ -1545,17 +1546,29 @@ static char * pid_to_name (pid_t pid, char *out_name, size_t name_len)
 static void coroipcs_init_conn_stats (
 	struct conn_info *conn)
 {
-	char conn_name[42];
-	char proc_name[32];
+	char conn_name[CS_MAX_NAME_LENGTH];
+	char proc_name[CS_MAX_NAME_LENGTH];
+	char int_str[4];
 
 	if (conn->client_pid > 0) {
-		if (pid_to_name (conn->client_pid, proc_name, sizeof(proc_name)))
-			snprintf (conn_name, sizeof(conn_name), "%s:%d:%d", proc_name, conn->client_pid, conn->fd);
-		else
-			snprintf (conn_name, sizeof(conn_name), "%d:%d", conn->client_pid, conn->fd);
-	} else
-		snprintf (conn_name, sizeof(conn_name), "%d", conn->fd);
-
+		if (pid_to_name (conn->client_pid, proc_name, sizeof(proc_name))) {
+			snprintf (conn_name, sizeof(conn_name),
+				"%s:%s:%d:%d", proc_name,
+				short_service_name_get(conn->service, int_str, 4),
+				conn->client_pid, conn->fd);
+		} else {
+			snprintf (conn_name, sizeof(conn_name),
+				"proc:%s:%d:%d",
+				short_service_name_get(conn->service, int_str, 4),
+				conn->client_pid,
+				conn->fd);
+		}
+	} else {
+		snprintf (conn_name, sizeof(conn_name),
+			"proc:%s:pid:%d",
+			short_service_name_get(conn->service, int_str, 4),
+			conn->fd);
+	}
 	conn->stats_handle = api->stats_create_connection (conn_name, conn->client_pid, conn->fd);
 	api->stats_update_value (conn->stats_handle, "service_id",
 		&conn->service, sizeof(conn->service));
@@ -1569,7 +1582,7 @@ int coroipcs_handler_dispatch (
 	mar_req_setup_t *req_setup;
 	struct conn_info *conn_info = (struct conn_info *)context;
 	int res;
-	char buf;
+	char buf = 0;
 
 
 	if (ipc_thread_exiting (conn_info)) {
@@ -1605,14 +1618,14 @@ int coroipcs_handler_dispatch (
 		req_setup = (mar_req_setup_t *)conn_info->setup_msg;
 		/*
 		 * Is the service registered ?
+		 * Has service init function ?
 		 */
-		if (api->service_available (req_setup->service) == 0) {
+		if (api->service_available (req_setup->service) == 0 ||
+		    api->init_fn_get (req_setup->service) == NULL) {
 			req_setup_send (conn_info, CS_ERR_NOT_EXIST);
 			ipc_disconnect (conn_info);
 			return (0);
 		}
-		req_setup_send (conn_info, CS_OK);
-
 #if _POSIX_THREAD_PROCESS_SHARED < 1
 		conn_info->semkey = req_setup->semkey;
 #endif
@@ -1620,26 +1633,47 @@ int coroipcs_handler_dispatch (
 			req_setup->control_file,
 			req_setup->control_size,
 			(void *)&conn_info->control_buffer);
+		if (res == -1) {
+			goto send_setup_response;
+		}
 		conn_info->control_size = req_setup->control_size;
 
 		res = memory_map (
 			req_setup->request_file,
 			req_setup->request_size,
 			(void *)&conn_info->request_buffer);
+		if (res == -1) {
+			goto send_setup_response;
+		}
 		conn_info->request_size = req_setup->request_size;
 
 		res = memory_map (
 			req_setup->response_file,
 			req_setup->response_size,
 			(void *)&conn_info->response_buffer);
+		if (res == -1) {
+			goto send_setup_response;
+		}
 		conn_info->response_size = req_setup->response_size;
 
 		res = circular_memory_map (
 			req_setup->dispatch_file,
 			req_setup->dispatch_size,
 			(void *)&conn_info->dispatch_buffer);
+		if (res == -1) {
+			goto send_setup_response;
+		}
 		conn_info->dispatch_size = req_setup->dispatch_size;
 
+ send_setup_response:
+		if (res == 0) {
+			req_setup_send (conn_info, CS_OK);
+		} else {
+			req_setup_send (conn_info, CS_ERR_LIBRARY);
+			ipc_disconnect (conn_info);
+			return (0);
+		}
+
 		conn_info->service = req_setup->service;
 		conn_info->refcount = 0;
 		conn_info->setup_bytes_read = 0;
@@ -1685,7 +1719,7 @@ int coroipcs_handler_dispatch (
 		 * the ipc connection
 		 */
 		if (conn_info->service == SOCKET_SERVICE_INIT) {
-			conn_info->service = -1;
+			conn_info->service = SOCKET_SERVICE_SECURITY_VIOLATION;
 		}
 	} else
 	if (revent & POLLIN) {
diff --git a/exec/coroparse.c b/exec/coroparse.c
index a42dbb3..29b44a6 100644
--- a/exec/coroparse.c
+++ b/exec/coroparse.c
@@ -54,6 +54,8 @@
 #include <corosync/lcr/lcr_comp.h>
 #include <corosync/engine/objdb.h>
 #include <corosync/engine/config.h>
+#define LOGSYS_UTILS_ONLY 1
+#include <corosync/engine/logsys.h>
 
 #include "util.h"
 
@@ -254,7 +256,8 @@ static int read_uidgid_files_into_objdb(
 
 	entry = malloc(len);
 	if (entry == NULL) {
-		return 0;
+		res = 0;
+		goto error_exit;
 	}
 
 	for (return_code = readdir_r(dp, entry, &dirent);
@@ -310,7 +313,8 @@ static int read_service_files_into_objdb(
 
 	entry = malloc(len);
 	if (entry == NULL) {
-		return 0;
+		res = 0;
+		goto error_exit;
 	}
 
 	for (return_code = readdir_r(dp, entry, &dirent);
@@ -358,10 +362,11 @@ static int read_config_file_into_objdb(
 	fp = fopen (filename, "r");
 	if (fp == NULL) {
 		char error_str[100];
-		strerror_r (errno, error_str, 100);
+		const char *error_ptr;
+		LOGSYS_STRERROR_R (error_ptr, errno, error_str, sizeof(error_str));
 		snprintf (error_reason, sizeof(error_string_response),
 			"Can't read file %s reason = (%s)\n",
-			 filename, error_str);
+			 filename, error_ptr);
 		*error_string = error_reason;
 		return -1;
 	}
diff --git a/exec/coropoll.c b/exec/coropoll.c
index 95978df..9bd10c9 100644
--- a/exec/coropoll.c
+++ b/exec/coropoll.c
@@ -49,6 +49,7 @@
 #include <corosync/totem/coropoll.h>
 #include <corosync/list.h>
 #include "tlist.h"
+#include "util.h"
 
 typedef int (*dispatch_fn_t) (hdb_handle_t hdb_handle, int fd, int revents, void *data);
 
@@ -258,7 +259,9 @@ int poll_dispatch_modify (
 			poll_instance->poll_entries[i].dispatch_fn = dispatch_fn;
 			if (change_notify) {
 				char buf = 1;
-				write (poll_instance->pipefds[1], &buf, 1);
+retry_write:
+				if (write (poll_instance->pipefds[1], &buf, 1) < 0 && errno == EINTR )
+					goto retry_write;
 			}
 
 			goto error_put;
@@ -416,9 +419,7 @@ static void poll_fds_usage_check(struct poll_instance *poll_instance)
 
 	if (socks_limit == 0) {
 		if (getrlimit(RLIMIT_NOFILE, &lim) == -1) {
-			char error_str[100];
-			strerror_r(errno, error_str, 100);
-			printf("getrlimit: %s\n", error_str);
+			perror("getrlimit() failed");
 			return;
 		}
 		socks_limit = lim.rlim_cur;
@@ -499,7 +500,9 @@ retry_poll:
 
 		if (poll_instance->ufds[0].revents) {
 			char buf;
-			read (poll_instance->ufds[0].fd, &buf, 1);
+retry_read:
+			if (read (poll_instance->ufds[0].fd, &buf, 1) < 0 && errno == EINTR)
+				goto retry_read;
 			goto rebuild_poll;
 		}
 		poll_entry_count = poll_instance->poll_entry_count;
diff --git a/exec/crypto.c b/exec/crypto.c
index 1564ee8..901797a 100644
--- a/exec/crypto.c
+++ b/exec/crypto.c
@@ -36,10 +36,6 @@ typedef uint64_t ulong64;
 #define ENDIAN_LITTLE
 #elif __BYTE_ORDER == __BIG_ENDIAN
 #define ENDIAN_BIG
-#elif _BYTE_ORDER == _LITTLE_ENDIAN
-#define ENDIAN_LITTLE
-#elif _BYTE_ORDER == _BIG_ENDIAN
-#define ENDIAN_BIG
 #else
 #error "cannot detect byte order"
 #endif
@@ -1318,7 +1314,7 @@ unsigned long rng_get_bytes(unsigned char *buf, unsigned long len,
 int rng_make_prng(int bits, int wprng, prng_state *prng,
                   void (*callback)(void))
 {
-   unsigned char buf[256];
+   unsigned char buf[258];
    int err;
 
    if (bits < 64 || bits > 1024) {
diff --git a/exec/logsys.c b/exec/logsys.c
index 72d3f68..7b7d2a5 100644
--- a/exec/logsys.c
+++ b/exec/logsys.c
@@ -66,6 +66,8 @@
 #include <corosync/list.h>
 #include <corosync/engine/logsys.h>
 
+#include "util.h"
+
 #define YIELD_AFTER_LOG_OPS 10
 
 #define MIN(x,y) ((x) < (y) ? (x) : (y))
@@ -190,17 +192,9 @@ static sem_t logsys_thread_start;
 
 static sem_t logsys_print_finished;
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static pthread_spinlock_t logsys_flt_spinlock;
-#else
 static pthread_mutex_t logsys_flt_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static pthread_spinlock_t logsys_wthread_spinlock;
-#else
 static pthread_mutex_t logsys_wthread_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
 
 static int logsys_buffer_full = 0;
 
@@ -307,16 +301,6 @@ error_exit:
 	return (error_return);
 }
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static void logsys_flt_lock (void)
-{
-	pthread_spin_lock (&logsys_flt_spinlock);
-}
-static void logsys_flt_unlock (void)
-{
-	pthread_spin_unlock (&logsys_flt_spinlock);
-}
-#else
 static void logsys_flt_lock (void)
 {
 	pthread_mutex_lock (&logsys_flt_mutex);
@@ -325,18 +309,7 @@ static void logsys_flt_unlock (void)
 {
 	pthread_mutex_unlock (&logsys_flt_mutex);
 }
-#endif
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static void logsys_wthread_lock (void)
-{
-	pthread_spin_lock (&logsys_wthread_spinlock);
-}
-static void logsys_wthread_unlock (void)
-{
-	pthread_spin_unlock (&logsys_wthread_spinlock);
-}
-#else
 static void logsys_wthread_lock (void)
 {
 	pthread_mutex_lock (&logsys_wthread_mutex);
@@ -345,7 +318,6 @@ static void logsys_wthread_unlock (void)
 {
 	pthread_mutex_unlock (&logsys_wthread_mutex);
 }
-#endif
 
 /*
  * Before any write operation, a reclaim on the buffer area must be executed
@@ -508,7 +480,7 @@ static void log_printf_to_logs (
 					break;
 
 				case 'l':
-					sprintf (line_no, "%d", file_line);
+					snprintf (line_no, sizeof (line_no), "%d", file_line);
 					normal_p = line_no;
 					syslog_p = line_no;
 					break;
@@ -906,14 +878,28 @@ static int logsys_config_file_set_unlocked (
 
 	logsys_loggers[subsysid].logfile_fp = fopen (file, "a+");
 	if (logsys_loggers[subsysid].logfile_fp == NULL) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
+		int err;
+		char error_str[LOGSYS_MAX_PERROR_MSG_LEN];
+		const char *error_ptr;
+
+		err = errno;
+#ifdef COROSYNC_LINUX
+		/* The GNU version of strerror_r returns a (char*) that *must* be used */
+		error_ptr = strerror_r(err, error_str, sizeof(error_str));
+#else
+		/* The XSI-compliant strerror_r() return 0 or -1 (in case the buffer is full) */
+		if ( strerror_r(err, error_str, sizeof(error_str)) < 0 )
+			error_ptr = "";
+		else
+			error_ptr = error_str;
+#endif
+
 		free(logsys_loggers[subsysid].logfile);
 		logsys_loggers[subsysid].logfile = NULL;
 		snprintf (error_string_response,
 			sizeof(error_string_response),
-			"Can't open logfile '%s' for reason (%s).\n",
-				 file, error_str);
+			"Can't open logfile '%s' for reason: %s (%d).\n",
+				 file, error_ptr, err);
 		*error_string = error_string_response;
 		return (-1);
 	}
@@ -936,7 +922,9 @@ static void logsys_subsys_init (
 			LOGSYS_LOGGER_INIT_DONE;
 	}
 	strncpy (logsys_loggers[subsysid].subsys, subsys,
-		LOGSYS_MAX_SUBSYS_NAMELEN);
+		sizeof (logsys_loggers[subsysid].subsys));
+	logsys_loggers[subsysid].subsys[
+		sizeof (logsys_loggers[subsysid].subsys) - 1] = '\0';
 }
 
 /*
@@ -992,7 +980,8 @@ int _logsys_system_setup(
 			(logsys_loggers[i].init_status ==
 			 LOGSYS_LOGGER_NEEDS_INIT)) {
 				strncpy (tempsubsys, logsys_loggers[i].subsys,
-					LOGSYS_MAX_SUBSYS_NAMELEN);
+					sizeof (tempsubsys));
+				tempsubsys[sizeof (tempsubsys) - 1] = '\0';
 				logsys_subsys_init(tempsubsys, i);
 		}
 	}
@@ -1052,11 +1041,6 @@ int _logsys_rec_init (unsigned int fltsize)
 
 	sem_init (&logsys_print_finished, 0, 0);
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-	pthread_spin_init (&logsys_flt_spinlock, 1);
-	pthread_spin_init (&logsys_wthread_spinlock, 1);
-#endif
-
 	/*
 	 * XXX: kill me for 1.1 because I am a dirty hack
 	 * temporary workaround that will be replaced by supporting
@@ -1074,11 +1058,6 @@ int _logsys_rec_init (unsigned int fltsize)
 	if (res == -1) {
 		sem_destroy (&logsys_thread_start);
 		sem_destroy (&logsys_print_finished);
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-		pthread_spin_destroy (&logsys_flt_spinlock);
-		pthread_spin_destroy (&logsys_wthread_spinlock);
-#endif
-		return (-1);
 	}
 
 	memset (flt_data, 0, flt_real_size * 2);
@@ -1241,7 +1220,7 @@ void _logsys_log_vprintf (
 	subsysid = LOGSYS_DECODE_SUBSYSID(rec_ident);
 	level = LOGSYS_DECODE_LEVEL(rec_ident);
 
-	len = vsprintf (logsys_print_buffer, format, ap);
+	len = vsnprintf (logsys_print_buffer, sizeof (logsys_print_buffer), format, ap);
 	if (logsys_print_buffer[len - 1] == '\n') {
 		logsys_print_buffer[len - 1] = '\0';
 		len -= 1;
@@ -1338,7 +1317,7 @@ int _logsys_config_subsys_get (const char *subsys)
 void logsys_fork_completed (void)
 {
 	logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode &= ~LOGSYS_MODE_FORK;
-	_logsys_wthread_create ();
+	(void)_logsys_wthread_create ();
 }
 
 int logsys_config_mode_set (const char *subsys, unsigned int mode)
@@ -1617,6 +1596,8 @@ int logsys_log_rec_store (const char *filename)
 		return (-1);
 	}
 
+	logsys_flt_lock();
+
 	this_write_size = write (fd, &flt_data_size, sizeof(uint32_t));
 	if (this_write_size != sizeof(unsigned int)) {
 		goto error_exit;
@@ -1642,10 +1623,13 @@ int logsys_log_rec_store (const char *filename)
 	if (written_size != ((flt_data_size + 3) * sizeof (uint32_t))) { 
 		goto error_exit;
 	}
-	
+
+	logsys_flt_unlock();
+	close (fd);
 	return (0);
 
 error_exit:
+	logsys_flt_unlock();
 	close (fd);
 	return (-1);
 }
diff --git a/exec/main.c b/exec/main.c
index 1c9e8d2..b3fe814 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -87,6 +87,12 @@
 #include "schedwrk.h"
 #include "evil.h"
 
+#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
+#define IPC_LOGSYS_SIZE			1024*64
+#else
+#define IPC_LOGSYS_SIZE			8192*128
+#endif
+
 LOGSYS_DECLARE_SYSTEM ("corosync",
 	LOGSYS_MODE_OUTPUT_STDERR | LOGSYS_MODE_THREADED | LOGSYS_MODE_FORK,
 	0,
@@ -95,7 +101,7 @@ LOGSYS_DECLARE_SYSTEM ("corosync",
 	LOG_DAEMON,
 	LOG_INFO,
 	NULL,
-	1000000);
+	IPC_LOGSYS_SIZE);
 
 LOGSYS_DECLARE_SUBSYS ("MAIN");
 
@@ -105,11 +111,7 @@ static int sched_priority = 0;
 
 static unsigned int service_count = 32;
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static pthread_spinlock_t serialize_spin;
-#else
 static pthread_mutex_t serialize_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
 
 static struct totem_logging_configuration totem_logging_configuration;
 
@@ -145,6 +147,8 @@ static int32_t corosync_not_enough_fds_left = 0;
 
 static void serialize_unlock (void);
 
+static void serialize_lock (void);
+
 hdb_handle_t corosync_poll_handle_get (void)
 {
 	return (corosync_poll_handle);
@@ -172,14 +176,7 @@ static void unlink_all_completed (void)
 	serialize_unlock ();
 	api->timer_delete (corosync_stats_timer_handle);
 	poll_stop (corosync_poll_handle);
-	totempg_finalize ();
-
-	/*
-	 * Remove pid lock file
-	 */
-	unlink (corosync_lock_file);
-
-	corosync_exit_error (AIS_DONE_EXIT);
+	serialize_lock ();
 }
 
 void corosync_shutdown_request (void)
@@ -197,8 +194,17 @@ void corosync_shutdown_request (void)
 
 static void *corosync_exit_thread_handler (void *arg)
 {
+	totempg_stats_t * stats;
+
 	sem_wait (&corosync_exit_sem);
 
+	stats = api->totem_get_stats();
+	if (stats->mrp->srp->continuous_gather > MAX_NO_CONT_GATHER ||
+	    stats->mrp->srp->operational_entered == 0) {
+		unlink_all_completed ();
+		/* NOTREACHED */
+	}
+
 	corosync_service_unlink_all (api, unlink_all_completed);
 
 	return arg;
@@ -252,17 +258,6 @@ static struct totempg_group corosync_group = {
 
 
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static void serialize_lock (void)
-{
-	pthread_spin_lock (&serialize_spin);
-}
-
-static void serialize_unlock (void)
-{
-	pthread_spin_unlock (&serialize_spin);
-}
-#else
 static void serialize_lock (void)
 {
 	pthread_mutex_lock (&serialize_mutex);
@@ -272,7 +267,6 @@ static void serialize_unlock (void)
 {
 	pthread_mutex_unlock (&serialize_mutex);
 }
-#endif
 
 static void corosync_sync_completed (void)
 {
@@ -375,7 +369,7 @@ static void member_object_joined (unsigned int nodeid)
 			&object_node_handle) == 0) {
 
 		objdb->object_key_increment (object_node_handle,
-			"join_count", strlen("flap"),
+			"join_count", strlen("join_count"),
 			&key_incr_dummy);
 
 		objdb->object_key_replace (object_node_handle,
@@ -480,6 +474,8 @@ static void priv_drop (void)
 
 static void corosync_tty_detach (void)
 {
+	FILE *r;
+
 	/*
 	 * Disconnect from TTY if this is not a debug run
 	 */
@@ -504,9 +500,18 @@ static void corosync_tty_detach (void)
 	/*
 	 * Map stdin/out/err to /dev/null.
 	 */
-	freopen("/dev/null", "r", stdin);
-	freopen("/dev/null", "a", stderr);
-	freopen("/dev/null", "a", stdout);
+	r = freopen("/dev/null", "r", stdin);
+	if (r == NULL) {
+		corosync_exit_error (AIS_DONE_STD_TO_NULL_REDIR);
+	}
+	r = freopen("/dev/null", "a", stderr);
+	if (r == NULL) {
+		corosync_exit_error (AIS_DONE_STD_TO_NULL_REDIR);
+	}
+	r = freopen("/dev/null", "a", stdout);
+	if (r == NULL) {
+		corosync_exit_error (AIS_DONE_STD_TO_NULL_REDIR);
+	}
 }
 
 static void corosync_mlockall (void)
@@ -532,11 +537,8 @@ static void corosync_mlockall (void)
 #else
 	res = mlockall (MCL_CURRENT | MCL_FUTURE);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_WARNING,
-			"Could not lock memory of service to avoid page faults: %s\n",
-			error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_WARNING,
+			"Could not lock memory of service to avoid page faults");
 	};
 #endif
 }
@@ -553,9 +555,17 @@ static void corosync_totem_stats_updater (void *data)
 	uint32_t total_token_holdtime;
 	int t, prev;
 	int32_t token_count;
+	uint32_t firewall_enabled_or_nic_failure;
 
 	stats = api->totem_get_stats();
 
+	objdb->object_key_replace (stats->hdr.handle,
+		"msg_reserved", strlen("msg_reserved"),
+		&stats->msg_reserved, sizeof (stats->msg_reserved));
+	objdb->object_key_replace (stats->hdr.handle,
+		"msg_queue_avail", strlen("msg_queue_avail"),
+		&stats->msg_queue_avail, sizeof (stats->msg_queue_avail));
+
 	objdb->object_key_replace (stats->mrp->srp->hdr.handle,
 		"orf_token_tx", strlen("orf_token_tx"),
 		&stats->mrp->srp->orf_token_tx, sizeof (stats->mrp->srp->orf_token_tx));
@@ -625,6 +635,14 @@ static void corosync_totem_stats_updater (void *data)
 	objdb->object_key_replace (stats->mrp->srp->hdr.handle,
 		"rx_msg_dropped", strlen("rx_msg_dropped"),
 		&stats->mrp->srp->rx_msg_dropped, sizeof (stats->mrp->srp->rx_msg_dropped));
+	objdb->object_key_replace (stats->mrp->srp->hdr.handle,
+		"continuous_gather", strlen("continuous_gather"),
+		&stats->mrp->srp->continuous_gather, sizeof (stats->mrp->srp->continuous_gather));
+
+	firewall_enabled_or_nic_failure = (stats->mrp->srp->continuous_gather > MAX_NO_CONT_GATHER ? 1 : 0);
+	objdb->object_key_replace (stats->mrp->srp->hdr.handle,
+		"firewall_enabled_or_nic_failure", strlen("firewall_enabled_or_nic_failure"),
+		&firewall_enabled_or_nic_failure, sizeof (firewall_enabled_or_nic_failure));
 
 	total_mtt_rx_token = 0;
 	total_token_holdtime = 0;
@@ -700,6 +718,13 @@ static void corosync_totem_stats_init (void)
 			&stats->mrp->srp->hdr.handle,
 			"srp", strlen ("srp"));
 
+		objdb->object_key_create_typed (stats->hdr.handle,
+			"msg_reserved", &stats->msg_reserved,
+			sizeof (stats->msg_reserved), OBJDB_VALUETYPE_UINT32);
+		objdb->object_key_create_typed (stats->hdr.handle,
+			"msg_queue_avail", &stats->msg_queue_avail,
+			sizeof (stats->msg_queue_avail), OBJDB_VALUETYPE_UINT32);
+
 		/* Members object */
 		objdb->object_create (stats->mrp->srp->hdr.handle,
 			&object_memb_handle,
@@ -783,6 +808,12 @@ static void corosync_totem_stats_init (void)
 		objdb->object_key_create_typed (stats->mrp->srp->hdr.handle,
 			"rx_msg_dropped", &zero_64,
 			sizeof (zero_64), OBJDB_VALUETYPE_UINT64);
+		objdb->object_key_create_typed (stats->mrp->srp->hdr.handle,
+			"continuous_gather", &zero_32,
+			sizeof (zero_32), OBJDB_VALUETYPE_UINT32);
+		objdb->object_key_create_typed (stats->mrp->srp->hdr.handle,
+			"firewall_enabled_or_nic_failure", &zero_32,
+			sizeof (zero_32), OBJDB_VALUETYPE_UINT32);
 
 	}
 	/* start stats timer */
@@ -1144,6 +1175,16 @@ static hdb_handle_t corosync_stats_create_connection (const char* name,
 		&zero_64, sizeof (zero_64),
 		OBJDB_VALUETYPE_UINT64);
 
+	objdb->object_key_create_typed (object_handle,
+		"invalid_request",
+		&zero_64, sizeof (zero_64),
+		OBJDB_VALUETYPE_UINT64);
+
+	objdb->object_key_create_typed (object_handle,
+		"overload",
+		&zero_64, sizeof (zero_64),
+		OBJDB_VALUETYPE_UINT64);
+
 	return object_handle;
 }
 
@@ -1228,12 +1269,11 @@ static void corosync_setscheduler (void)
 		global_sched_param.sched_priority = sched_priority;
 		res = sched_setscheduler (0, SCHED_RR, &global_sched_param);
 		if (res == -1) {
-			char error_str[100];
-			strerror_r (errno, error_str, 100);
-			global_sched_param.sched_priority = 0;
-			log_printf (LOGSYS_LEVEL_WARNING, "Could not set SCHED_RR at priority %d: %s\n",
-				global_sched_param.sched_priority, error_str);
+			LOGSYS_PERROR(errno, LOGSYS_LEVEL_WARNING,
+				"Could not set SCHED_RR at priority %d",
+				global_sched_param.sched_priority);
 
+			global_sched_param.sched_priority = 0;
 			logsys_thread_priority_set (SCHED_OTHER, NULL, 1);
 		} else {
 			/*
@@ -1253,11 +1293,8 @@ static void corosync_setscheduler (void)
 			}
 		}
 	} else {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (LOGSYS_LEVEL_WARNING,
-			"Could not get maximum scheduler priority: %s\n",
-			error_str);
+		LOGSYS_PERROR (errno, LOGSYS_LEVEL_WARNING,
+			"Could not get maximum scheduler priority");
 		sched_priority = 0;
 	}
 #else
@@ -1502,10 +1539,6 @@ int main (int argc, char **argv, char **envp)
 	hdb_handle_t object_runtime_handle;
 	enum e_ais_done flock_err;
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-	pthread_spin_init (&serialize_spin, 0);
-#endif
-
  	/* default configuration
 	 */
 	background = 1;
@@ -1812,6 +1845,17 @@ int main (int argc, char **argv, char **envp)
 	 */
 	poll_run (corosync_poll_handle);
 
+	/*
+	 * Exit was requested
+	 */
+	totempg_finalize ();
+
+	/*
+	 * Remove pid lock file
+	 */
+	unlink (corosync_lock_file);
+
+	corosync_exit_error (AIS_DONE_EXIT);
+
 	return EXIT_SUCCESS;
 }
-
diff --git a/exec/mainconfig.c b/exec/mainconfig.c
index 44bd47a..7d4e520 100644
--- a/exec/mainconfig.c
+++ b/exec/mainconfig.c
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
+#include <unistd.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -568,11 +569,20 @@ parse_error:
 
 static int uid_determine (const char *req_user)
 {
+	int pw_uid = 0;
 	struct passwd passwd;
 	struct passwd* pwdptr = &passwd;
 	struct passwd* temp_pwd_pt;
-	char pwdbuffer[200];
-	int  pwdlinelen = sizeof(pwdbuffer);
+	char *pwdbuffer;
+	int  pwdlinelen;
+
+	pwdlinelen = sysconf (_SC_GETPW_R_SIZE_MAX);
+
+	if (pwdlinelen == -1) {
+		pwdlinelen = 256;
+	}
+
+	pwdbuffer = malloc (pwdlinelen);
 
 	if ((getpwnam_r (req_user, pwdptr, pwdbuffer, pwdlinelen, &temp_pwd_pt)) != 0) {
 		log_printf (LOGSYS_LEVEL_ERROR,
@@ -580,8 +590,10 @@ static int uid_determine (const char *req_user)
 			req_user);
 		corosync_exit_error (AIS_DONE_UID_DETERMINE);
 	}
+	pw_uid = passwd.pw_uid;
+	free (pwdbuffer);
 
-	return passwd.pw_uid;
+	return pw_uid;
 }
 
 static int gid_determine (const char *req_group)
@@ -590,8 +602,16 @@ static int gid_determine (const char *req_group)
 	struct group group;
 	struct group * grpptr = &group;
 	struct group * temp_grp_pt;
-	char grpbuffer[200];
-	int  grplinelen = sizeof(grpbuffer);
+	char *grpbuffer;
+	int  grplinelen;
+
+	grplinelen = sysconf (_SC_GETGR_R_SIZE_MAX);
+
+	if (grplinelen == -1) {
+		grplinelen = 256;
+	}
+
+	grpbuffer = malloc (grplinelen);
 
 	if ((getgrnam_r (req_group, grpptr, grpbuffer, grplinelen, &temp_grp_pt)) != 0) {
 		log_printf (LOGSYS_LEVEL_ERROR,
@@ -600,6 +620,8 @@ static int gid_determine (const char *req_group)
 		corosync_exit_error (AIS_DONE_GID_DETERMINE);
 	}
 	ais_gid = group.gr_gid;
+	free (grpbuffer);
+
 	return ais_gid;
 }
 
@@ -614,7 +636,9 @@ static void main_objdb_reload_notify(objdb_reload_notify_type_t type, int flush,
 		/*
 		 * Reload the logsys configuration
 		 */
-		logsys_format_set(NULL);
+		if (logsys_format_set(NULL) == -1) {
+			fprintf (stderr, "Unable to setup logging format.\n");
+		}
 		corosync_main_config_read_logging(global_objdb,
 						  &error_string);
 	}
diff --git a/exec/objdb.c b/exec/objdb.c
index dc36236..baadda3 100644
--- a/exec/objdb.c
+++ b/exec/objdb.c
@@ -93,10 +93,11 @@ struct object_instance {
 };
 
 struct object_find_instance {
-	struct list_head *find_child_list;
-	struct list_head *child_head;
 	void *object_name;
 	size_t object_len;
+	hdb_handle_t *handles_array;
+	size_t handles_array_size;
+	size_t handles_array_pos;
 };
 
 struct objdb_iface_ver0 objdb_iface;
@@ -342,7 +343,7 @@ static void object_reload_notification(int startstop, int flush)
 	}
 
 	for (list = tmplist.next, tmp = list->next;
-		list != tmplist.prev; list = tmp, tmp = list->next) {
+		list != &tmplist; list = tmp, tmp = list->next) {
 
 		tracker_pt = list_entry (list, struct object_tracker, object_list);
 
@@ -714,7 +715,7 @@ static int _clear_object(struct object_instance *instance)
 
 		list_del(&find_instance->child_list);
 		free(find_instance->object_name);
-		free(find_instance);
+		hdb_handle_destroy (&object_instance_database, find_instance->object_handle);
 	}
 
 	return 0;
@@ -818,8 +819,13 @@ static int object_find_create (
 	hdb_handle_t *object_find_handle)
 {
 	unsigned int res;
+	struct object_instance *iter_obj_inst;
 	struct object_instance *object_instance;
 	struct object_find_instance *object_find_instance;
+	struct list_head *list;
+	hdb_handle_t *handles_array, *handles_array_realloc;
+	size_t ha_len;
+	size_t ha_used;
 
 	objdb_lock();
 	res = hdb_handle_get (&object_instance_database,
@@ -839,17 +845,59 @@ static int object_find_create (
 		goto error_destroy;
 	}
 
-	object_find_instance->find_child_list = &object_instance->child_head;
-	object_find_instance->child_head = &object_instance->child_head;
 	object_find_instance->object_name = (char *)object_name;
 	object_find_instance->object_len = object_len;
 
+	ha_len = ha_used = 0;
+	handles_array = NULL;
+
+	for (list = object_instance->child_head.next;
+		list != &object_instance->child_head; list = list->next) {
+
+		iter_obj_inst = list_entry (list, struct object_instance,
+			child_list);
+
+		if (object_find_instance->object_len == 0 ||
+			((iter_obj_inst->object_name_len ==
+			  object_find_instance->object_len) &&
+
+			 (memcmp (iter_obj_inst->object_name,
+				  object_find_instance->object_name,
+				  object_find_instance->object_len) == 0))) {
+
+			/*
+			 * Add handle to list
+			 */
+			if (ha_used + 1 > ha_len) {
+				ha_len = ha_len * 2 + 1;
+				if ((handles_array_realloc =
+				    realloc (handles_array, ha_len * sizeof (hdb_handle_t))) ==
+				    NULL) {
+					goto error_ha_free;
+				}
+				handles_array = handles_array_realloc;
+			}
+
+			handles_array[ha_used] =
+			    iter_obj_inst->object_handle;
+
+			ha_used++;
+		}
+	}
+
+	object_find_instance->handles_array_size = ha_used;
+	object_find_instance->handles_array_pos = 0;
+	object_find_instance->handles_array = handles_array;
+
 	hdb_handle_put (&object_instance_database, object_handle);
 	hdb_handle_put (&object_find_instance_database, *object_find_handle);
 
 	objdb_unlock();
 	return (0);
 
+error_ha_free:
+	free(handles_array);
+
 error_destroy:
 	hdb_handle_destroy (&object_instance_database, *object_find_handle);
 
@@ -868,8 +916,8 @@ static int object_find_next (
 	unsigned int res;
 	struct object_find_instance *object_find_instance;
 	struct object_instance *object_instance = NULL;
-	struct list_head *list;
 	unsigned int found = 0;
+        size_t pos;
 
 	objdb_lock();
 	res = hdb_handle_get (&object_find_instance_database,
@@ -877,12 +925,16 @@ static int object_find_next (
 	if (res != 0) {
 		goto error_exit;
 	}
-	res = -1;
-	for (list = object_find_instance->find_child_list->next;
-		list != object_find_instance->child_head; list = list->next) {
 
-		object_instance = list_entry (list, struct object_instance,
-			child_list);
+	for (pos = object_find_instance->handles_array_pos; !found &&
+	    pos < object_find_instance->handles_array_size; pos++) {
+		*object_handle = object_find_instance->handles_array[pos];
+
+		res = hdb_handle_get (&object_instance_database,
+			*object_handle, (void *)&object_instance);
+		if (res != 0) {
+			continue;
+		}
 
 		if (object_find_instance->object_len == 0 ||
 			((object_instance->object_name_len ==
@@ -893,17 +945,16 @@ static int object_find_next (
 				  object_find_instance->object_len) == 0))) {
 
 			found = 1;
-			break;
 		}
+
+		hdb_handle_put (&object_instance_database, *object_handle);
 	}
-	object_find_instance->find_child_list = list;
+
+	object_find_instance->handles_array_pos = pos;
+
 	hdb_handle_put (&object_find_instance_database, object_find_handle);
-	if (found) {
-		*object_handle = object_instance->object_handle;
-		res = 0;
-	}
 	objdb_unlock();
-	return (res);
+	return (found ? 0 : -1);
 
 error_exit:
 	objdb_unlock();
@@ -922,6 +973,9 @@ static int object_find_destroy (
 	if (res != 0) {
 		goto error_exit;
 	}
+
+	free(object_find_instance->handles_array);
+
 	hdb_handle_put(&object_find_instance_database, object_find_handle);
 	hdb_handle_destroy(&object_find_instance_database, object_find_handle);
 
diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index 7a30afd..80ca182 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -73,15 +73,17 @@
 #define JOIN_TIMEOUT				50
 #define MERGE_TIMEOUT				200
 #define DOWNCHECK_TIMEOUT			1000
-#define FAIL_TO_RECV_CONST			50
+#define FAIL_TO_RECV_CONST			2500
 #define	SEQNO_UNCHANGED_CONST			30
 #define MINIMUM_TIMEOUT				(int)(1000/HZ)*3
 #define MAX_NETWORK_DELAY			50
 #define WINDOW_SIZE				50
 #define MAX_MESSAGES				17
+#define MISS_COUNT_CONST			5
 #define RRP_PROBLEM_COUNT_TIMEOUT		2000
 #define RRP_PROBLEM_COUNT_THRESHOLD_DEFAULT	10
 #define RRP_PROBLEM_COUNT_THRESHOLD_MIN		5
+#define RRP_AUTORECOVERY_CHECK_TIMEOUT		1000
 
 static char error_string_response[512];
 static struct objdb_iface_ver0 *global_objdb;
@@ -211,14 +213,18 @@ static void totem_volatile_config_read (
 
 	objdb_get_int (objdb,object_totem_handle, "rrp_problem_count_threshold", &totem_config->rrp_problem_count_threshold);
 
+	objdb_get_int (objdb,object_totem_handle, "rrp_autorecovery_check_timeout", &totem_config->rrp_autorecovery_check_timeout);
+
 	objdb_get_int (objdb,object_totem_handle, "heartbeat_failures_allowed", &totem_config->heartbeat_failures_allowed);
 
 	objdb_get_int (objdb,object_totem_handle, "max_network_delay", &totem_config->max_network_delay);
 
 	objdb_get_int (objdb,object_totem_handle, "window_size", &totem_config->window_size);
-	objdb_get_string (objdb, object_totem_handle, "vsftype", &totem_config->vsf_type);
+	(void)objdb_get_string (objdb, object_totem_handle, "vsftype", &totem_config->vsf_type);
 
 	objdb_get_int (objdb,object_totem_handle, "max_messages", &totem_config->max_messages);
+
+	objdb_get_int (objdb,object_totem_handle, "miss_count_const", &totem_config->miss_count_const);
 }
 
 
@@ -370,8 +376,6 @@ printf ("couldn't find totem handle\n");
 					&totem_config->interfaces[ringnumber].mcast_addr,
 					"255.255.255.255", 0);
 			}
-
-
 		}
 
 		/*
@@ -389,6 +393,15 @@ printf ("couldn't find totem handle\n");
 			res = totemip_parse (&totem_config->interfaces[ringnumber].bindnet, str,
 					     totem_config->interfaces[ringnumber].mcast_addr.family);
 		}
+
+		/*
+		 * Get the TTL
+		 */
+		totem_config->interfaces[ringnumber].ttl = 1;
+		if (!objdb_get_string (objdb, object_interface_handle, "ttl", &str)) {
+			totem_config->interfaces[ringnumber].ttl = atoi (str);
+		}
+
 		objdb->object_find_create (
 			object_interface_handle,
 			"member",
@@ -413,7 +426,8 @@ printf ("couldn't find totem handle\n");
 	add_totem_config_notification(objdb, totem_config, object_totem_handle);
 
 	totem_config->transport_number = TOTEM_TRANSPORT_UDP;
-	objdb_get_string (objdb, object_totem_handle, "transport", &transport_type);
+	(void)objdb_get_string (objdb, object_totem_handle, "transport", &transport_type);
+
 	if (transport_type) {
 		if (strcmp (transport_type, "udpu") == 0) {
 			totem_config->transport_number = TOTEM_TRANSPORT_UDPU;
@@ -463,6 +477,16 @@ int totem_config_validate (
 			goto parse_error;
 		}
 
+		if (totem_config->interfaces[i].ttl > 255) {
+			error_reason = "Invalid TTL (should be 0..255)";
+			goto parse_error;
+		}
+		if (totem_config->transport_number != TOTEM_TRANSPORT_UDP &&
+		    totem_config->interfaces[i].ttl != 1) {
+			error_reason = "Can only set ttl on multicast transport types";
+			goto parse_error;
+		}
+
 		if (totem_config->interfaces[i].mcast_addr.family == AF_INET6 &&
 			totem_config->node_id == 0) {
 
@@ -538,6 +562,10 @@ int totem_config_validate (
 		totem_config->max_messages = MAX_MESSAGES;
 	}
 
+	if (totem_config->miss_count_const == 0) {
+		totem_config->miss_count_const = MISS_COUNT_CONST;
+	}
+
 	if (totem_config->token_timeout < MINIMUM_TIMEOUT) {
 		snprintf (local_error_reason, sizeof(local_error_reason),
 			"The token timeout parameter (%d ms) may not be less then (%d ms).",
@@ -657,6 +685,10 @@ int totem_config_validate (
 		goto parse_error;
 	}
 
+	if (totem_config->rrp_autorecovery_check_timeout == 0) {
+		totem_config->rrp_autorecovery_check_timeout = RRP_AUTORECOVERY_CHECK_TIMEOUT;
+	}
+
 	if (strcmp (totem_config->rrp_mode, "none") == 0) {
 		interface_max = 1;
 	}
@@ -720,13 +752,14 @@ static int read_keyfile (
 	ssize_t expected_key_len = sizeof (totem_config->private_key);
 	int saved_errno;
 	char error_str[100];
+	const char *error_ptr;
 
 	fd = open (key_location, O_RDONLY);
 	if (fd == -1) {
-		strerror_r (errno, error_str, 100);
+		LOGSYS_STRERROR_R (error_ptr, errno, error_str, sizeof(error_str));
 		snprintf (error_string_response, sizeof(error_string_response),
 			"Could not open %s: %s\n",
-			 key_location, error_str);
+			 key_location, error_ptr);
 		goto parse_error;
 	}
 
@@ -735,10 +768,10 @@ static int read_keyfile (
 	close (fd);
 
 	if (res == -1) {
-		strerror_r (errno, error_str, 100);
+		LOGSYS_STRERROR_R (error_ptr, saved_errno, error_str, sizeof(error_str));
 		snprintf (error_string_response, sizeof(error_string_response),
 			"Could not read %s: %s\n",
-			 key_location, error_str);
+			 key_location, error_ptr);
 		goto parse_error;
 	}
 
diff --git a/exec/totemiba.c b/exec/totemiba.c
index a0379ff..4185f16 100644
--- a/exec/totemiba.c
+++ b/exec/totemiba.c
@@ -271,6 +271,7 @@ static inline struct send_buf *mcast_send_buf_get (
 		2048, IBV_ACCESS_LOCAL_WRITE);
 	if (send_buf->mr == NULL) {
 		log_printf (LOGSYS_LEVEL_ERROR, "couldn't register memory range\n");
+		free (send_buf);
 		return (NULL);
 	}
 	list_init (&send_buf->list_all);
@@ -307,6 +308,7 @@ static inline struct send_buf *token_send_buf_get (
 		2048, IBV_ACCESS_LOCAL_WRITE);
 	if (send_buf->mr == NULL) {
 		log_printf (LOGSYS_LEVEL_ERROR, "couldn't register memory range\n");
+		free (send_buf);
 		return (NULL);
 	}
 	list_init (&send_buf->list_all);
diff --git a/exec/totemip.c b/exec/totemip.c
index d6bb34a..f3c3d96 100644
--- a/exec/totemip.c
+++ b/exec/totemip.c
@@ -132,8 +132,10 @@ int32_t totemip_is_mcast(struct totem_ip_address *ip_addr)
 {
 	uint32_t addr = 0;
 
+	memcpy (&addr, ip_addr->addr, sizeof (uint32_t));
+
 	if (ip_addr->family == AF_INET) {
-		addr = ntohl(*(int32_t*)ip_addr->addr);
+		addr = ntohl(addr);
 		if ((addr >> 28) != 0xE) {
 			return -1;
 		}
diff --git a/exec/totempg.c b/exec/totempg.c
index fb21695..0ec542c 100644
--- a/exec/totempg.c
+++ b/exec/totempg.c
@@ -115,6 +115,12 @@ struct totempg_mcast_header {
 	short type;
 };
 
+#if !(defined(__i386__) || defined(__x86_64__))
+/*
+ * Need align on architectures different then i386 or x86_64
+ */
+#define TOTEMPG_NEED_ALIGN 1
+#endif
 
 /*
  * totempg_mcast structure
@@ -374,8 +380,9 @@ static inline void group_endian_convert (
 	int i;
 	char *aligned_msg;
 
+#ifdef TOTEMPG_NEED_ALIGN
 	/*
-	 * Align data structure for sparc and ia64
+	 * Align data structure for not i386 or x86_64
 	 */
 	if ((size_t)msg % 4 != 0) {
 		aligned_msg = alloca(msg_len);
@@ -383,6 +390,9 @@ static inline void group_endian_convert (
 	} else {
 		aligned_msg = msg;
 	}
+#else
+	aligned_msg = msg;
+#endif
 
 	group_len = (unsigned short *)aligned_msg;
 	group_len[0] = swab16(group_len[0]);
@@ -406,12 +416,15 @@ static inline int group_matches (
 	char *group_name;
 	int i;
 	int j;
+#ifdef TOTEMPG_NEED_ALIGN
         struct iovec iovec_aligned = { NULL, 0 };
+#endif
 
 	assert (iov_len == 1);
 
+#ifdef TOTEMPG_NEED_ALIGN
 	/*
-	 * Align data structure for sparc and ia64
+	 * Align data structure for not i386 or x86_64
 	 */
 	if ((size_t)iovec->iov_base % 4 != 0) {
 		iovec_aligned.iov_base = alloca(iovec->iov_len);
@@ -419,7 +432,7 @@ static inline int group_matches (
 		iovec_aligned.iov_len = iovec->iov_len;
 		iovec = &iovec_aligned;
 	}
-
+#endif
 
 	group_len = (unsigned short *)iovec->iov_base;
 	group_name = ((char *)iovec->iov_base) +
@@ -469,15 +482,24 @@ static inline void app_deliver_fn (
 		group_endian_convert (msg, msg_len);
 	}
 
-/*
- * TODO This function needs to be rewritten for proper alignment to avoid 3+ memory copies
- */
 	/*
-	 * Align data structure for sparc and ia64
+	 * TODO: segmentation/assembly need to be redesigned to provide aligned access
+	 * in all cases to avoid memory copies on non386 archs. Probably broke backwars
+	 * compatibility
+	 */
+
+#ifdef TOTEMPG_NEED_ALIGN
+	/*
+	 * Align data structure for not i386 or x86_64
 	 */
 	aligned_iovec.iov_base = alloca(msg_len);
 	aligned_iovec.iov_len = msg_len;
 	memcpy(aligned_iovec.iov_base, msg, msg_len);
+#else
+	aligned_iovec.iov_base = msg;
+	aligned_iovec.iov_len = msg_len;
+#endif
+
 	iovec = &aligned_iovec;
 
 	for (i = 0; i <= totempg_max_handle; i++) {
@@ -489,8 +511,9 @@ static inline void app_deliver_fn (
 				stripped_iovec.iov_len = iovec->iov_len - adjust_iovec;
 				stripped_iovec.iov_base = (char *)iovec->iov_base + adjust_iovec;
 
+#ifdef TOTEMPG_NEED_ALIGN
 				/*
-				 * Align data structure for sparc and ia64
+				 * Align data structure for not i386 or x86_64
 				 */
 				if ((char *)iovec->iov_base + adjust_iovec % 4 != 0) {
 					/*
@@ -502,7 +525,7 @@ static inline void app_deliver_fn (
 						 (char *)iovec->iov_base + adjust_iovec,
 						stripped_iovec.iov_len);
 				}
-
+#endif
 				instance->deliver_fn (
 					nodeid,
 					stripped_iovec.iov_base,
@@ -933,6 +956,7 @@ static int msg_count_send_ok (
 	int avail = 0;
 
 	avail = totemmrp_avail ();
+	totempg_stats.msg_queue_avail = avail;
 
 	return ((avail - totempg_reserved) > msg_count);
 }
@@ -957,6 +981,7 @@ static int send_reserve (
 
 	msg_count = (msg_size / (totempg_totem_config->net_mtu - sizeof (struct totempg_mcast) - 16)) + 1;
 	totempg_reserved += msg_count;
+	totempg_stats.msg_reserved = totempg_reserved;
 
 	return (msg_count);
 }
@@ -965,6 +990,7 @@ static void send_release (
 	int msg_count)
 {
 	totempg_reserved -= msg_count;
+	totempg_stats.msg_reserved = totempg_reserved;
 }
 
 int totempg_callback_token_create (
diff --git a/exec/totemrrp.c b/exec/totemrrp.c
index a8ebd08..83292ad 100644
--- a/exec/totemrrp.c
+++ b/exec/totemrrp.c
@@ -162,7 +162,8 @@ struct rrp_algo {
 		unsigned int iface_no);
 
 	void (*ring_reenable) (
-		struct totemrrp_instance *instance);
+		struct totemrrp_instance *instance,
+		unsigned int iface_no);
 
 	int (*mcast_recv_empty) (
 		struct totemrrp_instance *instance);
@@ -240,7 +241,13 @@ struct totemrrp_instance {
 
 	int processor_count;
 
+	int my_nodeid;
+
 	struct totem_config *totem_config;
+
+	void *deliver_fn_context[INTERFACE_MAX];
+
+	poll_timer_handle timer_active_test_ring_timeout[INTERFACE_MAX];
 };
 
 /*
@@ -295,7 +302,8 @@ static void none_token_target_set (
 	unsigned int iface_no);
 
 static void none_ring_reenable (
-	struct totemrrp_instance *instance);
+	struct totemrrp_instance *instance,
+	unsigned int iface_no);
 
 static int none_mcast_recv_empty (
 	struct totemrrp_instance *instance);
@@ -333,6 +341,11 @@ static void passive_mcast_flush_send (
 	const void *msg,
 	unsigned int msg_len);
 
+static void passive_monitor (
+	struct totemrrp_instance *rrp_instance,
+	unsigned int iface_no,
+	int is_token_recv_count);
+
 static void passive_token_recv (
 	struct totemrrp_instance *instance,
 	unsigned int iface_no,
@@ -365,7 +378,8 @@ static void passive_token_target_set (
 	unsigned int iface_no);
 
 static void passive_ring_reenable (
-	struct totemrrp_instance *instance);
+	struct totemrrp_instance *instance,
+	unsigned int iface_no);
 
 static int passive_mcast_recv_empty (
 	struct totemrrp_instance *instance);
@@ -435,7 +449,8 @@ static void active_token_target_set (
 	unsigned int iface_no);
 
 static void active_ring_reenable (
-	struct totemrrp_instance *instance);
+	struct totemrrp_instance *instance,
+	unsigned int iface_no);
 
 static int active_mcast_recv_empty (
 	struct totemrrp_instance *instance);
@@ -462,6 +477,52 @@ static void active_timer_problem_decrementer_start (
 static void active_timer_problem_decrementer_cancel (
 	struct active_instance *active_instance);
 
+/*
+ * 0-5 reserved for totemsrp.c
+ */
+#define MESSAGE_TYPE_RING_TEST_ACTIVE		6
+#define MESSAGE_TYPE_RING_TEST_ACTIVATE		7
+
+#define ENDIAN_LOCAL				0xff22
+
+/*
+ * Rollover handling:
+ *
+ * ARR_SEQNO_START_TOKEN is the starting sequence number of last seen sequence
+ * for a token for active redundand ring.  This should remain zero, unless testing
+ * overflow in which case 07fffff00 or 0xffffff00 are good starting values.
+ * It should be same as on defined in totemsrp.c
+ */
+
+#define ARR_SEQNO_START_TOKEN 0x0
+
+/*
+ * These can be used ot test different rollover points
+ * #define ARR_SEQNO_START_MSG 0xfffffe00
+ */
+
+/*
+ * Threshold value when recv_count for passive rrp should be adjusted.
+ * Set this value to some smaller for testing of adjusting proper
+ * functionality. Also keep in mind that this value must be smaller
+ * then rrp_problem_count_threshold
+ */
+#define PASSIVE_RECV_COUNT_THRESHOLD		(INT_MAX / 2)
+
+struct message_header {
+	char type;
+	char encapsulated;
+	unsigned short endian_detector;
+	int ring_number;
+	int nodeid_activator;
+} __attribute__((packed));
+
+struct deliver_fn_context {
+	struct totemrrp_instance *instance;
+	void *context;
+	int iface_no;
+};
+
 struct rrp_algo none_algo = {
 	.name			= "none",
 	.initialize		= NULL,
@@ -537,6 +598,47 @@ do {									\
 		format, ##args);					\
 } while (0);
 
+static void test_active_msg_endian_convert(const struct message_header *in, struct message_header *out)
+{
+	out->type = in->type;
+	out->encapsulated = in->encapsulated;
+	out->endian_detector = ENDIAN_LOCAL;
+	out->ring_number = swab32 (in->ring_number);
+	out->nodeid_activator = swab32(in->nodeid_activator);
+}
+
+static void timer_function_test_ring_timeout (void *context)
+{
+	struct deliver_fn_context *deliver_fn_context = (struct deliver_fn_context *)context;
+	struct totemrrp_instance *rrp_instance = deliver_fn_context->instance;
+	unsigned int *faulty = NULL;
+	int iface_no = deliver_fn_context->iface_no;
+	struct message_header msg = {
+		.type = MESSAGE_TYPE_RING_TEST_ACTIVE,
+		.endian_detector = ENDIAN_LOCAL,
+	};
+
+	if (strcmp(rrp_instance->totem_config->rrp_mode, "active") == 0)
+		faulty = ((struct active_instance *)(rrp_instance->rrp_algo_instance))->faulty;
+	if (strcmp(rrp_instance->totem_config->rrp_mode, "passive") == 0)
+		faulty = ((struct passive_instance *)(rrp_instance->rrp_algo_instance))->faulty;
+
+	assert (faulty != NULL);
+
+	if (faulty[iface_no] == 1) {
+		msg.ring_number = iface_no;
+		msg.nodeid_activator = rrp_instance->my_nodeid;
+		totemnet_token_send (
+			rrp_instance->net_handles[iface_no],
+			&msg, sizeof (struct message_header));
+		poll_timer_add (rrp_instance->poll_handle,
+			rrp_instance->totem_config->rrp_autorecovery_check_timeout,
+			(void *)deliver_fn_context,
+			timer_function_test_ring_timeout,
+			&rrp_instance->timer_active_test_ring_timeout[iface_no]);
+	}
+}
+
 /*
  * None Replication Implementation
  */
@@ -626,7 +728,8 @@ static void none_token_target_set (
 }
 
 static void none_ring_reenable (
-	struct totemrrp_instance *instance)
+	struct totemrrp_instance *instance,
+	unsigned int iface_no)
 {
 	/*
 	 * No operation
@@ -771,54 +874,102 @@ static void passive_timer_problem_decrementer_cancel (
 }
 */
 
-
-static void passive_mcast_recv (
+/*
+ * Monitor function implementation from rrp paper.
+ * rrp_instance is passive rrp instance, iface_no is interface with received messgae/token and
+ * is_token_recv_count is boolean variable which donates if message is token (>1) or regular
+ * message (= 0)
+ */
+static void passive_monitor (
 	struct totemrrp_instance *rrp_instance,
 	unsigned int iface_no,
-	void *context,
-	const void *msg,
-	unsigned int msg_len)
+	int is_token_recv_count)
 {
 	struct passive_instance *passive_instance = (struct passive_instance *)rrp_instance->rrp_algo_instance;
+	unsigned int *recv_count;
 	unsigned int max;
 	unsigned int i;
-
-	rrp_instance->totemrrp_deliver_fn (
-		context,
-		msg,
-		msg_len);
-
-	if (rrp_instance->totemrrp_msgs_missing() == 0 &&
-		passive_instance->timer_expired_token) {
-		/*
-		 * Delivers the last token
-		 */
-		rrp_instance->totemrrp_deliver_fn (
-			passive_instance->totemrrp_context,
-			passive_instance->token,
-			passive_instance->token_len);
-		passive_timer_expired_token_cancel (passive_instance);
-	}
+	unsigned int min_all, min_active;
 
 	/*
 	 * Monitor for failures
-	 * TODO doesn't handle wrap-around of the mcast recv count
 	 */
-	passive_instance->mcast_recv_count[iface_no] += 1;
+	if (is_token_recv_count) {
+		recv_count = passive_instance->token_recv_count;
+	} else {
+		recv_count = passive_instance->mcast_recv_count;
+	}
+
+	recv_count[iface_no] += 1;
+
 	max = 0;
 	for (i = 0; i < rrp_instance->interface_count; i++) {
-		if (max < passive_instance->mcast_recv_count[i]) {
-			max = passive_instance->mcast_recv_count[i];
+		if (max < recv_count[i]) {
+			max = recv_count[i];
+		}
+	}
+
+	/*
+	 * Max is larger then threshold -> start adjusting process
+	 */
+	if (max > PASSIVE_RECV_COUNT_THRESHOLD) {
+		min_all = min_active = recv_count[iface_no];
+
+		for (i = 0; i < rrp_instance->interface_count; i++) {
+			if (recv_count[i] < min_all) {
+				min_all = recv_count[i];
+			}
+
+			if (passive_instance->faulty[i] == 0 &&
+			    recv_count[i] < min_active) {
+				min_active = recv_count[i];
+			}
+		}
+
+		if (min_all > 0) {
+			/*
+			 * There is one or more faulty device with recv_count > 0
+			 */
+			for (i = 0; i < rrp_instance->interface_count; i++) {
+				recv_count[i] -= min_all;
+			}
+		} else {
+			/*
+			 * No faulty device with recv_count > 0, adjust only active
+			 * devices
+			 */
+			for (i = 0; i < rrp_instance->interface_count; i++) {
+				if (passive_instance->faulty[i] == 0) {
+					recv_count[i] -= min_active;
+				}
+			}
+		}
+
+		/*
+		 * Find again max
+		 */
+		max = 0;
+
+		for (i = 0; i < rrp_instance->interface_count; i++) {
+			if (max < recv_count[i]) {
+				max = recv_count[i];
+			}
 		}
 	}
 
 	for (i = 0; i < rrp_instance->interface_count; i++) {
 		if ((passive_instance->faulty[i] == 0) &&
-			(max - passive_instance->mcast_recv_count[i] >
+			(max - recv_count[i] >
 			rrp_instance->totem_config->rrp_problem_count_threshold)) {
 			passive_instance->faulty[i] = 1;
+			poll_timer_add (rrp_instance->poll_handle,
+				rrp_instance->totem_config->rrp_autorecovery_check_timeout,
+				rrp_instance->deliver_fn_context[i],
+				timer_function_test_ring_timeout,
+				&rrp_instance->timer_active_test_ring_timeout[i]);
+
 			sprintf (rrp_instance->status[i],
-				"Marking ringid %u interface %s FAULTY - adminisrtative intervention required.",
+				"Marking ringid %u interface %s FAULTY",
 				i,
 				totemnet_iface_print (rrp_instance->net_handles[i]));
 			log_printf (
@@ -829,6 +980,35 @@ static void passive_mcast_recv (
 	}
 }
 
+static void passive_mcast_recv (
+	struct totemrrp_instance *rrp_instance,
+	unsigned int iface_no,
+	void *context,
+	const void *msg,
+	unsigned int msg_len)
+{
+	struct passive_instance *passive_instance = (struct passive_instance *)rrp_instance->rrp_algo_instance;
+
+	rrp_instance->totemrrp_deliver_fn (
+		context,
+		msg,
+		msg_len);
+
+	if (rrp_instance->totemrrp_msgs_missing() == 0 &&
+		passive_instance->timer_expired_token) {
+		/*
+		 * Delivers the last token
+		 */
+		rrp_instance->totemrrp_deliver_fn (
+			passive_instance->totemrrp_context,
+			passive_instance->token,
+			passive_instance->token_len);
+		passive_timer_expired_token_cancel (passive_instance);
+	}
+
+	passive_monitor (rrp_instance, iface_no, 0);
+}
+
 static void passive_mcast_flush_send (
 	struct totemrrp_instance *instance,
 	const void *msg,
@@ -867,8 +1047,6 @@ static void passive_token_recv (
 	unsigned int token_seq)
 {
 	struct passive_instance *passive_instance = (struct passive_instance *)rrp_instance->rrp_algo_instance;
-	unsigned int max;
-	unsigned int i;
 
 	passive_instance->totemrrp_context = context; // this should be in totemrrp_instance ? TODO
 
@@ -883,34 +1061,7 @@ static void passive_token_recv (
 
 	}
 
-	/*
-	 * Monitor for failures
-	 * TODO doesn't handle wrap-around of the token
-	 */
-	passive_instance->token_recv_count[iface_no] += 1;
-	max = 0;
-	for (i = 0; i < rrp_instance->interface_count; i++) {
-		if (max < passive_instance->token_recv_count[i]) {
-			max = passive_instance->token_recv_count[i];
-		}
-	}
-
-	for (i = 0; i < rrp_instance->interface_count; i++) {
-		if ((passive_instance->faulty[i] == 0) &&
-			(max - passive_instance->token_recv_count[i] >
-			rrp_instance->totem_config->rrp_problem_count_threshold)) {
-			passive_instance->faulty[i] = 1;
-			sprintf (rrp_instance->status[i],
-				"Marking seqid %d ringid %u interface %s FAULTY - adminisrtative intervention required.",
-				token_seq,
-				i,
-				totemnet_iface_print (rrp_instance->net_handles[i]));
-			log_printf (
-				rrp_instance->totemrrp_log_level_error,
-				"%s",
-				rrp_instance->status[i]);
-		}
-	}
+	passive_monitor (rrp_instance, iface_no, 1);
 }
 
 static void passive_token_send (
@@ -1035,7 +1186,8 @@ static int passive_member_remove (
 
 
 static void passive_ring_reenable (
-	struct totemrrp_instance *instance)
+	struct totemrrp_instance *instance,
+	unsigned int iface_no)
 {
 	struct passive_instance *rrp_algo_instance = (struct passive_instance *)instance->rrp_algo_instance;
 
@@ -1043,8 +1195,13 @@ static void passive_ring_reenable (
 		instance->interface_count);
 	memset (rrp_algo_instance->token_recv_count, 0, sizeof (unsigned int) *
 		instance->interface_count);
-	memset (rrp_algo_instance->faulty, 0, sizeof (unsigned int) *
-		instance->interface_count);
+
+	if (iface_no == instance->interface_count) {
+		memset (rrp_algo_instance->faulty, 0, sizeof (unsigned int) *
+			instance->interface_count);
+	} else {
+		rrp_algo_instance->faulty[iface_no] = 0;
+	}
 }
 
 /*
@@ -1095,6 +1252,8 @@ void *active_instance_initialize (
 
 	instance->rrp_instance = rrp_instance;
 
+	instance->last_token_seq = ARR_SEQNO_START_TOKEN - 1;
+
 error_exit:
 	return ((void *)instance);
 }
@@ -1161,8 +1320,14 @@ static void timer_function_active_token_expired (void *context)
 		if (active_instance->counter_problems[i] >= rrp_instance->totem_config->rrp_problem_count_threshold)
 		{
 			active_instance->faulty[i] = 1;
+			poll_timer_add (rrp_instance->poll_handle,
+				rrp_instance->totem_config->rrp_autorecovery_check_timeout,
+				rrp_instance->deliver_fn_context[i],
+				timer_function_test_ring_timeout,
+				&rrp_instance->timer_active_test_ring_timeout[i]);
+
 			sprintf (rrp_instance->status[i],
-				"Marking seqid %d ringid %u interface %s FAULTY - adminisrtative intervention required.",
+				"Marking seqid %d ringid %u interface %s FAULTY",
 				active_instance->last_token_seq,
 				i,
 				totemnet_iface_print (rrp_instance->net_handles[i]));
@@ -1266,7 +1431,7 @@ static void active_mcast_noflush_send (
 }
 
 static void active_token_recv (
-	struct totemrrp_instance *instance,
+	struct totemrrp_instance *rrp_instance,
 	unsigned int iface_no,
 	void *context,
 	const void *msg,
@@ -1274,13 +1439,13 @@ static void active_token_recv (
 	unsigned int token_seq)
 {
 	int i;
-	struct active_instance *active_instance = (struct active_instance *)instance->rrp_algo_instance;
+	struct active_instance *active_instance = (struct active_instance *)rrp_instance->rrp_algo_instance;
 
-	active_instance->totemrrp_context = context; // this should be in totemrrp_instance ?
-	if (token_seq > active_instance->last_token_seq) {
+	active_instance->totemrrp_context = context;
+	if (sq_lt_compare (active_instance->last_token_seq, token_seq)) {
 		memcpy (active_instance->token, msg, msg_len);
 		active_instance->token_len = msg_len;
-		for (i = 0; i < instance->interface_count; i++) {
+		for (i = 0; i < rrp_instance->interface_count; i++) {
 			active_instance->last_token_recv[i] = 0;
 		}
 
@@ -1288,11 +1453,15 @@ static void active_token_recv (
 		active_timer_expired_token_start (active_instance);
 	}
 
+	/*
+	 * This doesn't follow spec because the spec assumes we will know
+	 * when token resets occur.
+	 */
 	active_instance->last_token_seq = token_seq;
 
 	if (token_seq == active_instance->last_token_seq) {
 		active_instance->last_token_recv[iface_no] = 1;
-		for (i = 0; i < instance->interface_count; i++) {
+		for (i = 0; i < rrp_instance->interface_count; i++) {
 			if ((active_instance->last_token_recv[i] == 0) &&
 				active_instance->faulty[i] == 0) {
 				return; /* don't deliver token */
@@ -1300,7 +1469,7 @@ static void active_token_recv (
 		}
 		active_timer_expired_token_cancel (active_instance);
 
-		instance->totemrrp_deliver_fn (
+		rrp_instance->totemrrp_deliver_fn (
 			context,
 			msg,
 			msg_len);
@@ -1429,24 +1598,25 @@ static int active_mcast_recv_empty (
 }
 
 static void active_ring_reenable (
-	struct totemrrp_instance *instance)
+	struct totemrrp_instance *instance,
+	unsigned int iface_no)
 {
 	struct active_instance *rrp_algo_instance = (struct active_instance *)instance->rrp_algo_instance;
 
-	memset (rrp_algo_instance->last_token_recv, 0, sizeof (unsigned int) *
-		instance->interface_count);
-	memset (rrp_algo_instance->faulty, 0, sizeof (unsigned int) *
-		instance->interface_count);
-	memset (rrp_algo_instance->counter_problems, 0, sizeof (unsigned int) *
-		instance->interface_count);
+	if (iface_no == instance->interface_count) {
+		memset (rrp_algo_instance->last_token_recv, 0, sizeof (unsigned int) *
+			instance->interface_count);
+		memset (rrp_algo_instance->faulty, 0, sizeof (unsigned int) *
+			instance->interface_count);
+		memset (rrp_algo_instance->counter_problems, 0, sizeof (unsigned int) *
+			instance->interface_count);
+	} else {
+		rrp_algo_instance->last_token_recv[iface_no] = 0;
+		rrp_algo_instance->faulty[iface_no] = 0;
+		rrp_algo_instance->counter_problems[iface_no] = 0;
+	}
 }
 
-struct deliver_fn_context {
-	struct totemrrp_instance *instance;
-	void *context;
-	int iface_no;
-};
-
 static void totemrrp_instance_initialize (struct totemrrp_instance *instance)
 {
 	memset (instance, 0, sizeof (struct totemrrp_instance));
@@ -1487,18 +1657,71 @@ void rrp_deliver_fn (
 	unsigned int token_is;
 
 	struct deliver_fn_context *deliver_fn_context = (struct deliver_fn_context *)context;
+	struct totemrrp_instance *rrp_instance = deliver_fn_context->instance;
+	const struct message_header *hdr = msg;
+	struct message_header tmp_msg, activate_msg;
+
+	memset(&tmp_msg, 0, sizeof(struct message_header));
+	memset(&activate_msg, 0, sizeof(struct message_header));
 
-	deliver_fn_context->instance->totemrrp_token_seqid_get (
+	rrp_instance->totemrrp_token_seqid_get (
 		msg,
 		&token_seqid,
 		&token_is);
 
+	if (hdr->type == MESSAGE_TYPE_RING_TEST_ACTIVE) {
+		log_printf (
+			rrp_instance->totemrrp_log_level_debug,
+			"received message requesting test of ring now active\n");
+
+		if (hdr->endian_detector != ENDIAN_LOCAL) {
+			test_active_msg_endian_convert(hdr, &tmp_msg);
+			hdr = &tmp_msg;
+		}
+
+		if (hdr->nodeid_activator == rrp_instance->my_nodeid) {
+			/*
+			 * Send an activate message
+			 */
+			activate_msg.type = MESSAGE_TYPE_RING_TEST_ACTIVATE;
+			activate_msg.endian_detector = ENDIAN_LOCAL;
+			activate_msg.ring_number = hdr->ring_number;
+			activate_msg.nodeid_activator = rrp_instance->my_nodeid;
+			totemnet_token_send (
+				rrp_instance->net_handles[deliver_fn_context->iface_no],
+				&activate_msg, sizeof (struct message_header));
+		} else {
+			/*
+			 * Send a ring test message
+			 */
+			totemnet_token_send (
+				rrp_instance->net_handles[deliver_fn_context->iface_no],
+				msg, msg_len);
+		}
+	} else 
+	if (hdr->type == MESSAGE_TYPE_RING_TEST_ACTIVATE) {
+		log_printf (
+			rrp_instance->totemrrp_log_level_notice,
+			"Automatically recovered ring %d\n", hdr->ring_number);
+
+		if (hdr->endian_detector != ENDIAN_LOCAL) {
+			test_active_msg_endian_convert(hdr, &tmp_msg);
+			hdr = &tmp_msg;
+		}
+
+		totemrrp_ring_reenable (rrp_instance, deliver_fn_context->iface_no);
+		if (hdr->nodeid_activator != rrp_instance->my_nodeid) {
+			totemnet_token_send (
+				rrp_instance->net_handles[deliver_fn_context->iface_no],
+				msg, msg_len);
+		}
+	} else 
 	if (token_is) {
 		/*
 		 * Deliver to the token receiver for this rrp algorithm
 		 */
-		deliver_fn_context->instance->rrp_algo->token_recv (
-			deliver_fn_context->instance,
+		rrp_instance->rrp_algo->token_recv (
+			rrp_instance,
 			deliver_fn_context->iface_no,
 			deliver_fn_context->context,
 			msg,
@@ -1508,8 +1731,8 @@ void rrp_deliver_fn (
 		/*
 		 * Deliver to the mcast receiver for this rrp algorithm
 		 */
-		deliver_fn_context->instance->rrp_algo->mcast_recv (
-			deliver_fn_context->instance,
+		rrp_instance->rrp_algo->mcast_recv (
+			rrp_instance,
 			deliver_fn_context->iface_no,
 			deliver_fn_context->context,
 			msg,
@@ -1523,6 +1746,7 @@ void rrp_iface_change_fn (
 {
 	struct deliver_fn_context *deliver_fn_context = (struct deliver_fn_context *)context;
 
+	deliver_fn_context->instance->my_nodeid = iface_addr->nodeid;
 	deliver_fn_context->instance->totemrrp_iface_change_fn (
 		deliver_fn_context->context,
 		iface_addr,
@@ -1643,6 +1867,7 @@ int totemrrp_initialize (
 		deliver_fn_context->instance = instance;
 		deliver_fn_context->context = context;
 		deliver_fn_context->iface_no = i;
+		instance->deliver_fn_context[i] = (void *)deliver_fn_context;
 
 		totemnet_initialize (
 			poll_handle,
@@ -1786,17 +2011,27 @@ int totemrrp_crypto_set (
 }
 
 
+/*
+ * iface_no indicates the interface number [0, ..., interface_count-1] of the
+ * specific ring which will be reenabled. We specify iface_no == interface_count
+ * means reenabling all the rings.
+ */
 int totemrrp_ring_reenable (
-        void *rrp_context)
+        void *rrp_context,
+	unsigned int iface_no)
 {
 	struct totemrrp_instance *instance = (struct totemrrp_instance *)rrp_context;
 	int res = 0;
 	unsigned int i;
 
-	instance->rrp_algo->ring_reenable (instance);
+	instance->rrp_algo->ring_reenable (instance, iface_no);
 
-	for (i = 0; i < instance->interface_count; i++) {
-		sprintf (instance->status[i], "ring %d active with no faults", i);
+	if (iface_no == instance->interface_count) {
+		for (i = 0; i < instance->interface_count; i++) {
+			sprintf (instance->status[i], "ring %d active with no faults", i);
+		}
+	} else {
+		sprintf (instance->status[iface_no], "ring %d active with no faults", iface_no);
 	}
 
 	return (res);
diff --git a/exec/totemrrp.h b/exec/totemrrp.h
index da79ed2..2b4a9c7 100644
--- a/exec/totemrrp.h
+++ b/exec/totemrrp.h
@@ -123,7 +123,8 @@ extern int totemrrp_crypto_set (
 	unsigned int type);
 
 extern int totemrrp_ring_reenable (
-	void *rrp_context);
+	void *rrp_context,
+	unsigned int iface_no);
 
 extern int totemrrp_mcast_recv_empty (
 	void *rrp_context);
diff --git a/exec/totemsrp.c b/exec/totemsrp.c
index f7a6638..fda271c 100644
--- a/exec/totemsrp.c
+++ b/exec/totemsrp.c
@@ -90,6 +90,7 @@
 
 #include "crypto.h"
 #include "tlist.h"
+#include "util.h"
 
 #define LOCALHOST_IP				inet_addr("127.0.0.1")
 #define QUEUE_RTR_ITEMS_SIZE_MAX		16384 /* allow 16384 retransmit items */
@@ -502,9 +503,12 @@ struct totemsrp_instance {
 	struct memb_commit_token *commit_token;
 
 	totemsrp_stats_t stats;
+
+	uint32_t orf_token_discard;
+	
 	void * token_recv_event_handle;
 	void * token_sent_event_handle;
-	char commit_token_storage[9000];
+	char commit_token_storage[40000];
 };
 
 struct message_handlers {
@@ -664,6 +668,8 @@ static void totemsrp_instance_initialize (struct totemsrp_instance *instance)
 
 	instance->my_high_delivered = SEQNO_START_MSG;
 
+	instance->orf_token_discard = 0;
+
 	instance->commit_token = (struct memb_commit_token *)instance->commit_token_storage;
 }
 
@@ -841,6 +847,10 @@ int totemsrp_initialize (
 		totem_config->window_size, totem_config->max_messages);
 
 	log_printf (instance->totemsrp_log_level_debug,
+		"missed count const (%d messages)\n",
+		totem_config->miss_count_const);
+
+	log_printf (instance->totemsrp_log_level_debug,
 		"send threads (%d threads)\n", totem_config->threads);
 	log_printf (instance->totemsrp_log_level_debug,
 		"RRP token expired timeout (%d ms)\n",
@@ -852,6 +862,9 @@ int totemsrp_initialize (
 		"RRP threshold (%d problem count)\n",
 		totem_config->rrp_problem_count_threshold);
 	log_printf (instance->totemsrp_log_level_debug,
+		"RRP automatic recovery check timeout (%d ms)\n",
+		totem_config->rrp_autorecovery_check_timeout);
+	log_printf (instance->totemsrp_log_level_debug,
 		"RRP mode set to %s.\n", instance->totem_config->rrp_mode);
 
 	log_printf (instance->totemsrp_log_level_debug,
@@ -1042,7 +1055,8 @@ int totemsrp_ring_reenable (
 {
 	struct totemsrp_instance *instance = (struct totemsrp_instance *)srp_context;
 
-	totemrrp_ring_reenable (instance->totemrrp_context);
+	totemrrp_ring_reenable (instance->totemrrp_context,
+		instance->totem_config->interface_count);
 
 	return (0);
 }
@@ -1402,18 +1416,13 @@ static void old_ring_state_save (struct totemsrp_instance *instance)
 	}
 }
 
-static void ring_state_restore (struct totemsrp_instance *instance)
+static void old_ring_state_restore (struct totemsrp_instance *instance)
 {
-	if (instance->old_ring_state_saved) {
-		memcpy (&instance->my_ring_id, &instance->my_old_ring_id,
-			sizeof (struct memb_ring_id));
-
-		instance->my_aru = instance->old_ring_state_aru;
-		instance->my_high_seq_received = instance->old_ring_state_high_seq_received;
-		log_printf (instance->totemsrp_log_level_debug,
-			"Restoring instance->my_aru %x my high seq received %x\n",
-			instance->my_aru, instance->my_high_seq_received);
-	}
+	instance->my_aru = instance->old_ring_state_aru;
+	instance->my_high_seq_received = instance->old_ring_state_high_seq_received;
+	log_printf (instance->totemsrp_log_level_debug,
+		"Restoring instance->my_aru %x my high seq received %x\n",
+		instance->my_aru, instance->my_high_seq_received);
 }
 
 static void old_ring_state_reset (struct totemsrp_instance *instance)
@@ -1522,6 +1531,13 @@ static void timer_function_pause_timeout (void *data)
 	reset_pause_timeout (instance);
 }
 
+static void memb_recovery_state_token_loss (struct totemsrp_instance *instance)
+{
+	old_ring_state_restore (instance);
+	memb_state_gather_enter (instance, 5);
+	instance->stats.recovery_token_lost++;
+}
+
 static void timer_function_orf_token_timeout (void *data)
 {
 	struct totemsrp_instance *instance = data;
@@ -1555,9 +1571,8 @@ static void timer_function_orf_token_timeout (void *data)
 		case MEMB_STATE_RECOVERY:
 			log_printf (instance->totemsrp_log_level_debug,
 				"The token was lost in the RECOVERY state.\n");
-			ring_state_restore (instance);
-			memb_state_gather_enter (instance, 5);
-			instance->stats.recovery_token_lost++;
+			memb_recovery_state_token_loss (instance);
+			instance->orf_token_discard = 1;
 			break;
 	}
 }
@@ -1689,6 +1704,8 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance)
 	unsigned int trans_memb_list_totemip[PROCESSOR_COUNT_MAX];
 	unsigned int new_memb_list_totemip[PROCESSOR_COUNT_MAX];
 	unsigned int left_list[PROCESSOR_COUNT_MAX];
+	unsigned int i;
+	unsigned int res;
 
 	memb_consensus_reset (instance);
 
@@ -1763,7 +1780,6 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance)
 	 */
 	sq_copy (&instance->regular_sort_queue, &instance->recovery_sort_queue);
 	instance->my_last_aru = SEQNO_START_MSG;
-	sq_items_release (&instance->regular_sort_queue, SEQNO_START_MSG - 1);
 
 	/* When making my_proc_list smaller, ensure that the
 	 * now non-used entries are zero-ed out. There are some suspect
@@ -1779,8 +1795,21 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance)
 		sizeof (struct srp_addr) * instance->my_memb_entries);
 
 	instance->my_failed_list_entries = 0;
-	instance->my_high_delivered = instance->my_aru;
-// TODO the recovery messages are leaked
+	instance->my_high_delivered = instance->my_high_seq_received;
+
+	for (i = 0; i <= instance->my_high_delivered; i++) {
+		void *ptr;
+
+		res = sq_item_get (&instance->regular_sort_queue, i, &ptr);
+		if (res == 0) {
+			struct sort_queue_item *regular_message;
+
+			regular_message = ptr;
+			free (regular_message->mcast);
+		}
+	}
+	sq_items_release (&instance->regular_sort_queue, instance->my_high_delivered);
+	instance->last_released = instance->my_high_delivered;
 
 	log_printf (instance->totemsrp_log_level_debug,
 		"entering OPERATIONAL state.\n");
@@ -1789,6 +1818,8 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance)
 	instance->memb_state = MEMB_STATE_OPERATIONAL;
 
 	instance->stats.operational_entered++;
+	instance->stats.continuous_gather = 0;
+
 	instance->my_received_flg = 1;
 
 	reset_pause_timeout (instance);
@@ -1808,6 +1839,8 @@ static void memb_state_gather_enter (
 	struct totemsrp_instance *instance,
 	int gather_from)
 {
+	instance->orf_token_discard = 1;
+
 	memb_set_merge (
 		&instance->my_id, 1,
 		instance->my_proc_list, &instance->my_proc_list_entries);
@@ -1854,6 +1887,21 @@ static void memb_state_gather_enter (
 	instance->memb_state = MEMB_STATE_GATHER;
 	instance->stats.gather_entered++;
 
+	if (gather_from == 3) {
+		/*
+		 * State 3 means gather, so we are continuously gathering.
+		 */
+		instance->stats.continuous_gather++;
+	}
+
+	if (instance->stats.continuous_gather > MAX_NO_CONT_GATHER) {
+		log_printf (instance->totemsrp_log_level_warning,
+			"Totem is unable to form a cluster because of an "
+			"operating system or network fault. The most common "
+			"cause of this message is that the local firewall is "
+			"configured improperly.\n");
+	}
+
 	return;
 }
 
@@ -1897,6 +1945,7 @@ static void memb_state_commit_enter (
 	reset_token_timeout (instance); // REVIEWED
 
 	instance->stats.commit_entered++;
+	instance->stats.continuous_gather = 0;
 
 	/*
 	 * reset all flow control variables since we are starting a new ring
@@ -1928,6 +1977,8 @@ static void memb_state_recovery_enter (
 	log_printf (instance->totemsrp_log_level_debug,
 		"entering RECOVERY state.\n");
 
+	instance->orf_token_discard = 0;
+
 	instance->my_high_ring_delivered = 0;
 
 	sq_reinit (&instance->recovery_sort_queue, SEQNO_START_MSG);
@@ -2093,6 +2144,8 @@ originated:
 
 	instance->memb_state = MEMB_STATE_RECOVERY;
 	instance->stats.recovery_entered++;
+	instance->stats.continuous_gather = 0;
+
 	return;
 }
 
@@ -2345,16 +2398,6 @@ static int orf_token_mcast (
 			break;
 		}
 		message_item = (struct message_item *)cs_queue_item_get (mcast_queue);
-		/* preincrement required by algo */
-		if (instance->old_ring_state_saved &&
-			(instance->memb_state == MEMB_STATE_GATHER ||
-			instance->memb_state == MEMB_STATE_COMMIT)) {
-
-			log_printf (instance->totemsrp_log_level_debug,
-				"not multicasting at seqno is %d\n",
-			token->seq);
-			return (0);
-		}
 
 		message_item->mcast->seq = ++token->seq;
 		message_item->mcast->this_seqno = instance->global_seqno++;
@@ -2435,7 +2478,7 @@ static int orf_token_rtr (
 			strcat (retransmit_msg, value);
 		}
 		strcat (retransmit_msg, "\n");
-		log_printf (instance->totemsrp_log_level_debug,
+		log_printf (instance->totemsrp_log_level_notice,
 			"%s", retransmit_msg);
 	}
 
@@ -2501,6 +2544,20 @@ static int orf_token_rtr (
 		res = sq_item_inuse (sort_queue, instance->my_aru + i);
 		if (res == 0) {
 			/*
+			 * Determine how many times we have missed receiving
+			 * this sequence number.  sq_item_miss_count increments
+			 * a counter for the sequence number.  The miss count
+			 * will be returned and compared.  This allows time for
+			 * delayed multicast messages to be received before
+			 * declaring the message is missing and requesting a
+			 * retransmit.
+			 */
+			res = sq_item_miss_count (sort_queue, instance->my_aru + i);
+			if (res < instance->totem_config->miss_count_const) {
+				continue;
+			}
+
+			/*
 			 * Determine if missing message is already in retransmit list
 			 */
 			found = 0;
@@ -2917,7 +2974,7 @@ static void memb_state_commit_token_create (
 
 static void memb_join_message_send (struct totemsrp_instance *instance)
 {
-	char memb_join_data[10000];
+	char memb_join_data[40000];
 	struct memb_join *memb_join = (struct memb_join *)memb_join_data;
 	char *addr;
 	unsigned int addr_idx;
@@ -2969,7 +3026,7 @@ static void memb_join_message_send (struct totemsrp_instance *instance)
 
 static void memb_leave_message_send (struct totemsrp_instance *instance)
 {
-	char memb_join_data[10000];
+	char memb_join_data[40000];
 	struct memb_join *memb_join = (struct memb_join *)memb_join_data;
 	char *addr;
 	unsigned int addr_idx;
@@ -3061,35 +3118,37 @@ static void memb_ring_id_create_or_load (
 	struct memb_ring_id *memb_ring_id)
 {
 	int fd;
-	int res;
-	char filename[256];
-	char error_str[100];
+	int res = 0;
+	char filename[PATH_MAX];
 
 	snprintf (filename, sizeof(filename), "%s/ringid_%s",
 		rundir, totemip_print (&instance->my_id.addr[0]));
 	fd = open (filename, O_RDONLY, 0700);
-	if (fd > 0) {
-		res = read (fd, &memb_ring_id->seq, sizeof (unsigned long long));
-		assert (res == sizeof (unsigned long long));
+	/*
+	 * If file can be opened and read, read the ring id
+	 */
+	if (fd != -1) {
+		res = read (fd, &memb_ring_id->seq, sizeof (uint64_t));
 		close (fd);
-	} else
-	if (fd == -1 && errno == ENOENT) {
+	}
+	/*
+ 	 * If file could not be opened or read, create a new ring id
+ 	 */
+	if ((fd == -1) || (res != sizeof (uint64_t))) {
 		memb_ring_id->seq = 0;
 		umask(0);
 		fd = open (filename, O_CREAT|O_RDWR, 0700);
-		if (fd >= 0) {
-			res = write (fd, &memb_ring_id->seq, sizeof (unsigned long long));
-			assert (res == sizeof (unsigned long long));
+		if (fd != -1) {
+			res = write (fd, &memb_ring_id->seq, sizeof (uint64_t));
 			close (fd);
+			if (res == -1) {
+				LOGSYS_PERROR (errno, instance->totemsrp_log_level_warning,
+					"Couldn't write ringid file '%s'", filename);
+			}
 		} else {
-			strerror_r (errno, error_str, 100);
-			log_printf (instance->totemsrp_log_level_warning,
-				"Couldn't create %s %s\n", filename, error_str);
+			LOGSYS_PERROR (errno, instance->totemsrp_log_level_warning,
+				"Couldn't create ringid file '%s'", filename);
 		}
-	} else {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemsrp_log_level_warning,
-			"Couldn't open %s %s\n", filename, error_str);
 	}
 
 	totemip_copy(&memb_ring_id->rep, &instance->my_id.addr[0]);
@@ -3115,11 +3174,9 @@ static void memb_ring_id_set_and_store (
 		fd = open (filename, O_CREAT|O_RDWR, 0777);
 	}
 	if (fd == -1) {
-		char error_str[100];
-		strerror_r(errno, error_str, 100);
-		log_printf (instance->totemsrp_log_level_warning,
-			"Couldn't store new ring id %llx to stable storage (%s)\n",
-				instance->my_ring_id.seq, error_str);
+		LOGSYS_PERROR(errno, instance->totemsrp_log_level_warning,
+			"Couldn't store new ring id %llx to stable storage",
+			instance->my_ring_id.seq);
 		assert (0);
 		return;
 	}
@@ -3340,6 +3397,9 @@ static int message_handler_orf_token (
 	"Time since last token %0.4f ms\n", ((float)tv_diff) / 1000000.0);
 #endif
 
+	if (instance->orf_token_discard) {
+		return (0);
+	}
 #ifdef TEST_DROP_ORF_TOKEN_PERCENTAGE
 	if (random()%100 < TEST_DROP_ORF_TOKEN_PERCENTAGE) {
 		return (0);
@@ -4182,9 +4242,8 @@ static int message_handler_memb_join (
 
 				memb_join->ring_seq >= instance->my_ring_id.seq) {
 
-				ring_state_restore (instance);
-
 				memb_join_process (instance, memb_join);
+				memb_recovery_state_token_loss (instance);
 				memb_state_gather_enter (instance, 14);
 			}
 			break;
@@ -4307,13 +4366,6 @@ void main_deliver_fn (
 		return;
 	}
 
-	if ((int)message_header->type >= totemsrp_message_handlers.count) {
-		log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong...  ignoring %d.\n", (int)message_header->type);
-printf ("wrong message type\n");
-		instance->stats.rx_msg_dropped++;
-		return;
-	}
-
 	switch (message_header->type) {
 	case MESSAGE_TYPE_ORF_TOKEN:
 		instance->stats.orf_token_rx++;
@@ -4334,7 +4386,10 @@ printf ("wrong message type\n");
 		instance->stats.token_hold_cancel_rx++;
 		break;
 	default:
-		break;
+		log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong...  ignoring %d.\n", (int)message_header->type);
+printf ("wrong message type\n");
+		instance->stats.rx_msg_dropped++;
+		return;
 	}
 	/*
 	 * Handle incoming message
@@ -4366,17 +4421,19 @@ void main_iface_change_fn (
 			"Created or loaded sequence id %lld.%s for this ring.\n",
 			instance->my_ring_id.seq,
 			totemip_print (&instance->my_ring_id.rep));
-		for (i = 0; i < instance->totem_config->interfaces[iface_no].member_count; i++) {
-			totemsrp_member_add (instance,
-				&instance->totem_config->interfaces[iface_no].member_list[i],
-				iface_no);
 
-		}
 		if (instance->totemsrp_service_ready_fn) {
 			instance->totemsrp_service_ready_fn ();
 		}
 
 	}
+
+	for (i = 0; i < instance->totem_config->interfaces[iface_no].member_count; i++) {
+		totemsrp_member_add (instance,
+			&instance->totem_config->interfaces[iface_no].member_list[i],
+			iface_no);
+	}
+
 	if (instance->iface_changes >= instance->totem_config->interface_count) {
 		memb_state_gather_enter (instance, 15);
 	}
diff --git a/exec/totemudp.c b/exec/totemudp.c
index 23d7efb..96849b7 100644
--- a/exec/totemudp.c
+++ b/exec/totemudp.c
@@ -69,6 +69,7 @@
 #include "wthread.h"
 
 #include "crypto.h"
+#include "util.h"
 
 #ifdef HAVE_LIBNSS
 #include <nss.h>
@@ -961,10 +962,8 @@ static inline void ucast_sendmsg (
 	res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_ucast,
 		MSG_NOSIGNAL);
 	if (res < 0) {
-		char error_str[100];
-		strerror_r (errno, error_str, sizeof(error_str));
-		log_printf (instance->totemudp_log_level_debug,
-				"sendmsg(ucast) failed (non-critical): %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+			"sendmsg(ucast) failed (non-critical)");
 	}
 }
 
@@ -1046,10 +1045,8 @@ static inline void mcast_sendmsg (
 	res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast,
 		MSG_NOSIGNAL);
 	if (res < 0) {
-		char error_str[100];
-		strerror_r (errno, error_str, sizeof(error_str));
-		log_printf (instance->totemudp_log_level_debug,
-				"sendmsg(mcast) failed (non-critical): %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+			"sendmsg(mcast) failed (non-critical)");
 	}
 }
 
@@ -1059,7 +1056,7 @@ static void totemudp_mcast_thread_state_constructor (
 	struct totemudp_mcast_thread_state *totemudp_mcast_thread_state =
 		(struct totemudp_mcast_thread_state *)totemudp_mcast_thread_state_in;
 	memset (totemudp_mcast_thread_state, 0,
-		sizeof (totemudp_mcast_thread_state));
+		sizeof (*totemudp_mcast_thread_state));
 
 	rng_make_prng (128, PRNG_SOBER,
 		&totemudp_mcast_thread_state->prng_state, NULL);
@@ -1126,10 +1123,8 @@ static void totemudp_mcast_worker_fn (void *thread_state, void *work_item_in)
 	res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast,
 		MSG_NOSIGNAL);
 	if (res < 0) {
-		char error_str[100];
-		strerror_r (errno, error_str, sizeof(error_str));
-		log_printf (instance->totemudp_log_level_debug,
-				"sendmsg(mcast) failed (non-critical): %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+			"sendmsg(mcast) failed (non-critical)");
 	}
 }
 
@@ -1407,12 +1402,9 @@ static void totemudp_traffic_control_set(struct totemudp_instance *instance, int
 {
 #ifdef SO_PRIORITY
 	int prio = 6; /* TC_PRIO_INTERACTIVE */
-	char error_str[100];
 
 	if (setsockopt(sock, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(int))) {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudp_log_level_warning,
-			"Could not set traffic priority. (%s)\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, "Could not set traffic priority");
     }
 #endif
 }
@@ -1444,17 +1436,16 @@ static int totemudp_build_sockets_ip (
 	 */
 	sockets->mcast_recv = socket (bindnet_address->family, SOCK_DGRAM, 0);
 	if (sockets->mcast_recv == -1) {
-		perror ("socket");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"socket() failed");
 		return (-1);
 	}
 
 	totemip_nosigpipe (sockets->mcast_recv);
 	res = fcntl (sockets->mcast_recv, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudp_log_level_warning,
-			"Could not set non-blocking operation on multicast socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Could not set non-blocking operation on multicast socket");
 		return (-1);
 	}
 
@@ -1463,7 +1454,8 @@ static int totemudp_build_sockets_ip (
 	 */
 	 flag = 1;
 	 if ( setsockopt(sockets->mcast_recv, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) {
-	 	perror("setsockopt reuseaddr");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"setsockopt(SO_REUSEADDR) failed");
 		return (-1);
 	}
 
@@ -1474,7 +1466,8 @@ static int totemudp_build_sockets_ip (
 		instance->totem_interface->ip_port, &sockaddr, &addrlen);
 	res = bind (sockets->mcast_recv, (struct sockaddr *)&sockaddr, addrlen);
 	if (res == -1) {
-		perror ("bind mcast recv socket failed");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"Unable to bind the socket to receive multicast packets");
 		return (-1);
 	}
 
@@ -1483,17 +1476,16 @@ static int totemudp_build_sockets_ip (
 	 */
 	sockets->mcast_send = socket (bindnet_address->family, SOCK_DGRAM, 0);
 	if (sockets->mcast_send == -1) {
-		perror ("socket");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"socket() failed");
 		return (-1);
 	}
 
 	totemip_nosigpipe (sockets->mcast_send);
 	res = fcntl (sockets->mcast_send, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudp_log_level_warning,
-			"Could not set non-blocking operation on multicast socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Could not set non-blocking operation on multicast socket");
 		return (-1);
 	}
 
@@ -1502,7 +1494,8 @@ static int totemudp_build_sockets_ip (
 	 */
 	 flag = 1;
 	 if ( setsockopt(sockets->mcast_send, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) {
-	 	perror("setsockopt reuseaddr");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"setsockopt(SO_REUSEADDR) failed");
 		return (-1);
 	}
 
@@ -1510,7 +1503,8 @@ static int totemudp_build_sockets_ip (
 		&sockaddr, &addrlen);
 	res = bind (sockets->mcast_send, (struct sockaddr *)&sockaddr, addrlen);
 	if (res == -1) {
-		perror ("bind mcast send socket failed");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Unable to bind the socket to send multicast packets");
 		return (-1);
 	}
 
@@ -1519,17 +1513,16 @@ static int totemudp_build_sockets_ip (
 	 */
 	sockets->token = socket (bindnet_address->family, SOCK_DGRAM, 0);
 	if (sockets->token == -1) {
-		perror ("socket2");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"socket() failed");
 		return (-1);
 	}
 
 	totemip_nosigpipe (sockets->token);
 	res = fcntl (sockets->token, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudp_log_level_warning,
-			"Could not set non-blocking operation on token socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Could not set non-blocking operation on token socket");
 		return (-1);
 	}
 
@@ -1538,7 +1531,8 @@ static int totemudp_build_sockets_ip (
 	 */
 	 flag = 1;
 	 if ( setsockopt(sockets->token, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) {
-	 	perror("setsockopt reuseaddr");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"setsockopt(SO_REUSEADDR) failed");
 		return (-1);
 	}
 
@@ -1549,7 +1543,8 @@ static int totemudp_build_sockets_ip (
 	totemip_totemip_to_sockaddr_convert(bound_to, instance->totem_interface->ip_port, &sockaddr, &addrlen);
 	res = bind (sockets->token, (struct sockaddr *)&sockaddr, addrlen);
 	if (res == -1) {
-		perror ("bind token socket failed");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Unable to bind UDP unicast socket");
 		return (-1);
 	}
 
@@ -1584,12 +1579,14 @@ static int totemudp_build_sockets_ip (
 
 		if ((setsockopt(sockets->mcast_recv, SOL_SOCKET,
 			SO_BROADCAST, &broadcast, sizeof (broadcast))) == -1) {
-			perror("setting broadcast option");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"setting broadcast option failed");
 			return (-1);
 		}
 		if ((setsockopt(sockets->mcast_send, SOL_SOCKET,
 			SO_BROADCAST, &broadcast, sizeof (broadcast))) == -1) {
-			perror("setting broadcast option");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"setting broadcast option failed");
 			return (-1);
 		}
 	} else {
@@ -1601,7 +1598,8 @@ static int totemudp_build_sockets_ip (
 			res = setsockopt (sockets->mcast_recv, IPPROTO_IP, IP_ADD_MEMBERSHIP,
 				&mreq, sizeof (mreq));
 			if (res == -1) {
-				perror ("join ipv4 multicast group failed");
+				LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+					"join ipv4 multicast group failed");
 				return (-1);
 			}
 			break;
@@ -1613,7 +1611,8 @@ static int totemudp_build_sockets_ip (
 			res = setsockopt (sockets->mcast_recv, IPPROTO_IPV6, IPV6_JOIN_GROUP,
 				&mreq6, sizeof (mreq6));
 			if (res == -1) {
-				perror ("join ipv6 multicast group failed");
+				LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+					"join ipv6 multicast group failed");
 				return (-1);
 			}
 			break;
@@ -1635,21 +1634,29 @@ static int totemudp_build_sockets_ip (
 			&flag, sizeof (flag));
 	}
 	if (res == -1) {
-		perror ("turn off loopback");
+		LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+			"Unable to turn on multicast loopback");
 		return (-1);
 	}
 
 	/*
 	 * Set multicast packets TTL
 	 */
-
-	if ( bindnet_address->family == AF_INET6 )
-	{
-		flag = 255;
+	flag = instance->totem_interface->ttl;
+	if (bindnet_address->family == AF_INET6) {
 		res = setsockopt (sockets->mcast_send, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
 			&flag, sizeof (flag));
 		if (res == -1) {
-			perror ("setp mcast hops");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"set mcast v6 TTL failed");
+			return (-1);
+		}
+	} else {
+		res = setsockopt(sockets->mcast_send, IPPROTO_IP, IP_MULTICAST_TTL,
+			&flag, sizeof(flag));
+		if (res == -1) {
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"set mcast v4 TTL failed");
 			return (-1);
 		}
 	}
@@ -1661,24 +1668,28 @@ static int totemudp_build_sockets_ip (
 		case AF_INET:
 		if (setsockopt (sockets->mcast_send, IPPROTO_IP, IP_MULTICAST_IF,
 			&boundto_sin->sin_addr, sizeof (boundto_sin->sin_addr)) < 0) {
-			perror ("cannot select interface");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"cannot select interface for multicast packets (send)");
 			return (-1);
 		}
 		if (setsockopt (sockets->mcast_recv, IPPROTO_IP, IP_MULTICAST_IF,
 			&boundto_sin->sin_addr, sizeof (boundto_sin->sin_addr)) < 0) {
-			perror ("cannot select interface");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"cannot select interface for multicast packets (recv)");
 			return (-1);
 		}
 		break;
 		case AF_INET6:
 		if (setsockopt (sockets->mcast_send, IPPROTO_IPV6, IPV6_MULTICAST_IF,
 			&interface_num, sizeof (interface_num)) < 0) {
-			perror ("cannot select interface");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"cannot select interface for multicast packets (send v6)");
 			return (-1);
 		}
 		if (setsockopt (sockets->mcast_recv, IPPROTO_IPV6, IPV6_MULTICAST_IF,
 			&interface_num, sizeof (interface_num)) < 0) {
-			perror ("cannot select interface");
+			LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+				"cannot select interface for multicast packets (recv v6)");
 			return (-1);
 		}
 		break;
diff --git a/exec/totemudpu.c b/exec/totemudpu.c
index 2cc2cb8..548bb22 100644
--- a/exec/totemudpu.c
+++ b/exec/totemudpu.c
@@ -67,6 +67,7 @@
 #include "totemudpu.h"
 
 #include "crypto.h"
+#include "util.h"
 
 #ifdef HAVE_LIBNSS
 #include <nss.h>
@@ -941,10 +942,8 @@ static inline void ucast_sendmsg (
 	 */
 	res = sendmsg (instance->token_socket, &msg_ucast, MSG_NOSIGNAL);
 	if (res < 0) {
-		char error_str[100];
-		strerror_r (errno, error_str, sizeof(error_str));
-		log_printf (instance->totemudpu_log_level_debug,
-				"sendmsg(ucast) failed (non-critical): %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_debug,
+				"sendmsg(ucast) failed (non-critical)");
 	}
 }
 
@@ -1034,10 +1033,8 @@ static inline void mcast_sendmsg (
 		 */
 		res = sendmsg (member->fd, &msg_mcast, MSG_NOSIGNAL);
 		if (res < 0) {
-			char error_str[100];
-			strerror_r (errno, error_str, sizeof(error_str));
-			log_printf (instance->totemudpu_log_level_debug,
-				"sendmsg(mcast) failed (non-critical): %s\n", error_str);
+			LOGSYS_PERROR (errno, instance->totemudpu_log_level_debug,
+				"sendmsg(mcast) failed (non-critical)");
 		}
 	}
 }
@@ -1283,12 +1280,10 @@ static void totemudpu_traffic_control_set(struct totemudpu_instance *instance, i
 {
 #ifdef SO_PRIORITY
 	int prio = 6; /* TC_PRIO_INTERACTIVE */
-	char error_str[100];
 
 	if (setsockopt(sock, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(int))) {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_warning,
-			"Could not set traffic priority. (%s)\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"Could not set traffic priority");
     }
 #endif
 }
@@ -1310,37 +1305,28 @@ static int totemudpu_build_sockets_ip (
 	 */
 	instance->token_socket = socket (bindnet_address->family, SOCK_DGRAM, 0);
 	if (instance->token_socket == -1) {
-		perror ("socket2");
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"socket() failed");
 		return (-1);
 	}
 
 	totemip_nosigpipe (instance->token_socket);
 	res = fcntl (instance->token_socket, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_warning,
-			"Could not set non-blocking operation on token socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"Could not set non-blocking operation on token socket");
 		return (-1);
 	}
 
 	/*
-	 * Force reuse
-	 */
-//	 flag = 1;
-//	 if ( setsockopt(instance->token_socket, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) {
-//	 	perror("setsockopt reuseaddr");
-//		return (-1);
-//	}
-
-	/*
 	 * Bind to unicast socket used for token send/receives
 	 * This has the side effect of binding to the correct interface
 	 */
 	totemip_totemip_to_sockaddr_convert(bound_to, instance->totem_interface->ip_port, &sockaddr, &addrlen);
 	res = bind (instance->token_socket, (struct sockaddr *)&sockaddr, addrlen);
 	if (res == -1) {
-		perror ("bind token socket failed");
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"bind token socket failed");
 		return (-1);
 	}
 
@@ -1352,10 +1338,8 @@ static int totemudpu_build_sockets_ip (
 	res = setsockopt (instance->token_socket, SOL_SOCKET, SO_RCVBUF,
 		&recvbuf_size, optlen);
 	if (res == -1) {
-		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_notice,
-			"Could not set recvbuf size %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_notice,
+			"Could not set recvbuf size");
 	}
 
 	return 0;
@@ -1669,7 +1653,6 @@ int totemudpu_member_add (
 	int res;
 	unsigned int sendbuf_size;
 	unsigned int optlen = sizeof (sendbuf_size);
-	char error_str[100];
 
 	new_member = malloc (sizeof (struct totemudpu_member));
 	if (new_member == NULL) {
@@ -1680,17 +1663,15 @@ int totemudpu_member_add (
 	memcpy (&new_member->member, member, sizeof (struct totem_ip_address));
 	new_member->fd = socket (member->family, SOCK_DGRAM, 0);
 	if (new_member->fd == -1) {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_warning,
-			"Could not create socket for new member: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"Could not create socket for new member");
 		return (-1);
 	}
 	totemip_nosigpipe (new_member->fd);
 	res = fcntl (new_member->fd, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_warning,
-			"Could not set non-blocking operation on token socket: %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_warning,
+			"Could not set non-blocking operation on token socket");
 		return (-1);
 	}
 
@@ -1702,9 +1683,8 @@ int totemudpu_member_add (
 	res = setsockopt (new_member->fd, SOL_SOCKET, SO_SNDBUF,
 		&sendbuf_size, optlen);
 	if (res == -1) {
-		strerror_r (errno, error_str, 100);
-		log_printf (instance->totemudpu_log_level_notice,
-			"Could not set sendbuf size %s\n", error_str);
+		LOGSYS_PERROR (errno, instance->totemudpu_log_level_notice,
+			"Could not set sendbuf size");
 	}
 	return (0);
 }
diff --git a/exec/util.c b/exec/util.c
index 54152c3..fe0acec 100644
--- a/exec/util.c
+++ b/exec/util.c
@@ -44,6 +44,7 @@
 #include <assert.h>
 
 #include <corosync/corotypes.h>
+#include <corosync/corodefs.h>
 #include <corosync/list.h>
 #include <corosync/engine/logsys.h>
 #include <corosync/coroipc_types.h>
@@ -51,6 +52,48 @@
 
 LOGSYS_DECLARE_SUBSYS ("MAIN");
 
+struct service_names {
+	const char *c_name;
+	int32_t c_val;
+};
+
+static struct service_names servicenames[] =
+{
+	{ "EVS", EVS_SERVICE },
+	{ "CLM", CLM_SERVICE },
+	{ "AMF", AMF_SERVICE },
+	{ "CKPT", CKPT_SERVICE },
+	{ "EVT", EVT_SERVICE },
+	{ "LCK", LCK_SERVICE },
+	{ "MSG", MSG_SERVICE },
+	{ "CFG", CFG_SERVICE },
+	{ "CPG", CPG_SERVICE },
+	{ "CMAN", CMAN_SERVICE },
+	{ "PCMK", PCMK_SERVICE },
+	{ "CONFDB", CONFDB_SERVICE },
+	{ "QUORUM", QUORUM_SERVICE },
+	{ "PLOAD", PLOAD_SERVICE },
+	{ "TMR", TMR_SERVICE },
+	{ "VOTEQUORUM", VOTEQUORUM_SERVICE },
+	{ "NTF", NTF_SERVICE },
+	{ "AMF", AMF_V2_SERVICE },
+	{ NULL, -1 }
+};
+
+const char * short_service_name_get(uint32_t service_id,
+	char *buf, size_t buf_size)
+{
+	uint32_t i;
+
+	for (i = 0; servicenames[i].c_name != NULL; i++) {
+		if (service_id == servicenames[i].c_val) {
+			return (servicenames[i].c_name);
+		}
+	}
+	snprintf(buf, buf_size, "%d", service_id);
+	return buf;
+}
+
 /*
  * Compare two names.  returns non-zero on match.
  */
@@ -117,7 +160,8 @@ char *getcs_name_t (cs_name_t *name)
 }
 
 void setcs_name_t (cs_name_t *name, char *str) {
-	strncpy ((char *)name->value, str, CS_MAX_NAME_LENGTH);
+	strncpy ((char *)name->value, str, sizeof (name->value));
+	((char *)name->value)[sizeof (name->value) - 1] = '\0';
 	if (strlen ((char *)name->value) > CS_MAX_NAME_LENGTH) {
 		name->length = CS_MAX_NAME_LENGTH;
 	} else {
diff --git a/exec/util.h b/exec/util.h
index f04794e..263919b 100644
--- a/exec/util.h
+++ b/exec/util.h
@@ -63,6 +63,7 @@ enum e_ais_done {
 	AIS_DONE_DIR_NOT_PRESENT = 16,
 	AIS_DONE_AQUIRE_LOCK = 17,
 	AIS_DONE_ALREADY_RUNNING = 18,
+	AIS_DONE_STD_TO_NULL_REDIR = 19,
 };
 
 static inline cs_error_t hdb_error_to_cs (int res)		\
@@ -97,4 +98,10 @@ void _corosync_out_of_memory_error (void) __attribute__((noreturn));
 extern char *getcs_name_t (cs_name_t *name);
 extern void setcs_name_t (cs_name_t *name, char *str);
 extern int cs_name_tisEqual (cs_name_t *str1, char *str2);
+/**
+ * Get the short name of a service from the service_id.
+ */
+const char * short_service_name_get(uint32_t service_id,
+				    char *buf, size_t buf_size);
+
 #endif /* UTIL_H_DEFINED */
diff --git a/include/Makefile.in b/include/Makefile.in
index 17dc960..cc6cf9e 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -132,6 +132,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -166,7 +168,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -177,6 +178,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -237,6 +241,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/include/corosync/confdb.h b/include/corosync/confdb.h
index ca8e21b..ca0d7ba 100644
--- a/include/corosync/confdb.h
+++ b/include/corosync/confdb.h
@@ -194,6 +194,12 @@ cs_error_t confdb_object_parent_get (
 	hdb_handle_t object_handle,
 	hdb_handle_t *parent_object_handle);
 
+cs_error_t confdb_object_name_get (
+	confdb_handle_t handle,
+	hdb_handle_t object_handle,
+	char *object_name,
+	size_t *object_name_len);
+
 /*
  * Manipulate keys
  */
diff --git a/include/corosync/config.h.in b/include/corosync/config.h.in
index e659531..e0912d6 100644
--- a/include/corosync/config.h.in
+++ b/include/corosync/config.h.in
@@ -35,6 +35,9 @@
 /* Compiling Debugging code */
 #undef DEBUG
 
+/* Build in support for sending SNMP traps */
+#undef ENABLE_SNMP
+
 /* Define to 1 if you have the `alarm' function. */
 #undef HAVE_ALARM
 
@@ -60,6 +63,9 @@
 /* Define to 1 if you have the `bzero' function. */
 #undef HAVE_BZERO
 
+/* have dbus */
+#undef HAVE_DBUS
+
 /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
    */
 #undef HAVE_DECL_GETENV
@@ -128,6 +134,9 @@
 /* Define to 1 if you have the `socket' library (-lsocket). */
 #undef HAVE_LIBSOCKET
 
+/* have libstatgrab */
+#undef HAVE_LIBSTATGRAB
+
 /* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 
@@ -159,6 +168,9 @@
 /* Define to 1 if you have the `mkdir' function. */
 #undef HAVE_MKDIR
 
+/* have resource monitoring */
+#undef HAVE_MONITORING
+
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 #undef HAVE_NDIR_H
 
@@ -168,14 +180,17 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
-/* Define to 1 if you have the `pthread_setschedparam' function. */
-#undef HAVE_PTHREAD_SETSCHEDPARAM
+/* Define to 1 if you have the `netsnmp_tdomain_transport' function. */
+#undef HAVE_NETSNMP_TDOMAIN_TRANSPORT
 
-/* Define to 1 if you have the `pthread_spin_lock' function. */
-#undef HAVE_PTHREAD_SPIN_LOCK
+/* Define to 1 if you have the `netsnmp_transport_open_client' function. */
+#undef HAVE_NETSNMP_TRANSPORT_OPEN_CLIENT
 
-/* Define to 1 if you have the `pthread_spin_unlock' function. */
-#undef HAVE_PTHREAD_SPIN_UNLOCK
+/* Define to 1 if you have the <net-snmp/net-snmp-config.h> header file. */
+#undef HAVE_NET_SNMP_NET_SNMP_CONFIG_H
+
+/* Define to 1 if you have the `pthread_setschedparam' function. */
+#undef HAVE_PTHREAD_SETSCHEDPARAM
 
 /* have rdmacm */
 #undef HAVE_RDMA
@@ -273,6 +288,9 @@
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #undef HAVE_SYS_WAIT_H
 
+/* have testagents */
+#undef HAVE_TESTAGENTS
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
@@ -285,6 +303,9 @@
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
 
+/* have watchdog */
+#undef HAVE_WATCHDOG
+
 /* Define to 1 if you have the <wchar.h> header file. */
 #undef HAVE_WCHAR_H
 
@@ -312,6 +333,9 @@
 /* Number of chars in a file name */
 #undef NAME_MAX
 
+/* have net-snmp5.4 over */
+#undef NETSNMPV54
+
 /* Name of package */
 #undef PACKAGE
 
@@ -330,9 +354,6 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
diff --git a/include/corosync/coroipc_ipc.h b/include/corosync/coroipc_ipc.h
index dadc34f..f04134d 100644
--- a/include/corosync/coroipc_ipc.h
+++ b/include/corosync/coroipc_ipc.h
@@ -57,6 +57,15 @@
 #include <semaphore.h>
 #else
 #include <sys/sem.h>
+
+#if defined(_SEM_SEMUN_UNDEFINED)
+union semun {
+  int val;
+  struct semid_ds *buf;
+  unsigned short int *array;
+  struct seminfo *__buf;
+};
+#endif
 #endif
 
 /*
@@ -157,7 +166,8 @@ struct coroipcs_zc_header {
 	uint64_t server_address;
 };
 
-#define SOCKET_SERVICE_INIT	0xFFFFFFFF
+#define SOCKET_SERVICE_INIT					0xFFFFFFFF
+#define SOCKET_SERVICE_SECURITY_VIOLATION	0xFFFFFFFE
 
 #define ZC_ALLOC_HEADER		0xFFFFFFFF
 #define ZC_FREE_HEADER		0xFFFFFFFE
@@ -330,8 +340,8 @@ ipc_sem_getvalue (
 	int *sem_value)
 {
 #if _POSIX_THREAD_PROCESS_SHARED < 1
-	struct sembuf sop;
 	int sem_value_hold;
+	union semun semun;
 #else
 	sem_t *sem = NULL;
 	int res;
@@ -358,12 +368,8 @@ ipc_sem_getvalue (
 		return (CS_ERR_LIBRARY);
 	}
 #else
-	sop.sem_num = sem_id;
-	sop.sem_op = 1;
-	sop.sem_flg = 0;
-
 retry_semctl:
-	sem_value_hold = semctl (control_buffer->semid, sem_id, GETVAL);
+	sem_value_hold = semctl (control_buffer->semid, sem_id, GETVAL, semun);
 	if (sem_value_hold == -1 && errno == EINTR) {
 		goto retry_semctl;
 	} else
diff --git a/include/corosync/engine/coroapi.h b/include/corosync/engine/coroapi.h
index c3c812f..0f6bb5e 100644
--- a/include/corosync/engine/coroapi.h
+++ b/include/corosync/engine/coroapi.h
@@ -212,12 +212,12 @@ typedef void (*object_key_change_notify_fn_t)(
 typedef void (*object_create_notify_fn_t) (
 	hdb_handle_t parent_object_handle,
 	hdb_handle_t object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt);
 
 typedef void (*object_destroy_notify_fn_t) (
 	hdb_handle_t parent_object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt);
 
 typedef void (*object_notify_callback_fn_t)(
@@ -608,7 +608,6 @@ struct corosync_api_v1 {
 	 */
 	hdb_handle_t (*poll_handle_get) (void);
 
-
 	int (*object_key_create_typed) (
 		hdb_handle_t object_handle,
 		const char *key_name,
@@ -636,6 +635,22 @@ struct corosync_api_v1 {
 		hdb_handle_t *handle,
 		int (schedwrk_fn) (const void *),
 		const void *context);
+
+	int (*poll_dispatch_add) (hdb_handle_t handle,
+		int fd,
+		int events,
+		void *data,
+
+		int (*dispatch_fn) (hdb_handle_t handle,
+			int fd,
+			int revents,
+			void *data));
+
+
+	int (*poll_dispatch_delete) (
+		hdb_handle_t handle,
+		int fd);
+
 };
 
 #define SERVICE_ID_MAKE(a,b) ( ((a)<<16) | (b) )
diff --git a/include/corosync/engine/logsys.h b/include/corosync/engine/logsys.h
index 010684c..df1db1d 100644
--- a/include/corosync/engine/logsys.h
+++ b/include/corosync/engine/logsys.h
@@ -153,6 +153,32 @@ extern "C" {
 #define LOGSYS_DECODE_RECID(rec_ident) \
 	(((rec_ident) & LOGSYS_RECID_RECID_MASK) >> LOGSYS_SUBSYSID_END)
 
+#define LOGSYS_MAX_PERROR_MSG_LEN	128
+
+#ifdef COROSYNC_LINUX
+/* The GNU version of strerror_r returns a (char*) that *must* be used */
+#define LOGSYS_STRERROR_R(out_ptr, err_num, buffer, sizeof_buffer) \
+	out_ptr = strerror_r(err_num, buffer, sizeof_buffer);
+#else
+/* The XSI-compliant strerror_r() return 0 or -1 (in case the buffer is full) */
+#define LOGSYS_STRERROR_R(out_ptr, err_num, buffer, sizeof_buffer) do {	\
+		if ( strerror_r(err_num, buffer, sizeof_buffer) == 0 ) {		\
+			out_ptr = buffer;											\
+		} else {														\
+			out_ptr = "";												\
+		}																\
+	} while(0)
+#endif
+
+#define LOGSYS_PERROR(err_num, level, fmt, args...) do {							\
+		char _error_str[LOGSYS_MAX_PERROR_MSG_LEN];									\
+		const char *_error_ptr;														\
+		LOGSYS_STRERROR_R(_error_ptr, err_num, _error_str, sizeof(_error_str));		\
+		log_printf(level, fmt ": %s (%d)\n", ##args, _error_ptr, err_num);			\
+	} while(0)
+
+
+
 #ifndef LOGSYS_UTILS_ONLY
 
 extern int _logsys_system_setup(
@@ -316,7 +342,7 @@ static void logsys_system_init (void)					\
 		exit (-1);						\
 	}								\
 									\
-	if (logsys_format_set (format) < 0) {				\
+	if (logsys_format_set (format) == -1) {				\
 		fprintf (stderr,					\
 			"Unable to setup logging format.\n");		\
 		exit (-1);						\
diff --git a/include/corosync/engine/objdb.h b/include/corosync/engine/objdb.h
index 140753a..14b12d4 100644
--- a/include/corosync/engine/objdb.h
+++ b/include/corosync/engine/objdb.h
@@ -81,18 +81,18 @@ typedef void (*object_key_change_notify_fn_t)(
 	const void *key_value_pt, size_t key_value_len,
 	void *priv_data_pt);
 
-typedef void (*object_create_notify_fn_t) (unsigned int parent_object_handle,
-hdb_handle_t object_handle,
-const void *name_pt, size_t name_len,
-void *priv_data_pt);
+typedef void (*object_create_notify_fn_t) (hdb_handle_t parent_object_handle,
+	hdb_handle_t object_handle,
+	const void *name_pt, size_t name_len,
+	void *priv_data_pt);
 
-typedef void (*object_destroy_notify_fn_t) (unsigned int parent_object_handle,
-					    const void *name_pt,
-					    size_t name_len,
-											void *priv_data_pt);
+typedef void (*object_destroy_notify_fn_t) (hdb_handle_t parent_object_handle,
+	const void *name_pt,
+	size_t name_len,
+	void *priv_data_pt);
 
 typedef void (*object_reload_notify_fn_t) (objdb_reload_notify_type_t, int flush,
-											void *priv_data_pt);
+	void *priv_data_pt);
 
 struct object_valid {
 	char *object_name;
diff --git a/include/corosync/hdb.h b/include/corosync/hdb.h
index 860738f..88742f9 100644
--- a/include/corosync/hdb.h
+++ b/include/corosync/hdb.h
@@ -74,35 +74,10 @@ struct hdb_handle_database {
 	struct hdb_handle *handles;
 	unsigned int iterator;
         void (*destructor) (void *);
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-	pthread_spinlock_t lock;
-#else
 	pthread_mutex_t lock;
-#endif
 	unsigned int first_run;
 };
 
-#if defined(HAVE_PTHREAD_SPIN_LOCK)
-static inline void hdb_database_lock (pthread_spinlock_t *spinlock)
-{
-	pthread_spin_lock (spinlock);
-}
-
-static inline void hdb_database_unlock (pthread_spinlock_t *spinlock)
-{
-	pthread_spin_unlock (spinlock);
-}
-static inline void hdb_database_lock_init (pthread_spinlock_t *spinlock)
-{
-	pthread_spin_init (spinlock, 0);
-}
-
-static inline void hdb_database_lock_destroy (pthread_spinlock_t *spinlock)
-{
-	pthread_spin_destroy (spinlock);
-}
-
-#else
 static inline void hdb_database_lock (pthread_mutex_t *mutex)
 {
 	pthread_mutex_lock (mutex);
@@ -121,7 +96,6 @@ static inline void hdb_database_lock_destroy (pthread_mutex_t *mutex)
 {
 	pthread_mutex_destroy (mutex);
 }
-#endif
 
 #define DECLARE_HDB_DATABASE(database_name,destructor_function)		\
 static struct hdb_handle_database (database_name) = {			\
diff --git a/include/corosync/ipc_confdb.h b/include/corosync/ipc_confdb.h
index c92bcc6..856c8a6 100644
--- a/include/corosync/ipc_confdb.h
+++ b/include/corosync/ipc_confdb.h
@@ -59,6 +59,7 @@ enum req_confdb_types {
 	MESSAGE_REQ_CONFDB_KEY_CREATE_TYPED = 17,
 	MESSAGE_REQ_CONFDB_KEY_GET_TYPED = 18,
 	MESSAGE_REQ_CONFDB_KEY_ITER_TYPED = 19,
+	MESSAGE_REQ_CONFDB_OBJECT_NAME_GET = 20,
 };
 
 enum res_confdb_types {
@@ -85,6 +86,7 @@ enum res_confdb_types {
 	MESSAGE_RES_CONFDB_KEY_GET_TYPED = 20,
 	MESSAGE_RES_CONFDB_KEY_ITER_TYPED = 21,
 	MESSAGE_RES_CONFDB_RELOAD_CALLBACK = 22,
+	MESSAGE_RES_CONFDB_OBJECT_NAME_GET = 23,
 };
 
 
@@ -114,6 +116,15 @@ struct res_lib_confdb_object_parent_get {
 	mar_uint64_t parent_object_handle __attribute__((aligned(8)));
 };
 
+struct req_lib_confdb_object_name_get {
+	coroipc_request_header_t header __attribute__((aligned(8)));
+	mar_uint64_t object_handle __attribute__((aligned(8)));
+};
+
+struct res_lib_confdb_object_name_get {
+	coroipc_response_header_t header __attribute__((aligned(8)));
+	mar_name_t object_name __attribute__((aligned(8)));
+};
 
 struct req_lib_confdb_key_create {
 	coroipc_request_header_t header __attribute__((aligned(8)));
diff --git a/include/corosync/sq.h b/include/corosync/sq.h
index aa5bc1e..ce3b1f8 100644
--- a/include/corosync/sq.h
+++ b/include/corosync/sq.h
@@ -42,6 +42,7 @@ struct sq {
 	unsigned int size;
 	void *items;
 	unsigned int *items_inuse;
+	unsigned int *items_miss_count;
 	unsigned int size_per_item;
 	unsigned int head_seqid;
 	unsigned int item_count;
@@ -112,7 +113,12 @@ static inline int sq_init (
 	    == NULL) {
 		return (-ENOMEM);
 	}
+	if ((sq->items_miss_count = malloc (item_count * sizeof (unsigned int)))
+	    == NULL) {
+		return (-ENOMEM);
+	}
 	memset (sq->items_inuse, 0, item_count * sizeof (unsigned int));
+	memset (sq->items_miss_count, 0, item_count * sizeof (unsigned int));
 	return (0);
 }
 
@@ -124,6 +130,7 @@ static inline void sq_reinit (struct sq *sq, unsigned int head_seqid)
 
 	memset (sq->items, 0, sq->item_count * sq->size_per_item);
 	memset (sq->items_inuse, 0, sq->item_count * sizeof (unsigned int));
+	memset (sq->items_miss_count, 0, sq->item_count * sizeof (unsigned int));
 }
 
 static inline void sq_assert (const struct sq *sq, unsigned int pos)
@@ -149,11 +156,14 @@ static inline void sq_copy (struct sq *sq_dest, const struct sq *sq_src)
 		sq_src->item_count * sq_src->size_per_item);
 	memcpy (sq_dest->items_inuse, sq_src->items_inuse,
 		sq_src->item_count * sizeof (unsigned int));
+	memcpy (sq_dest->items_miss_count, sq_src->items_miss_count,
+		sq_src->item_count * sizeof (unsigned int));
 }
 
 static inline void sq_free (struct sq *sq) {
 	free (sq->items);
 	free (sq->items_inuse);
+	free (sq->items_miss_count);
 }
 
 static inline void *sq_item_add (
@@ -178,6 +188,7 @@ static inline void *sq_item_add (
 	} else {
 		sq->items_inuse[sq_position] = seqid;
 	}
+	sq->items_miss_count[sq_position] = 0;
 
 	return (sq_item);
 }
@@ -204,6 +215,17 @@ static inline unsigned int sq_item_inuse (
 	return (sq->items_inuse[sq_position] != 0);
 }
 
+static inline unsigned int sq_item_miss_count (
+	const struct sq *sq,
+	unsigned int seq_id)
+{
+	unsigned int sq_position;
+
+	sq_position = (sq->head - sq->head_seqid + seq_id) % sq->size;
+	sq->items_miss_count[sq_position]++;
+	return (sq->items_miss_count[sq_position]);
+}
+
 static inline unsigned int sq_size_get (
 	const struct sq *sq)
 {
@@ -286,6 +308,8 @@ static inline void sq_items_release (struct sq *sq, unsigned int seqid)
 //		printf ("releasing %d for %d\n", oldhead, seqid - sq->head_seqid + 1);
 		memset (&sq->items_inuse[oldhead], 0,
 			(seqid - sq->head_seqid + 1) * sizeof (unsigned int));
+		memset (&sq->items_miss_count[oldhead], 0,
+			(seqid - sq->head_seqid + 1) * sizeof (unsigned int));
 	}
 	sq->head_seqid = seqid + 1;
 }
diff --git a/include/corosync/totem/totem.h b/include/corosync/totem/totem.h
index b84d9ba..f3ac9cc 100644
--- a/include/corosync/totem/totem.h
+++ b/include/corosync/totem/totem.h
@@ -52,11 +52,17 @@
 #define SEND_THREADS_MAX	16
 #define INTERFACE_MAX		2
 
+/*
+ * Maximum number of continuous gather states
+ */
+#define MAX_NO_CONT_GATHER	3
+
 struct totem_interface {
 	struct totem_ip_address bindnet;
 	struct totem_ip_address boundto;
 	struct totem_ip_address mcast_addr;
 	uint16_t ip_port;
+	uint16_t ttl;
 	int member_count;
 	struct totem_ip_address member_list[PROCESSOR_COUNT_MAX];
 	
@@ -137,6 +143,8 @@ struct totem_config {
 
 	unsigned int rrp_problem_count_threshold;
 
+	unsigned int rrp_autorecovery_check_timeout;
+
 	char rrp_mode[TOTEM_RRP_MODE_BYTES];
 
 	struct totem_logging_configuration totem_logging_configuration;
@@ -174,6 +182,8 @@ struct totem_config {
 	int crypto_sign_type;
 
 	totem_transport_t transport_number;
+
+	unsigned int miss_count_const;
 };
 
 #define TOTEM_CONFIGURATION_TYPE
@@ -249,6 +259,7 @@ typedef struct {
 	uint64_t recovery_token_lost;
 	uint64_t consensus_timeouts;
 	uint64_t rx_msg_dropped;
+	uint32_t continuous_gather;
 
 	int earliest_token;
 	int latest_token;
@@ -257,6 +268,9 @@ typedef struct {
 
 } totemsrp_stats_t;
 
+ 
+ #define TOTEM_CONFIGURATION_TYPE
+
 typedef struct {
 	totem_stats_header_t hdr;
 	totemsrp_stats_t *srp;
@@ -265,6 +279,8 @@ typedef struct {
 typedef struct {
 	totem_stats_header_t hdr;
 	totemmrp_stats_t *mrp;
+	uint32_t msg_reserved;
+	uint32_t msg_queue_avail;
 } totempg_stats_t;
 
 #endif /* TOTEM_H_DEFINED */
diff --git a/init/Makefile.am b/init/Makefile.am
index 2d079d1..0ca9ee9 100644
--- a/init/Makefile.am
+++ b/init/Makefile.am
@@ -34,9 +34,9 @@
 
 MAINTAINERCLEANFILES	= Makefile.in
 
-EXTRA_DIST		= generic.in
+EXTRA_DIST		= generic.in notifyd.in
 
-target_INIT		= generic
+target_INIT		= generic notifyd
 
 %: %.in Makefile
 	rm -f $@-t $@
@@ -57,7 +57,8 @@ clean-local:
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)/$(INITDDIR)
 	$(INSTALL) -m 755 generic $(DESTDIR)/$(INITDDIR)/corosync
+	$(INSTALL) -m 755 notifyd $(DESTDIR)/$(INITDDIR)/corosync-notifyd
 
 uninstall-local:
 	cd $(DESTDIR)/$(INITDDIR) && \
-		rm -f corosync
+		rm -f corosync corosync-notifyd
diff --git a/init/Makefile.in b/init/Makefile.in
index 74e4ced..bef2bf5 100644
--- a/init/Makefile.in
+++ b/init/Makefile.in
@@ -108,6 +108,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -142,7 +144,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -153,6 +154,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -213,14 +217,15 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = generic.in
-target_INIT = generic
+EXTRA_DIST = generic.in notifyd.in
+target_INIT = generic notifyd
 all: all-am
 
 .SUFFIXES:
@@ -421,10 +426,11 @@ clean-local:
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)/$(INITDDIR)
 	$(INSTALL) -m 755 generic $(DESTDIR)/$(INITDDIR)/corosync
+	$(INSTALL) -m 755 notifyd $(DESTDIR)/$(INITDDIR)/corosync-notifyd
 
 uninstall-local:
 	cd $(DESTDIR)/$(INITDDIR) && \
-		rm -f corosync
+		rm -f corosync corosync-notifyd
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/init/generic.in b/init/generic.in
index e785b3e..1ce26f0 100755
--- a/init/generic.in
+++ b/init/generic.in
@@ -70,10 +70,23 @@ __pids_pidof() {
                 pidof -c -o $$ -o $PPID -o %PPID "${1##*/}"
 }
 
+cluster_disabled_at_boot()
+{
+       if grep -q nocluster /proc/cmdline && \
+          [ "$(tty)" = "/dev/console" ]; then
+               echo -e "not configured to run at boot"
+               failure
+               return 1
+       fi
+       return 0
+}
+
 start()
 {
 	echo -n "Starting $desc ($prog): "
 
+	! cluster_disabled_at_boot && return
+
 	# most recent distributions use tmpfs for @LOCALSTATEDIR@/run
 	# to avoid to clean it up on every boot.
 	# they also assume that init scripts will create
diff --git a/init/generic.in b/init/notifyd.in
similarity index 73%
copy from init/generic.in
copy to init/notifyd.in
index e785b3e..86c6393 100755
--- a/init/generic.in
+++ b/init/notifyd.in
@@ -1,27 +1,26 @@
 #!/bin/bash
 
 # Authors:
-#  Andrew Beekhof <abeekhof at redhat.com>
-#  Fabio M. Di Nitto <fdinitto at redhat.com>
+#  Angus Salkeld <asalkeld at redhat.com>
 #
 # License: Revised BSD
 
-# chkconfig: - 20 80
-# description: Corosync Cluster Engine
-# processname: corosync
+# chkconfig: - 23 77
+# description: Corosync Dbus and snmp notifier
+# processname: corosync-notifyd
 #
 ### BEGIN INIT INFO
-# Provides:		corosync
-# Required-Start:	$network $syslog
-# Required-Stop:	$network $syslog
+# Provides:		corosync-notifyd
+# Required-Start:	$corosync $cman
+# Required-Stop:	$corosync $cman
 # Default-Start:
 # Default-Stop:
-# Short-Description:	Starts and stops Corosync Cluster Engine.
-# Description:		Starts and stops Corosync Cluster Engine.
+# Short-Description:	Starts and stops Corosync Notifier.
+# Description:		Starts and stops Corosync Notifier.
 ### END INIT INFO
 
-desc="Corosync Cluster Engine"
-prog="corosync"
+desc="Corosync Notifier"
+prog="corosync-notifyd"
 
 # set secure PATH
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBINDIR@"
@@ -83,7 +82,7 @@ start()
 	if status $prog > /dev/null 2>&1; then
 		success
 	else
-		$prog > /dev/null 2>&1
+		$prog $OPTIONS > /dev/null 2>&1
 
 		# give it time to fail
 		sleep 2
@@ -98,38 +97,15 @@ start()
 	echo
 }
 
-executed_by_cman()
-{
-	[ -f @LOCALSTATEDIR@/run/cman.pid ] || return 0
-
-	read cman_pid foo < @LOCALSTATEDIR@/run/cman.pid
-	if [ "$(pidof $prog)" == "$cman_pid" ];then
-		echo -n "$desc was executed by cman"
-		failure
-		echo
-		return 1
-	fi
-
-	return 0
-}
-
 stop()
 {
 	! status $prog > /dev/null 2>&1 && return
 
-	! executed_by_cman && return
-
 	echo -n "Signaling $desc ($prog) to terminate: "
 	kill -TERM $(pidof $prog) > /dev/null 2>&1
 	success
 	echo
 
-	echo -n "Waiting for $prog services to unload:"
-	while status $prog > /dev/null 2>&1; do
-		sleep 1
-		echo -n "."
-	done
-
 	rm -f $LOCK_FILE
 	success
 	echo
diff --git a/lcr/Makefile.in b/lcr/Makefile.in
index 3ef2cea..74b187f 100644
--- a/lcr/Makefile.in
+++ b/lcr/Makefile.in
@@ -129,6 +129,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -163,7 +165,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -174,6 +175,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -234,6 +238,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/lcr/uis.c b/lcr/uis.c
index a124134..a2a5896 100755
--- a/lcr/uis.c
+++ b/lcr/uis.c
@@ -99,8 +99,16 @@ static void uis_lcr_bind (int *server_fd)
 	res = bind (fd, (struct sockaddr *)&un_addr, AIS_SUN_LEN(&un_addr));
 	if (res) {
 		char error_str[100];
-		strerror_r (errno, error_str, 100);
-		printf ("Could not bind AF_UNIX: %s\n", error_str);
+		const char *error_ptr;
+#ifdef _GNU_SOURCE
+/* The GNU version of strerror_r returns a (char*) that *must* be used */
+		error_ptr = strerror_r(errno, error_str, sizeof(error_str));
+#else
+/* The XSI-compliant strerror_r() return 0 or -1 (in case the buffer is full) */
+		strerror_r(errno, error_str, sizeof(error_str));
+		error_ptr = error_str;
+#endif
+		printf ("Could not bind AF_UNIX: %s\n", error_ptr);
 	}
 	listen (fd, SERVER_BACKLOG);
 	*server_fd = fd;
diff --git a/lib/Makefile.in b/lib/Makefile.in
index ae12a60..0758e88 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -189,6 +189,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -223,7 +225,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -234,6 +235,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -294,6 +298,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/lib/cfg.c b/lib/cfg.c
index 054dc43..a3aee9c 100644
--- a/lib/cfg.c
+++ b/lib/cfg.c
@@ -651,6 +651,7 @@ cs_error_t corosync_cfg_get_node_addrs (
 	int i;
 	struct iovec iov;
 	void *return_address;
+	const char *addr_buf;
 
 	error = hdb_error_to_cs(hdb_handle_get (&cfg_hdb, cfg_handle,
 		(void *)&cfg_instance));
@@ -681,7 +682,9 @@ cs_error_t corosync_cfg_get_node_addrs (
 	if (res_lib_cfg_get_node_addrs->family == AF_INET6)
 		addrlen = sizeof(struct sockaddr_in6);
 
-	for (i=0; i<max_addrs && i<res_lib_cfg_get_node_addrs->num_addrs; i++) {
+	for (i = 0, addr_buf = (char *)res_lib_cfg_get_node_addrs->addrs;
+	    i < max_addrs && i<res_lib_cfg_get_node_addrs->num_addrs;
+	    i++, addr_buf += TOTEMIP_ADDRLEN) {
 		struct sockaddr_in *in;
 		struct sockaddr_in6 *in6;
 
@@ -690,12 +693,12 @@ cs_error_t corosync_cfg_get_node_addrs (
 		if (res_lib_cfg_get_node_addrs->family == AF_INET) {
 			in = (struct sockaddr_in *)addrs[i].address;
 			in->sin_family = AF_INET;
-			memcpy(&in->sin_addr, &res_lib_cfg_get_node_addrs->addrs[i][0], sizeof(struct in_addr));
+			memcpy(&in->sin_addr, addr_buf, sizeof(struct in_addr));
 		}
 		if (res_lib_cfg_get_node_addrs->family == AF_INET6) {
 			in6 = (struct sockaddr_in6 *)addrs[i].address;
 			in6->sin6_family = AF_INET6;
-			memcpy(&in6->sin6_addr, &res_lib_cfg_get_node_addrs->addrs[i][0], sizeof(struct in6_addr));
+			memcpy(&in6->sin6_addr, addr_buf, sizeof(struct in6_addr));
 		}
 	}
 	*num_addrs = res_lib_cfg_get_node_addrs->num_addrs;
diff --git a/lib/confdb.c b/lib/confdb.c
index c64a8ba..1ea2ed0 100644
--- a/lib/confdb.c
+++ b/lib/confdb.c
@@ -575,6 +575,61 @@ error_exit:
 	return (error);
 }
 
+cs_error_t confdb_object_name_get (
+	confdb_handle_t handle,
+	hdb_handle_t object_handle,
+	char *object_name,
+	size_t *object_name_len)
+{
+	cs_error_t error;
+	struct confdb_inst *confdb_inst;
+	struct iovec iov;
+	struct req_lib_confdb_object_name_get request;
+	struct res_lib_confdb_object_name_get response;
+
+	error = hdb_error_to_cs(hdb_handle_get (&confdb_handle_t_db, handle, (void *)&confdb_inst));
+	if (error != CS_OK) {
+		return (error);
+	}
+
+	if (confdb_inst->standalone) {
+		error = CS_OK;
+
+		if (confdb_sa_object_name_get(object_handle, object_name, object_name_len))
+			error = CS_ERR_ACCESS;
+		goto error_exit;
+	}
+
+	request.header.size = sizeof (struct req_lib_confdb_object_name_get);
+	request.header.id = MESSAGE_REQ_CONFDB_OBJECT_NAME_GET;
+	request.object_handle = object_handle;
+
+	iov.iov_base = (char *)&request;
+	iov.iov_len = sizeof (struct req_lib_confdb_object_name_get);
+
+        error = coroipcc_msg_send_reply_receive (
+		confdb_inst->handle,
+		&iov,
+		1,
+                &response,
+		sizeof (struct res_lib_confdb_object_name_get));
+
+	if (error != CS_OK) {
+		goto error_exit;
+	}
+
+	error = response.header.error;
+	if (error == CS_OK) {
+		*object_name_len = response.object_name.length;
+		memcpy(object_name, response.object_name.value, *object_name_len);
+	}
+
+error_exit:
+	(void)hdb_handle_put (&confdb_handle_t_db, handle);
+
+	return (error);
+}
+
 static cs_error_t do_find_destroy(
 	struct confdb_inst *confdb_inst,
 	hdb_handle_t find_handle)
diff --git a/lib/coroipcc.c b/lib/coroipcc.c
index bbeb95f..b7a3db9 100644
--- a/lib/coroipcc.c
+++ b/lib/coroipcc.c
@@ -227,15 +227,13 @@ retry_recv:
 			goto res_exit;
 		}
 	}
-#if defined(COROSYNC_SOLARIS) || defined(COROSYNC_BSD) || defined(COROSYNC_DARWIN)
-	/* On many OS poll never return POLLHUP or POLLERR.
-	 * EOF is detected when recvmsg return 0.
+	/*
+	 * EOF is also detected when recvmsg return 0.
 	 */
 	if (result == 0) {
 		res = CS_ERR_LIBRARY;
 		goto res_exit;
 	}
-#endif
 
 	processed += result;
 	if (processed != len) {
@@ -311,6 +309,10 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes)
 	}
 
 	page_size = sysconf(_SC_PAGESIZE);
+	if (page_size == -1) {
+		goto error_close_unlink;
+	}
+
 	buffer = malloc (page_size);
 	if (buffer == NULL) {
 		goto error_close_unlink;
@@ -417,6 +419,10 @@ memory_map (char *path, const char *file, void **buf, size_t bytes)
 		goto error_close_unlink;
 	}
 	page_size = sysconf(_SC_PAGESIZE);
+	if (page_size == -1) {
+		goto error_close_unlink;
+	}
+
 	buffer = malloc (page_size);
 	if (buffer == NULL) {
 		goto error_close_unlink;
@@ -849,6 +855,17 @@ coroipcc_dispatch_get (
 		return (error);
 	}
 
+	if (shared_mem_dispatch_bytes_left (ipc_instance) > (ipc_instance->dispatch_size/2)) {
+		/*
+		 * Notify coroipcs to flush any pending dispatch messages
+		 */
+		res = ipc_sem_post (ipc_instance->control_buffer, SEMAPHORE_REQUEST_OR_FLUSH_OR_EXIT);
+		if (res != CS_OK) {
+			error = CS_ERR_LIBRARY;
+			goto error_put;
+		}
+	}
+
 	*data = NULL;
 
 	ufds.fd = ipc_instance->fd;
@@ -874,9 +891,16 @@ coroipcc_dispatch_get (
 	}
 
 	error = socket_recv (ipc_instance->fd, &buf, 1);
+#if defined(COROSYNC_SOLARIS) || defined(COROSYNC_BSD) || defined(COROSYNC_DARWIN)
+	/* On many OS poll() never returns POLLHUP or POLLERR.
+	 * EOF is detected when recvmsg() return 0.
+	 */
+	if ( error == CS_ERR_LIBRARY )
+		goto error_put;
+#endif
 	assert (error == CS_OK);
 
-	if (shared_mem_dispatch_bytes_left (ipc_instance) > 500000) {
+	if (shared_mem_dispatch_bytes_left (ipc_instance) > (ipc_instance->dispatch_size/2)) {
 		/*
 		 * Notify coroipcs to flush any pending dispatch messages
 		 */
@@ -932,7 +956,9 @@ retry_ipc_sem_wait:
 	read_idx = ipc_instance->control_buffer->read;
 	header = (coroipc_response_header_t *) &addr[read_idx];
 	ipc_instance->control_buffer->read =
-		(read_idx + header->size) % ipc_instance->dispatch_size;
+		((read_idx + header->size + 7) & 0xFFFFFFF8) %
+			ipc_instance->dispatch_size;
+
 	/*
 	 * Put from dispatch get and also from this call's get
 	 */
@@ -1033,7 +1059,7 @@ coroipcc_zcb_alloc (
 {
 	struct ipc_instance *ipc_instance;
 	void *buf = NULL;
-	char path[128];
+	char path[PATH_MAX];
 	unsigned int res;
 	mar_req_coroipcc_zc_alloc_t req_coroipcc_zc_alloc;
 	coroipc_response_header_t res_coroipcs_zc_alloc;
diff --git a/lib/cpg.c b/lib/cpg.c
index 11bae38..f61efde 100644
--- a/lib/cpg.c
+++ b/lib/cpg.c
@@ -239,22 +239,13 @@ cs_error_t cpg_finalize (
 		&iov,
 		1,
 		&res_lib_cpg_finalize,
-		sizeof (struct req_lib_cpg_finalize));
-
-	if (error != CS_OK) {
-		goto error_put;
-	}
+		sizeof (struct res_lib_cpg_finalize));
 
 	coroipcc_service_disconnect (cpg_inst->handle);
 
 	cpg_inst_finalize (cpg_inst, handle);
 	hdb_handle_put (&cpg_handle_t_db, handle);
 
-	return (CPG_OK);
-
-error_put:
-	hdb_handle_put (&cpg_iteration_handle_t_db, handle);
-	cpg_inst->finalize = 0;
 	return (error);
 }
 
diff --git a/lib/libcfg.verso b/lib/libcfg.verso
index fcdb2e1..1454f6e 100644
--- a/lib/libcfg.verso
+++ b/lib/libcfg.verso
@@ -1 +1 @@
-4.0.0
+4.0.1
diff --git a/lib/quorum.c b/lib/quorum.c
index a3453fa..136c563 100644
--- a/lib/quorum.c
+++ b/lib/quorum.c
@@ -93,9 +93,9 @@ cs_error_t quorum_initialize (
 	}
 
 	if (callbacks)
-		memcpy(&quorum_inst->callbacks, callbacks, sizeof (callbacks));
+		memcpy(&quorum_inst->callbacks, callbacks, sizeof (*callbacks));
 	else
-		memset(&quorum_inst->callbacks, 0, sizeof (callbacks));
+		memset(&quorum_inst->callbacks, 0, sizeof (*callbacks));
 
 	(void)hdb_handle_put (&quorum_handle_t_db, *handle);
 
diff --git a/lib/sa-confdb.c b/lib/sa-confdb.c
index 0a71115..03995e3 100644
--- a/lib/sa-confdb.c
+++ b/lib/sa-confdb.c
@@ -186,6 +186,14 @@ int confdb_sa_object_parent_get (
 	return objdb->object_parent_get(object_handle, parent_object_handle);
 }
 
+int confdb_sa_object_name_get(
+	hdb_handle_t object_handle,
+	char *object_name,
+	size_t *object_name_len)
+{
+	return objdb->object_name_get(object_handle, object_name, object_name_len);
+}
+
 int confdb_sa_key_create (
 	hdb_handle_t parent_object_handle,
 	const void *key_name,
diff --git a/lib/sa-confdb.h b/lib/sa-confdb.h
index d9ea906..61a0fa7 100644
--- a/lib/sa-confdb.h
+++ b/lib/sa-confdb.h
@@ -40,6 +40,9 @@ extern int confdb_sa_object_create(hdb_handle_t parent_object_handle,
 extern int confdb_sa_object_destroy(hdb_handle_t object_handle);
 extern int confdb_sa_object_parent_get(hdb_handle_t object_handle,
 				       hdb_handle_t *parent_object_handle);
+extern int confdb_sa_object_name_get(hdb_handle_t object_handle,
+				     char *object_name,
+				     size_t *object_name_len);
 extern int confdb_sa_key_create(hdb_handle_t parent_object_handle,
 				const void *key_name,
 				size_t key_name_len,
diff --git a/man/Makefile.am b/man/Makefile.am
index 0a75018..0a1a7e0 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -47,6 +47,7 @@ dist_man_MANS = \
 	corosync-cpgtool.8 \
 	corosync-fplay.8 \
 	corosync-pload.8 \
+	corosync-notifyd.8 \
 	corosync-quorumtool.8 \
 	corosync_overview.8 \
 	cpg_overview.8 \
diff --git a/man/Makefile.in b/man/Makefile.in
index e24823a..9f93bfa 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -137,6 +137,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -171,7 +173,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -182,6 +183,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -242,6 +246,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
@@ -260,6 +265,7 @@ dist_man_MANS = \
 	corosync-cpgtool.8 \
 	corosync-fplay.8 \
 	corosync-pload.8 \
+	corosync-notifyd.8 \
 	corosync-quorumtool.8 \
 	corosync_overview.8 \
 	cpg_overview.8 \
diff --git a/man/corosync-notifyd.8 b/man/corosync-notifyd.8
new file mode 100644
index 0000000..1ff8994
--- /dev/null
+++ b/man/corosync-notifyd.8
@@ -0,0 +1,145 @@
+.\"/*
+.\" * Copyright (C) 2010 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Angus Salkeld <asalkeld at redhat.com>
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH COROSYNC-NOTIFYD 8 2011-01-14
+.SH NAME
+corosync-notifyd \- Listen for important corosync events and send dbus and/or snmp traps.
+.SH SYNOPSIS
+.B "corosync-notifyd [\-f] [\-l] [\-o] [\-s] [\-m] [manager] [\-d] [-h]"
+.SH DESCRIPTION
+.B corosync-notifyd
+uses corosync API to listen for important cluster events and can log them,
+generate dbus signals or genterate snmp traps.
+.SH OPTIONS
+.TP
+.B -f
+Start application in foreground.
+.TP
+.B -l
+Log all events.
+.TP
+.B -o
+Print events to stdout (turns on -l).
+.TP
+.B -s
+Send SNMP traps on all events.
+.TP
+.B -m
+Set the SNMP manager address.
+.TP
+.B -d
+Send DBUS signals on all events.
+.TP
+.B -h
+Print this help
+.SH EXAMPLES
+.br
+$ corosync-notifyd -o
+.br
+corosync-notifyd[18505]: troll[23374016] corosync-notify:18505:12 is now connected to corosync
+.br
+corosync-notifyd[18505]: troll[23374016] corosync-notify:18505:13 is now disconnected from corosync
+.br
+corosync-notifyd[18505]: troll[23374016] is now quorate
+.br
+corosync-notifyd[18505]: r2[1550100672] ip:192.168.100.92 joined
+.br
+corosync-notifyd[18505]: r2[1550100672] ip:192.168.100.92 left
+.br
+
+.br
+$ corosync-notifyd -o
+.br
+
+Note this output below is from "dbus-monitor --system"
+
+.br
+signal sender=:1.216 -> dest=(null destination) serial=2 path=/com/redhat/cluster/corosync;
+ interface=com.redhat.cluster.corosync; member=ConnectionStateChange
+.br
+   string "troll"
+.br
+   uint32 23374016
+.br
+   string "corosync-notify:18900:12"
+.br
+   string "connected"
+.br
+signal sender=:1.216 -> dest=(null destination) serial=3 path=/com/redhat/cluster/corosync;
+ interface=com.redhat.cluster.corosync; member=ConnectionStateChange
+.br
+   string "troll"
+.br
+   uint32 23374016
+.br
+   string "corosync-notify:18900:13"
+.br
+   string "disconnected"
+.br
+signal sender=:1.216 -> dest=(null destination) serial=4 path=/com/redhat/cluster/corosync;
+ interface=com.redhat.cluster.corosync; member=QorumStateChange
+.br
+   string "troll"
+.br
+   uint32 23374016
+.br
+   string "quorate"
+.br
+signal sender=:1.216 -> dest=(null destination) serial=5 path=/com/redhat/cluster/corosync;
+ interface=com.redhat.cluster.corosync; member=NodeStateChange
+.br
+   string "r2"
+.br
+   uint32 1550100672
+.br
+   string "192.168.100.92"
+.br
+   string "joined"
+.br
+signal sender=:1.216 -> dest=(null destination) serial=6 path=/com/redhat/cluster/corosync;
+ interface=com.redhat.cluster.corosync; member=NodeStateChange
+.br
+   string "r2"
+.br
+   uint32 1550100672
+.br
+   string "192.168.100.92"
+.br
+   string "left"
+.SH SEE ALSO
+.BR corosync (8),
+.BR corosync-objctl (8),
+.BR dbus-monitor (1),
+.SH AUTHOR
+Angus Salkeld
+.PP
diff --git a/man/corosync-objctl.8 b/man/corosync-objctl.8
index b83e172..2b3a7b6 100644
--- a/man/corosync-objctl.8
+++ b/man/corosync-objctl.8
@@ -35,7 +35,7 @@
 .SH NAME
 corosync-objctl \- Configure objects in the Object Database
 .SH SYNOPSIS
-.B "corosync-objctl [\-c|\-w|\-d|\-a|\-t\-h] <OBJECT-SPEC>..."
+.B "corosync-objctl [\-b] [\-c|\-w|\-d|\-a|\-t\-h] <OBJECT-SPEC>..."
 .SH DESCRIPTION
 .B corosync-objctl
 is used to configure objects within the object database at runtime.
@@ -74,6 +74,9 @@ they are printed out. this is kind of like a "tail -f" for the object database.
 .TP
 .B -h
 Print basic usage.
+.TP
+.B -b
+Display binary values in BASH backslash escape sequences format.
 .SH EXAMPLES
 .TP
 Print the objOne object (shouldn't exist yet).
diff --git a/man/corosync.conf.5 b/man/corosync.conf.5
index 8fc3dc6..b6f769e 100644
--- a/man/corosync.conf.5
+++ b/man/corosync.conf.5
@@ -128,6 +128,13 @@ If you have multiple clusters on the same network using the same mcastaddr
 please configure the mcastports with a gap.
 
 .TP
+ttl
+This specifies the Time To Live (TTL). If you run your cluster on a routed
+network then the default of "1" will be too small. This option provides
+a way to increase this up to 255. The valid range is 0..255.
+Note that this is only valid on multicast transport types.
+
+.TP
 member
 This specifies a member on the interface and used with the udpu transport only.
 Every node that should be a member of the membership should be specified as
@@ -373,7 +380,7 @@ This constant specifies how many rotations of the token without receiving any
 of the messages when messages should be received may occur before a new
 configuration is formed.
 
-The default is 50 failures to receive a message.
+The default is 2500 failures to receive a message.
 
 .TP
 seqno_unchanged_const
@@ -432,6 +439,16 @@ processor on receipt of the token.  The max_messages parameter is limited to
 The default is 17 messages.
 
 .TP
+miss_count_const
+This constant defines the maximum number of times on receipt of a token
+a message is checked for retransmission before a retransmission occurs.  This
+parameter is useful to modify for switches that delay multicast packets
+compared to unicast packets.  The default setting works well for nearly all
+modern switches.
+
+The default is 5 messages.
+
+.TP
 rrp_problem_count_timeout
 This specifies the time in milliseconds to wait before decrementing the
 problem count by 1 for a particular ring to ensure a link is not marked
@@ -466,6 +483,13 @@ override this value without guidance from the corosync community.
 
 The default is 47 milliseconds.
 
+.TP
+rrp_autorecovery_check_timeout
+This specifies the time in milliseconds to check if the failed ring can be
+auto-recovered.
+
+The default is 1000 milliseconds.
+
 .PP
 Within the
 .B logging
diff --git a/man/corosync_overview.8 b/man/corosync_overview.8
index 989b762..6d95fe9 100644
--- a/man/corosync_overview.8
+++ b/man/corosync_overview.8
@@ -134,7 +134,7 @@ After running aisexec, a list of all processors IP addresses running the corosyn
 executive and configured on the same multicast address will appear.  If they
 don't appear, there may be a problem with multicast in the distro or hardware.
 If this happens, participation in the corosync mailing list may help solve the
-problem.  The email address is corosync at lists.osdl.org.
+problem.  The email address is openais at lists.osdl.org.
 
 .SH USING LIBRARIES
 The corosync AIS libraries have header files which must be included in the
diff --git a/man/cpg_mcast_joined.3 b/man/cpg_mcast_joined.3
index 5597aa0..26ffea8 100644
--- a/man/cpg_mcast_joined.3
+++ b/man/cpg_mcast_joined.3
@@ -38,7 +38,7 @@ cpg_mcast_joined \- Multicasts to all groups joined to a handle
 .B #include <sys/uio.h>
 .B #include <corosync/cpg.h>
 .sp
-.BI "int cpg_mcast_joined(cpg_handle_t " handle ", cpg_gurantee_t " guarantee ", struct iovec *" iovec ", int " iov_len ");
+.BI "int cpg_mcast_joined(cpg_handle_t " handle ", cpg_guarantee_t " guarantee ", struct iovec *" iovec ", int " iov_len ");
 .SH DESCRIPTION
 The
 .B cpg_mcast_joined
diff --git a/man/cpg_zcb_mcast_joined.3 b/man/cpg_zcb_mcast_joined.3
index cc0c4eb..c5131c1 100644
--- a/man/cpg_zcb_mcast_joined.3
+++ b/man/cpg_zcb_mcast_joined.3
@@ -38,7 +38,7 @@ cpg_mcast_joined \- Multicasts a zero copy buffer to all groups joined to a hand
 .B #include <sys/uio.h>
 .B #include <corosync/cpg.h>
 .sp
-.BI "int cpg_zcb_mcast_joined(cpg_handle_t " handle ", cpg_gurantee_t " guarantee ", const void *" buffer "", int " msg_len ");
+.BI "int cpg_zcb_mcast_joined(cpg_handle_t " handle ", cpg_guarantee_t " guarantee ", const void *" buffer "", int " msg_len ");
 .SH DESCRIPTION
 The
 .B cpg_zcb_mcast_joined
diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in
index 70be69e..009e21c 100644
--- a/pkgconfig/Makefile.in
+++ b/pkgconfig/Makefile.in
@@ -104,6 +104,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -140,7 +142,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -151,6 +152,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -211,6 +215,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/services/Makefile.in b/services/Makefile.in
index af41f3e..11a6826 100644
--- a/services/Makefile.in
+++ b/services/Makefile.in
@@ -104,6 +104,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -138,7 +140,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -149,6 +150,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -209,6 +213,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/services/cfg.c b/services/cfg.c
index 109bea8..0419847 100644
--- a/services/cfg.c
+++ b/services/cfg.c
@@ -584,6 +584,8 @@ static void message_handler_req_exec_cfg_ringreenable (
 			req_exec_cfg_ringreenable->source.conn,
 			&res_lib_cfg_ringreenable,
 			sizeof (struct res_lib_cfg_ringreenable));
+
+		api->ipc_refcnt_dec(req_exec_cfg_ringreenable->source.conn);
 	}
 	LEAVE();
 }
@@ -704,6 +706,7 @@ static void message_handler_req_lib_cfg_ringreenable (
 	req_exec_cfg_ringreenable.header.id = SERVICE_ID_MAKE (CFG_SERVICE,
 		MESSAGE_REQ_EXEC_CFG_RINGREENABLE);
 	api->ipc_source_set (&req_exec_cfg_ringreenable.source, conn);
+	api->ipc_refcnt_inc(conn);
 
 	iovec.iov_base = (char *)&req_exec_cfg_ringreenable;
 	iovec.iov_len = sizeof (struct req_exec_cfg_ringreenable);
@@ -1040,6 +1043,7 @@ static void message_handler_req_lib_cfg_get_node_addrs (void *conn,
 	const struct req_lib_cfg_get_node_addrs *req_lib_cfg_get_node_addrs = msg;
 	struct res_lib_cfg_get_node_addrs *res_lib_cfg_get_node_addrs = (struct res_lib_cfg_get_node_addrs *)buf;
 	unsigned int nodeid = req_lib_cfg_get_node_addrs->nodeid;
+	char *addr_buf;
 
 	if (nodeid == 0)
 		nodeid = api->totem_nodeid_get();
@@ -1052,8 +1056,9 @@ static void message_handler_req_lib_cfg_get_node_addrs (void *conn,
 	res_lib_cfg_get_node_addrs->num_addrs = num_interfaces;
 	if (num_interfaces) {
 		res_lib_cfg_get_node_addrs->family = node_ifs[0].family;
-		for (i = 0; i<num_interfaces; i++) {
-			memcpy(&res_lib_cfg_get_node_addrs->addrs[i][0], node_ifs[i].addr, TOTEMIP_ADDRLEN);
+		for (i = 0, addr_buf = (char *)res_lib_cfg_get_node_addrs->addrs;
+		    i < num_interfaces; i++, addr_buf += TOTEMIP_ADDRLEN) {
+			memcpy(addr_buf, node_ifs[i].addr, TOTEMIP_ADDRLEN);
 		}
 	}
 	else {
diff --git a/services/confdb.c b/services/confdb.c
index 90dd7db..39dbd93 100644
--- a/services/confdb.c
+++ b/services/confdb.c
@@ -40,6 +40,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
+#include <poll.h>
 
 #include <corosync/corotypes.h>
 #include <corosync/coroipc_types.h>
@@ -51,6 +52,7 @@
 #include <corosync/lcr/lcr_comp.h>
 #include <corosync/engine/logsys.h>
 #include <corosync/engine/coroapi.h>
+#include <corosync/totem/coropoll.h>
 
 LOGSYS_DECLARE_SUBSYS ("CONFDB");
 
@@ -65,8 +67,28 @@ m2h (mar_uint64_t *m)
 
 static struct corosync_api_v1 *api;
 
+static int notify_pipe[2];
+
+struct confdb_ipc_message_holder {
+	void *conn;
+	size_t mlen;
+	struct list_head list;
+	char msg[];
+};
+
+DECLARE_LIST_INIT(confdb_ipc_message_holder_list_head);
+
+pthread_mutex_t confdb_ipc_message_holder_list_mutex =
+	PTHREAD_MUTEX_INITIALIZER;
+
 static int confdb_exec_init_fn (
 	struct corosync_api_v1 *corosync_api);
+static int confdb_exec_exit_fn(void);
+
+static int fd_set_nonblocking(int fd);
+
+static int objdb_notify_dispatch(hdb_handle_t handle,
+		int fd,	int revents, void *data);
 
 static int confdb_lib_init_fn (void *conn);
 static int confdb_lib_exit_fn (void *conn);
@@ -107,6 +129,8 @@ static void message_handler_req_lib_confdb_object_find (void *conn,
 
 static void message_handler_req_lib_confdb_object_parent_get (void *conn,
 							      const void *message);
+static void message_handler_req_lib_confdb_object_name_get (void *conn,
+							      const void *message);
 static void message_handler_req_lib_confdb_write (void *conn,
 						  const void *message);
 static void message_handler_req_lib_confdb_reload (void *conn,
@@ -129,12 +153,12 @@ static void confdb_notify_lib_of_key_change(
 static void confdb_notify_lib_of_new_object(
 	hdb_handle_t parent_object_handle,
 	hdb_handle_t object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt);
 
 static void confdb_notify_lib_of_destroyed_object(
 	hdb_handle_t parent_object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt);
 
 static void confdb_notify_lib_of_reload(
@@ -227,6 +251,10 @@ static struct corosync_lib_handler confdb_lib_engine[] =
 		.lib_handler_fn				= message_handler_req_lib_confdb_key_iter_typed,
 		.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
 	},
+	{ /* 20 */
+		.lib_handler_fn				= message_handler_req_lib_confdb_object_name_get,
+		.flow_control				= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+	},
 };
 
 
@@ -242,6 +270,7 @@ struct corosync_service_engine confdb_service_engine = {
 	.lib_engine				= confdb_lib_engine,
 	.lib_engine_count			= sizeof (confdb_lib_engine) / sizeof (struct corosync_lib_handler),
 	.exec_init_fn				= confdb_exec_init_fn,
+	.exec_exit_fn				= confdb_exec_exit_fn,
 };
 
 /*
@@ -290,14 +319,36 @@ __attribute__ ((constructor)) static void corosync_lcr_component_register (void)
 	lcr_component_register (&confdb_comp_ver0);
 }
 
+static int confdb_exec_exit_fn(void)
+{
+	api->poll_dispatch_delete(api->poll_handle_get(), notify_pipe[0]);
+	close(notify_pipe[0]);
+	close(notify_pipe[1]);
+	return 0;
+}
+
 static int confdb_exec_init_fn (
 	struct corosync_api_v1 *corosync_api)
 {
+	int i;
+
 #ifdef COROSYNC_SOLARIS
 	logsys_subsys_init();
 #endif
 	api = corosync_api;
-	return 0;
+
+	if (pipe(notify_pipe) != 0) {
+		return -1;
+	}
+
+	for (i = 0; i < 2; i++) {
+		if (fd_set_nonblocking (notify_pipe[i]) == -1) {
+			return -1;
+		}
+	}
+
+	return api->poll_dispatch_add(api->poll_handle_get(), notify_pipe[0],
+		POLLIN, NULL, objdb_notify_dispatch);
 }
 
 static int confdb_lib_init_fn (void *conn)
@@ -313,11 +364,28 @@ static int confdb_lib_exit_fn (void *conn)
 	api->object_track_stop(confdb_notify_lib_of_key_change,
 		confdb_notify_lib_of_new_object,
 		confdb_notify_lib_of_destroyed_object,
-		NULL,
+		confdb_notify_lib_of_reload,
 		conn);
 	return (0);
 }
 
+static int fd_set_nonblocking(int fd)
+{
+	int flags;
+	int res;
+
+	flags = fcntl (fd, F_GETFL);
+	if (flags == -1) {
+		return -1;
+	}
+
+	flags |= O_NONBLOCK;
+
+	res = fcntl (fd, F_SETFL, flags);
+
+	return res;
+}
+
 static void message_handler_req_lib_confdb_object_create (void *conn,
 							  const void *message)
 {
@@ -570,6 +638,28 @@ static void message_handler_req_lib_confdb_object_parent_get (void *conn,
 	api->ipc_response_send(conn, &res_lib_confdb_object_parent_get, sizeof(res_lib_confdb_object_parent_get));
 }
 
+static void message_handler_req_lib_confdb_object_name_get (void *conn,
+							      const void *message)
+{
+	const struct req_lib_confdb_object_name_get *request = message;
+	struct res_lib_confdb_object_name_get response;
+	int ret = CS_OK;
+	char object_name[CS_MAX_NAME_LENGTH];
+	size_t object_name_len;
+
+	if (api->object_name_get(request->object_handle,
+				object_name, &object_name_len)) {
+		ret = CS_ERR_ACCESS;
+	}
+
+	response.object_name.length = object_name_len;
+	strncpy((char*)response.object_name.value, object_name, CS_MAX_NAME_LENGTH);
+	response.object_name.value[CS_MAX_NAME_LENGTH-1] = '\0';
+	response.header.size = sizeof(response);
+	response.header.id = MESSAGE_RES_CONFDB_OBJECT_NAME_GET;
+	response.header.error = ret;
+	api->ipc_response_send(conn, &response, sizeof(response));
+}
 
 static void message_handler_req_lib_confdb_key_iter (void *conn,
 						     const void *message)
@@ -651,9 +741,12 @@ static void message_handler_req_lib_confdb_object_iter (void *conn,
 	int ret = CS_OK;
 
 	if (!req_lib_confdb_object_iter->find_handle) {
-		api->object_find_create(req_lib_confdb_object_iter->parent_object_handle,
+		if (api->object_find_create(req_lib_confdb_object_iter->parent_object_handle,
 					NULL, 0,
-					m2h(&res_lib_confdb_object_iter.find_handle));
+					m2h(&res_lib_confdb_object_iter.find_handle)) == -1) {
+			ret = CS_ERR_ACCESS;
+			goto response_send;
+		}
 	}
 	else
 		res_lib_confdb_object_iter.find_handle = req_lib_confdb_object_iter->find_handle;
@@ -664,12 +757,17 @@ static void message_handler_req_lib_confdb_object_iter (void *conn,
 		api->object_find_destroy(res_lib_confdb_object_iter.find_handle);
 	}
 	else {
-		api->object_name_get(res_lib_confdb_object_iter.object_handle,
+		if (api->object_name_get(res_lib_confdb_object_iter.object_handle,
 				     (char *)res_lib_confdb_object_iter.object_name.value,
-				     &object_name_len);
-
-		res_lib_confdb_object_iter.object_name.length = object_name_len;
+				     &object_name_len) == -1) {
+			ret = CS_ERR_ACCESS;
+			goto response_send;
+		} else {
+			res_lib_confdb_object_iter.object_name.length = object_name_len;
+		}
 	}
+
+response_send:
 	res_lib_confdb_object_iter.header.size = sizeof(res_lib_confdb_object_iter);
 	res_lib_confdb_object_iter.header.id = MESSAGE_RES_CONFDB_OBJECT_ITER;
 	res_lib_confdb_object_iter.header.error = ret;
@@ -686,10 +784,13 @@ static void message_handler_req_lib_confdb_object_find (void *conn,
 	int ret = CS_OK;
 
 	if (!req_lib_confdb_object_find->find_handle) {
-		api->object_find_create(req_lib_confdb_object_find->parent_object_handle,
+		if (api->object_find_create(req_lib_confdb_object_find->parent_object_handle,
 					req_lib_confdb_object_find->object_name.value,
 					req_lib_confdb_object_find->object_name.length,
-					m2h(&res_lib_confdb_object_find.find_handle));
+					m2h(&res_lib_confdb_object_find.find_handle)) == -1) {
+			ret = CS_ERR_ACCESS;
+			goto response_send;
+		}
 	}
 	else
 		res_lib_confdb_object_find.find_handle = req_lib_confdb_object_find->find_handle;
@@ -700,6 +801,8 @@ static void message_handler_req_lib_confdb_object_find (void *conn,
 		api->object_find_destroy(res_lib_confdb_object_find.find_handle);
 	}
 
+
+response_send:
 	res_lib_confdb_object_find.header.size = sizeof(res_lib_confdb_object_find);
 	res_lib_confdb_object_find.header.id = MESSAGE_RES_CONFDB_OBJECT_FIND;
 	res_lib_confdb_object_find.header.error = ret;
@@ -754,6 +857,124 @@ static void message_handler_req_lib_confdb_reload (void *conn,
 	api->ipc_response_send(conn, &res_lib_confdb_reload, sizeof(res_lib_confdb_reload));
 }
 
+static int objdb_notify_dispatch(hdb_handle_t handle,
+		int fd,	int revents, void *data)
+{
+	struct confdb_ipc_message_holder *holder;
+	ssize_t rc;
+	char pipe_cmd;
+
+	if (revents & POLLHUP) {
+		return -1;
+	}
+
+	pthread_mutex_lock (&confdb_ipc_message_holder_list_mutex);
+
+retry_read:
+	rc = read(fd, &pipe_cmd, sizeof(pipe_cmd));
+	if (rc == sizeof(pipe_cmd)) {
+		goto retry_read;	/* Flush whole buffer */
+	}
+
+	if (rc == -1) {
+		if (errno == EINTR) {
+			goto retry_read;
+		}
+
+		if (errno != EAGAIN && errno != EWOULDBLOCK) {
+			goto unlock_exit;
+		}
+	} else {
+		goto unlock_exit;	/* rc != -1 && rc != 1 -> end of file */
+	}
+
+	while (!list_empty (&confdb_ipc_message_holder_list_head)) {
+		holder = list_entry (confdb_ipc_message_holder_list_head.next,
+			    struct confdb_ipc_message_holder, list);
+
+		list_del (&holder->list);
+
+		/*
+		 * All list operations are done now, so unlock list mutex to
+		 * prevent deadlock in IPC.
+		 */
+		pthread_mutex_unlock (&confdb_ipc_message_holder_list_mutex);
+
+		api->ipc_dispatch_send(holder->conn, holder->msg, holder->mlen);
+
+		api->ipc_refcnt_dec(holder->conn);
+
+		free(holder);
+
+		/*
+		 * Next operation is again list one, so lock list again.
+		 */
+		pthread_mutex_lock (&confdb_ipc_message_holder_list_mutex);
+	}
+
+unlock_exit:
+	pthread_mutex_unlock (&confdb_ipc_message_holder_list_mutex);
+
+	return 0;
+}
+
+static int32_t ipc_dispatch_send_from_poll_thread(void *conn, const void *msg, size_t mlen)
+{
+	struct confdb_ipc_message_holder *holder;
+	ssize_t written;
+	size_t holder_size;
+	char pipe_cmd;
+
+	api->ipc_refcnt_inc(conn);
+
+	holder_size = sizeof (*holder) + mlen;
+	holder = malloc (holder_size);
+	if (holder == NULL) {
+		api->ipc_refcnt_dec(conn);
+		return -1;
+	}
+
+	memset(holder, 0, holder_size);
+	holder->conn = conn;
+	holder->mlen = mlen;
+	memcpy(holder->msg, msg, mlen);
+	list_init(&holder->list);
+
+	pthread_mutex_lock (&confdb_ipc_message_holder_list_mutex);
+
+	list_add_tail (&holder->list, &confdb_ipc_message_holder_list_head);
+
+	pipe_cmd = 'M';		/* Message */
+retry_write:
+	written = write(notify_pipe[1], &pipe_cmd, sizeof(pipe_cmd));
+
+	if (written == -1) {
+		if (errno == EINTR) {
+			goto retry_write;
+		}
+
+		if (errno != EAGAIN && errno != EWOULDBLOCK)  {
+			/*
+			 * Different error then EINTR or BLOCK -> exit with error
+			 */
+			goto refcnt_del_unlock_exit;
+		}
+	} else if (written != sizeof (pipe_cmd)) {
+		goto refcnt_del_unlock_exit;
+	}
+	pthread_mutex_unlock (&confdb_ipc_message_holder_list_mutex);
+
+	return 0;
+
+refcnt_del_unlock_exit:
+	list_del (&holder->list);
+	free(holder);
+	api->ipc_refcnt_dec(conn);
+	pthread_mutex_unlock (&confdb_ipc_message_holder_list_mutex);
+
+	return -1;
+}
+
 static void confdb_notify_lib_of_key_change(object_change_type_t change_type,
 	hdb_handle_t parent_object_handle,
 	hdb_handle_t object_handle,
@@ -781,12 +1002,12 @@ static void confdb_notify_lib_of_key_change(object_change_type_t change_type,
 	memcpy(res.key_value.value, key_value_pt, key_value_len);
 	res.key_value.length = key_value_len;
 
-	api->ipc_dispatch_send(priv_data_pt, &res, sizeof(res));
+	ipc_dispatch_send_from_poll_thread(priv_data_pt, &res, sizeof(res));
 }
 
 static void confdb_notify_lib_of_new_object(hdb_handle_t parent_object_handle,
 	hdb_handle_t object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt)
 {
 	struct res_lib_confdb_object_create_callback res;
@@ -799,12 +1020,12 @@ static void confdb_notify_lib_of_new_object(hdb_handle_t parent_object_handle,
 	memcpy(res.name.value, name_pt, name_len);
 	res.name.length = name_len;
 
-	api->ipc_dispatch_send(priv_data_pt, &res, sizeof(res));
+	ipc_dispatch_send_from_poll_thread(priv_data_pt, &res, sizeof(res));
 }
 
 static void confdb_notify_lib_of_destroyed_object(
 	hdb_handle_t parent_object_handle,
-	const uint8_t *name_pt, size_t name_len,
+	const void *name_pt, size_t name_len,
 	void *priv_data_pt)
 {
 	struct res_lib_confdb_object_destroy_callback res;
@@ -816,7 +1037,7 @@ static void confdb_notify_lib_of_destroyed_object(
 	memcpy(res.name.value, name_pt, name_len);
 	res.name.length = name_len;
 
-	api->ipc_dispatch_send(priv_data_pt, &res, sizeof(res));
+	ipc_dispatch_send_from_poll_thread(priv_data_pt, &res, sizeof(res));
 }
 
 static void confdb_notify_lib_of_reload(objdb_reload_notify_type_t notify_type,
@@ -830,7 +1051,7 @@ static void confdb_notify_lib_of_reload(objdb_reload_notify_type_t notify_type,
 	res.header.error = CS_OK;
 	res.type = notify_type;
 
-	api->ipc_dispatch_send(priv_data_pt, &res, sizeof(res));
+	ipc_dispatch_send_from_poll_thread(priv_data_pt, &res, sizeof(res));
 }
 
 
diff --git a/services/cpg.c b/services/cpg.c
index a0336ed..6669fbd 100644
--- a/services/cpg.c
+++ b/services/cpg.c
@@ -711,26 +711,41 @@ static int notify_lib_joinlist(
 	return CPG_OK;
 }
 
+static void downlist_log(int loglevel, const char *msg, struct downlist_msg* dl)
+{
+	log_printf (loglevel,
+		    "%s: sender %s; members(old:%d left:%d)",
+		    msg,
+		    api->totem_ifaces_print(dl->sender_nodeid),
+		    dl->old_members,
+		    dl->left_nodes);
+}
+
 static struct downlist_msg* downlist_master_choose (void)
 {
 	struct downlist_msg *cmp;
 	struct downlist_msg *best = NULL;
 	struct list_head *iter;
+	uint32_t cmp_members;
+	uint32_t best_members;
 
 	for (iter = downlist_messages_head.next;
 		iter != &downlist_messages_head;
 		iter = iter->next) {
 
 		cmp = list_entry(iter, struct downlist_msg, list);
+		downlist_log(LOGSYS_LEVEL_DEBUG, "comparing", cmp);
 		if (best == NULL) {
 			best = cmp;
 			continue;
 		}
+		best_members = best->old_members - best->left_nodes;
+		cmp_members = cmp->old_members - cmp->left_nodes;
 
-		if (cmp->old_members < best->old_members) {
+		if (cmp_members < best_members) {
 			continue;
 		}
-		else if (cmp->old_members > best->old_members) {
+		else if (cmp_members > best_members) {
 			best = cmp;
 		}
 		else if (cmp->sender_nodeid < best->sender_nodeid) {
@@ -755,9 +770,7 @@ static void downlist_master_choose_and_send (void)
 		log_printf (LOGSYS_LEVEL_INFO, "NO chosen downlist");
 		return;
 	}
-
-	log_printf (LOGSYS_LEVEL_INFO, "chosen downlist from node %s",
-		api->totem_ifaces_print(stored_msg->sender_nodeid));
+	downlist_log(LOGSYS_LEVEL_INFO, "chosen downlist", stored_msg);
 
 	/* send events */
 	for (iter = process_info_list_head.next; iter != &process_info_list_head; ) {
@@ -996,7 +1009,7 @@ static void do_proc_join(
 		}
 		list_to_add = list;
 	}
-	list_splice (&pi->list, list_to_add);
+	list_add (&pi->list, list_to_add);
 
 	notify_info.pid = pi->pid;
 	notify_info.nodeid = nodeid;
diff --git a/services/votequorum.c b/services/votequorum.c
index 5b89359..291da4b 100644
--- a/services/votequorum.c
+++ b/services/votequorum.c
@@ -1052,6 +1052,11 @@ static void message_handler_req_exec_votequorum_nodeinfo (
 	if (new_node || req_exec_quorum_nodeinfo->first_trans || 
 	    old_votes != node->votes || old_expected != node->expected_votes || old_state != node->state)
 		recalculate_quorum(0, 0);
+
+	if (!nodeid) {
+		free(node);
+	}
+
 	LEAVE();
 }
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 9494d55..0ed2cca 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -258,6 +258,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -292,7 +294,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -303,6 +304,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -363,6 +367,7 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
diff --git a/test/testcpg.c b/test/testcpg.c
index 44556f9..672e554 100644
--- a/test/testcpg.c
+++ b/test/testcpg.c
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -140,7 +141,7 @@ static void TotemConfchgCallback (
 {
 	int i;
 
-	printf("\nTotemConfchgCallback: ringid (%u.%llu)\n", ring_id.nodeid, ring_id.seq);
+	printf("\nTotemConfchgCallback: ringid (%u.%"PRIu64")\n", ring_id.nodeid, ring_id.seq);
 
 	printf("active processors %lu: ",
 	       (unsigned long int) member_list_entries);
diff --git a/test/testcpgzc.c b/test/testcpgzc.c
index 5b496a8..6b3713b 100644
--- a/test/testcpgzc.c
+++ b/test/testcpgzc.c
@@ -49,6 +49,9 @@
 #include <corosync/corotypes.h>
 #include <corosync/cpg.h>
 
+#define BUFFER_SIZE	8192
+#define DEFAULT_GROUP_NAME	"GROUP"
+
 static int quit = 0;
 static int show_ip = 0;
 
@@ -181,8 +184,8 @@ int main (int argc, char *argv[]) {
 		group_name.length = strlen(argv[optind])+1;
 	}
 	else {
-		strcpy(group_name.value, "GROUP");
-		group_name.length = 6;
+		strcpy(group_name.value, DEFAULT_GROUP_NAME);
+		group_name.length = strlen(DEFAULT_GROUP_NAME) + 1;
 	}
 
 	result = cpg_initialize (&handle, &callbacks);
@@ -190,9 +193,9 @@ int main (int argc, char *argv[]) {
 		printf ("Could not initialize Cluster Process Group API instance error %d\n", result);
 		exit (1);
 	}
-	cpg_zcb_alloc (handle, 8192, &buffer);
+	cpg_zcb_alloc (handle, BUFFER_SIZE, &buffer);
 	cpg_zcb_free (handle, buffer);
-	cpg_zcb_alloc (handle, 8192, &buffer);
+	cpg_zcb_alloc (handle, BUFFER_SIZE, &buffer);
 
 	result = cpg_local_get (handle, &nodeid);
 	if (result != CS_OK) {
@@ -218,7 +221,7 @@ int main (int argc, char *argv[]) {
 			perror ("select\n");
 		}
 		if (FD_ISSET (STDIN_FILENO, &read_fds)) {
-			fgets_res = fgets(buffer, sizeof(buffer), stdin);
+			fgets_res = fgets(buffer, BUFFER_SIZE, stdin);
 			if (fgets_res == NULL) {
 				cpg_leave(handle, &group_name);
 			}
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3a52f4a..1b598c3 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -30,15 +30,17 @@
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 MAINTAINERCLEANFILES    = Makefile.in
-INCLUDES       		= -I$(top_builddir)/include  -I$(top_srcdir)/include
+INCLUDES       		= -I$(top_builddir)/include  -I$(top_srcdir)/include \
+                          -I$(top_builddir)/include/corosync
 
 sbin_PROGRAMS		= corosync-fplay corosync-cfgtool \
 			  corosync-keygen corosync-objctl \
-			  corosync-pload corosync-cpgtool corosync-quorumtool
+			  corosync-pload corosync-cpgtool corosync-quorumtool \
+			  corosync-notifyd
 
 bin_SCRIPTS		= corosync-blackbox
 
-EXTRA_DIST		= $(bin_SCRIPTS)
+EXTRA_DIST		= $(bin_SCRIPTS) corosync-notifyd.sysconfig.example
 
 corosync_pload_LDADD	= -lpload -lcoroipcc
 corosync_pload_LDFLAGS	= -L../lib
@@ -52,5 +54,14 @@ corosync_quorumtool_LDADD = -lconfdb -lcfg -lquorum \
 			    -lvotequorum -lcoroipcc ../lcr/liblcr.a
 corosync_quorumtool_LDFLAGS = -L../lib
 
+corosync_notifyd_LDADD = -lcfg -lconfdb ../lcr/liblcr.a -lcoroipcc \
+			   ../exec/coropoll.o $(DBUS_LIBS) $(SNMPLIBS) \
+			   -lquorum
+corosync_notifyd_LDFLAGS = -L../lib
+corosync_notifyd_CPPFLAGS = $(DBUS_CFLAGS)
+
+
 lint:
-	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+	-splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(INCLUDES) $(CFLAGS) *.c
+
+
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 6f57f8d..84849ea 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -69,7 +69,7 @@ host_triplet = @host@
 sbin_PROGRAMS = corosync-fplay$(EXEEXT) corosync-cfgtool$(EXEEXT) \
 	corosync-keygen$(EXEEXT) corosync-objctl$(EXEEXT) \
 	corosync-pload$(EXEEXT) corosync-cpgtool$(EXEEXT) \
-	corosync-quorumtool$(EXEEXT)
+	corosync-quorumtool$(EXEEXT) corosync-notifyd$(EXEEXT)
 subdir = tools
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -106,6 +106,14 @@ corosync_fplay_LDADD = $(LDADD)
 corosync_keygen_SOURCES = corosync-keygen.c
 corosync_keygen_OBJECTS = corosync-keygen.$(OBJEXT)
 corosync_keygen_LDADD = $(LDADD)
+corosync_notifyd_SOURCES = corosync-notifyd.c
+corosync_notifyd_OBJECTS =  \
+	corosync_notifyd-corosync-notifyd.$(OBJEXT)
+am__DEPENDENCIES_1 =
+corosync_notifyd_DEPENDENCIES = ../lcr/liblcr.a ../exec/coropoll.o \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+corosync_notifyd_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(corosync_notifyd_LDFLAGS) $(LDFLAGS) -o $@
 corosync_objctl_SOURCES = corosync-objctl.c
 corosync_objctl_OBJECTS = corosync-objctl.$(OBJEXT)
 corosync_objctl_DEPENDENCIES = ../lcr/liblcr.a
@@ -152,11 +160,11 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = corosync-cfgtool.c corosync-cpgtool.c corosync-fplay.c \
-	corosync-keygen.c corosync-objctl.c corosync-pload.c \
-	corosync-quorumtool.c
+	corosync-keygen.c corosync-notifyd.c corosync-objctl.c \
+	corosync-pload.c corosync-quorumtool.c
 DIST_SOURCES = corosync-cfgtool.c corosync-cpgtool.c corosync-fplay.c \
-	corosync-keygen.c corosync-objctl.c corosync-pload.c \
-	corosync-quorumtool.c
+	corosync-keygen.c corosync-notifyd.c corosync-objctl.c \
+	corosync-pload.c corosync-quorumtool.c
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -180,6 +188,8 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_OPTS = @DARWIN_OPTS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
@@ -214,7 +224,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKGCONFIG = @PKGCONFIG@
@@ -225,6 +234,9 @@ RANLIB = @RANLIB@
 SAM_SONAME = @SAM_SONAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SNMPCONFIG = @SNMPCONFIG@
+SNMPLIBS = @SNMPLIBS@
+SNMP_LCRSO = @SNMP_LCRSO@
 SOCKETDIR = @SOCKETDIR@
 SOLARIS_OPTS = @SOLARIS_OPTS@
 SOMAJOR = @SOMAJOR@
@@ -285,15 +297,18 @@ rdmacm_LIBS = @rdmacm_LIBS@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
+statgrab_LIBS = @statgrab_LIBS@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-INCLUDES = -I$(top_builddir)/include  -I$(top_srcdir)/include
+INCLUDES = -I$(top_builddir)/include  -I$(top_srcdir)/include \
+                          -I$(top_builddir)/include/corosync
+
 bin_SCRIPTS = corosync-blackbox
-EXTRA_DIST = $(bin_SCRIPTS)
+EXTRA_DIST = $(bin_SCRIPTS) corosync-notifyd.sysconfig.example
 corosync_pload_LDADD = -lpload -lcoroipcc
 corosync_pload_LDFLAGS = -L../lib
 corosync_objctl_LDADD = -lconfdb ../lcr/liblcr.a -lcoroipcc
@@ -306,6 +321,12 @@ corosync_quorumtool_LDADD = -lconfdb -lcfg -lquorum \
 			    -lvotequorum -lcoroipcc ../lcr/liblcr.a
 
 corosync_quorumtool_LDFLAGS = -L../lib
+corosync_notifyd_LDADD = -lcfg -lconfdb ../lcr/liblcr.a -lcoroipcc \
+			   ../exec/coropoll.o $(DBUS_LIBS) $(SNMPLIBS) \
+			   -lquorum
+
+corosync_notifyd_LDFLAGS = -L../lib
+corosync_notifyd_CPPFLAGS = $(DBUS_CFLAGS)
 all: all-am
 
 .SUFFIXES:
@@ -389,6 +410,9 @@ corosync-fplay$(EXEEXT): $(corosync_fplay_OBJECTS) $(corosync_fplay_DEPENDENCIES
 corosync-keygen$(EXEEXT): $(corosync_keygen_OBJECTS) $(corosync_keygen_DEPENDENCIES) 
 	@rm -f corosync-keygen$(EXEEXT)
 	$(LINK) $(corosync_keygen_OBJECTS) $(corosync_keygen_LDADD) $(LIBS)
+corosync-notifyd$(EXEEXT): $(corosync_notifyd_OBJECTS) $(corosync_notifyd_DEPENDENCIES) 
+	@rm -f corosync-notifyd$(EXEEXT)
+	$(corosync_notifyd_LINK) $(corosync_notifyd_OBJECTS) $(corosync_notifyd_LDADD) $(LIBS)
 corosync-objctl$(EXEEXT): $(corosync_objctl_OBJECTS) $(corosync_objctl_DEPENDENCIES) 
 	@rm -f corosync-objctl$(EXEEXT)
 	$(corosync_objctl_LINK) $(corosync_objctl_OBJECTS) $(corosync_objctl_LDADD) $(LIBS)
@@ -446,6 +470,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/corosync-objctl.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/corosync-pload.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/corosync-quorumtool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/corosync_notifyd-corosync-notifyd.Po at am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -461,6 +486,20 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
+corosync_notifyd-corosync-notifyd.o: corosync-notifyd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(corosync_notifyd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT corosync_notifyd-corosync-notifyd.o -MD -MP -MF $(DEPDIR)/corosync_notifyd-corosync-notifyd.Tpo -c -o corosync_notifyd-corosync-notifyd.o `test -f 'corosync-notifyd.c' || echo '$(srcdir)/'`corosync-notifyd.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/corosync_notifyd-corosync-notifyd.Tpo $(DEPDIR)/corosync_notifyd-corosync-notifyd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='corosync-notifyd.c' object='corosync_notifyd-corosync-notifyd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(corosync_notifyd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o corosync_notifyd-corosync-notifyd.o `test -f 'corosync-notifyd.c' || echo '$(srcdir)/'`corosync-notifyd.c
+
+corosync_notifyd-corosync-notifyd.obj: corosync-notifyd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(corosync_notifyd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT corosync_notifyd-corosync-notifyd.obj -MD -MP -MF $(DEPDIR)/corosync_notifyd-corosync-notifyd.Tpo -c -o corosync_notifyd-corosync-notifyd.obj `if test -f 'corosync-notifyd.c'; then $(CYGPATH_W) 'corosync-notifyd.c'; else $(CYGPATH_W) '$(srcdir)/corosync-notifyd.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/corosync_notifyd-corosync-notifyd.Tpo $(DEPDIR)/corosync_notifyd-corosync-notifyd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='corosync-notifyd.c' object='corosync_notifyd-corosync-notifyd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(corosync_notifyd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o corosync_notifyd-corosync-notifyd.obj `if test -f 'corosync-notifyd.c'; then $(CYGPATH_W) 'corosync-notifyd.c'; else $(CYGPATH_W) '$(srcdir)/corosync-notifyd.c'; fi`
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -663,7 +702,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-sbinPROGRAMS
 
 
 lint:
-	-splint $(LINT_FLAGS) $(CFLAGS) *.c
+	-splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(INCLUDES) $(CFLAGS) *.c
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tools/corosync-cfgtool.c b/tools/corosync-cfgtool.c
index 8237fe3..8ae41fd 100644
--- a/tools/corosync-cfgtool.c
+++ b/tools/corosync-cfgtool.c
@@ -201,6 +201,9 @@ static void showaddrs_do(int nodeid)
 				saddr = &sin->sin_addr;
 
 			inet_ntop(ss->ss_family, saddr, buf, sizeof(buf));
+			if (i != 0) {
+				printf(" ");
+			}
 			printf("%s", buf);
 		}
 		printf("\n");
diff --git a/tools/corosync-cpgtool.c b/tools/corosync-cpgtool.c
index 30d5bd9..9dcb026 100644
--- a/tools/corosync-cpgtool.c
+++ b/tools/corosync-cpgtool.c
@@ -81,6 +81,9 @@ static void fprint_addrs(FILE *f, int nodeid)
 				saddr = &sin->sin_addr;
 
 			inet_ntop(ss->ss_family, saddr, buf, sizeof(buf));
+			if (i != 0) {
+				fprintf(f, " ");
+			}
 			fprintf(f, "%s", buf);
 		}
 	}
diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c
index f6f3bae..96bb4f0 100644
--- a/tools/corosync-fplay.c
+++ b/tools/corosync-fplay.c
@@ -18,9 +18,9 @@
 
 #include <corosync/engine/logsys.h>
 
-unsigned int flt_data_size;
+uint32_t flt_data_size;
 
-unsigned int *flt_data;
+uint32_t *flt_data;
 #define FDHEAD_INDEX		(flt_data_size)
 #define FDTAIL_INDEX		(flt_data_size + 1)
 
@@ -341,42 +341,50 @@ static struct printer_subsys printer_subsystems[] = {
 static unsigned int printer_subsys_count =
   sizeof (printer_subsystems) / sizeof (struct printer_subsys);
 
-static unsigned int g_record[10000];
+#define G_RECORD_SIZE	10000
+
+static uint32_t g_record[G_RECORD_SIZE];
 
 /*
  * Copy record, dealing with wrapping
  */
 static int logsys_rec_get (int rec_idx) {
-	unsigned int rec_size;
+	uint32_t rec_size;
 	int firstcopy, secondcopy;
 
 	rec_size = flt_data[rec_idx];
 
 	firstcopy = rec_size;
 	secondcopy = 0;
+
+	if (rec_size > G_RECORD_SIZE || rec_size > flt_data_size) {
+		fprintf (stderr, "rec_size too large. Input file is probably corrupted.\n");
+		exit (EXIT_FAILURE);
+	}
+
 	if (firstcopy + rec_idx > flt_data_size) {
 		firstcopy = flt_data_size - rec_idx;
 		secondcopy -= firstcopy - rec_size;
 	}
-	memcpy (&g_record[0], &flt_data[rec_idx], firstcopy<<2);
+	memcpy (&g_record[0], &flt_data[rec_idx], firstcopy * sizeof(uint32_t));
 	if (secondcopy) {
-		memcpy (&g_record[firstcopy], &flt_data[0], secondcopy<<2);
+		memcpy (&g_record[firstcopy], &flt_data[0], secondcopy * sizeof(uint32_t));
 	}
 	return ((rec_idx + rec_size) % flt_data_size);
 }
 
 static void logsys_rec_print (const void *record)
 {
-	const unsigned int *buf_uint32t = record;
-	unsigned int rec_size;
-	unsigned int rec_ident;
-	unsigned int level;
-	unsigned int line;
-	unsigned int arg_size_idx;
+	const uint32_t *buf_uint32t = record;
+	uint32_t rec_size;
+	uint32_t rec_ident;
+	uint32_t level;
+	uint32_t line;
+	uint32_t arg_size_idx;
 	unsigned int i;
 	unsigned int j;
 	unsigned int rec_idx = 0;
-	unsigned int record_number;
+	uint32_t record_number;
 	unsigned int words_processed;
 	unsigned int found;
 	const char *arguments[64];
@@ -472,14 +480,14 @@ int main (void)
 		return EXIT_FAILURE;
 	}
 
-	n_required = sizeof (unsigned int);
+	n_required = sizeof (uint32_t);
 	n_read = read (fd, &flt_data_size, n_required);
 	if (n_read != n_required) {
 		fprintf (stderr, "Unable to read fdata header\n");
 		return EXIT_FAILURE;
 	}
 
-	n_required = ((flt_data_size + 2) * sizeof(unsigned int));
+	n_required = ((flt_data_size + 2) * sizeof(uint32_t));
 
 	if ((flt_data = malloc (n_required)) == NULL) {
 		fprintf (stderr, "exhausted virtual memory\n");
@@ -494,8 +502,8 @@ int main (void)
 	}
 
 	if (n_read != n_required) {
-		printf ("Warning: read %lu bytes, but expected %lu\n",
-			(unsigned long) n_read, (unsigned long) n_required);
+		printf ("Warning: read %zd bytes, but expected %zu\n",
+			n_read, n_required);
 	}
 
 	rec_idx = flt_data[FDTAIL_INDEX];
diff --git a/tools/corosync-notifyd.c b/tools/corosync-notifyd.c
new file mode 100644
index 0000000..7b00aa6
--- /dev/null
+++ b/tools/corosync-notifyd.c
@@ -0,0 +1,1093 @@
+/*
+ * Copyright (c) 2011 Red Hat
+ *
+ * All rights reserved.
+ *
+ * Author: Angus Salkeld <asalkeld at redhat.com>
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived from this
+ *   software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <config.h>
+
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <poll.h>
+#include <signal.h>
+#include <syslog.h>
+
+#include <corosync/corotypes.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/confdb.h>
+#include <corosync/cfg.h>
+#include <corosync/quorum.h>
+
+/*
+ * generic declarations
+ */
+enum {
+	CS_NTF_LOG,
+	CS_NTF_STDOUT,
+	CS_NTF_SNMP,
+	CS_NTF_DBUS,
+	CS_NTF_FG,
+	CS_NTF_MAX,
+};
+static int conf[CS_NTF_MAX];
+
+static int32_t _cs_is_quorate = 0;
+
+typedef void (*node_membership_fn_t)(char *nodename, uint32_t nodeid, char *state, char* ip);
+typedef void (*node_quorum_fn_t)(char *nodename, uint32_t nodeid, const char *state);
+typedef void (*application_connection_fn_t)(char *nodename, uint32_t nodeid, char *app_name, const char *state);
+
+struct notify_callbacks {
+	node_membership_fn_t node_membership_fn;
+	node_quorum_fn_t node_quorum_fn;
+	application_connection_fn_t application_connection_fn;
+};
+
+#define MAX_NOTIFIERS 5
+static int num_notifiers = 0;
+static struct notify_callbacks notifiers[MAX_NOTIFIERS];
+static uint32_t local_nodeid = 0;
+static char local_nodename[CS_MAX_NAME_LENGTH];
+static hdb_handle_t poll_handle;
+static quorum_handle_t quorum_handle;
+
+static void _cs_node_membership_event(char *nodename, uint32_t nodeid, char *state, char* ip);
+static void _cs_node_quorum_event(const char *state);
+static void _cs_application_connection_event(char *app_name, const char *state);
+
+#ifdef HAVE_DBUS
+#include <dbus/dbus.h>
+/*
+ * dbus
+ */
+#define DBUS_CS_NAME	"org.corosync"
+#define DBUS_CS_IFACE	"org.corosync"
+#define DBUS_CS_PATH	"/org/corosync"
+
+static DBusConnection *db = NULL;
+static char _err[512];
+static int err_set = 0;
+static void _cs_dbus_init(void);
+#endif /* HAVE_DBUS */
+
+#ifdef ENABLE_SNMP
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/snmpv3_api.h>
+#include <net-snmp/agent/agent_trap.h>
+#include <net-snmp/library/mib.h>
+#include <net-snmp/library/snmp_api.h>
+#include <net-snmp/library/snmp_client.h>
+#include <net-snmp/library/snmp_debug.h>
+
+enum snmp_node_status {
+       SNMP_NODE_STATUS_UNKNOWN = 0,
+       SNMP_NODE_STATUS_JOINED = 1,
+       SNMP_NODE_STATUS_LEFT = 2
+};
+
+#define SNMP_OID_COROSYNC "1.3.6.1.4.1.35488"
+#define SNMP_OID_OBJECT_ROOT		SNMP_OID_COROSYNC ".1"
+#define SNMP_OID_OBJECT_NODE_NAME	SNMP_OID_OBJECT_ROOT ".1"
+#define SNMP_OID_OBJECT_NODE_ID		SNMP_OID_OBJECT_ROOT ".2"
+#define SNMP_OID_OBJECT_NODE_STATUS	SNMP_OID_OBJECT_ROOT ".3"
+#define SNMP_OID_OBJECT_NODE_ADDR	SNMP_OID_OBJECT_ROOT ".4"
+
+#define SNMP_OID_OBJECT_RINGSEQ		SNMP_OID_OBJECT_ROOT ".20"
+#define SNMP_OID_OBJECT_QUORUM		SNMP_OID_OBJECT_ROOT ".21"
+
+#define SNMP_OID_OBJECT_APP_NAME	SNMP_OID_OBJECT_ROOT ".40"
+#define SNMP_OID_OBJECT_APP_STATUS	SNMP_OID_OBJECT_ROOT ".41"
+
+#define SNMP_OID_TRAPS_ROOT		SNMP_OID_COROSYNC ".0"
+#define SNMP_OID_TRAPS_NODE		SNMP_OID_TRAPS_ROOT ".1"
+#define SNMP_OID_TRAPS_QUORUM		SNMP_OID_TRAPS_ROOT ".2"
+#define SNMP_OID_TRAPS_APP		SNMP_OID_TRAPS_ROOT ".3"
+
+#define CS_TIMESTAMP_STR_LEN 20
+static const char *local_host = "localhost";
+#endif /* ENABLE_SNMP */
+static char snmp_manager_buf[CS_MAX_NAME_LENGTH];
+static char *snmp_manager = NULL;
+
+
+/*
+ * confdb
+ */
+#define SEPERATOR_STR "."
+
+static confdb_handle_t confdb_handle;
+
+static void _cs_confdb_key_changed(confdb_handle_t handle,
+	confdb_change_type_t change_type,
+	hdb_handle_t parent_object_handle,
+	hdb_handle_t object_handle,
+	const void *object_name, size_t object_name_len,
+	const void *key_name, size_t key_name_len,
+	const void *key_value, size_t key_value_len);
+
+static void _cs_confdb_object_created(confdb_handle_t handle,
+	hdb_handle_t parent_object_handle,
+	hdb_handle_t object_handle,
+	const void *name_pt, size_t name_len);
+
+static void _cs_confdb_object_deleted(confdb_handle_t handle,
+	hdb_handle_t parent_object_handle,
+	const void *name_pt, size_t name_len);
+
+static confdb_callbacks_t callbacks = {
+	.confdb_key_change_notify_fn = _cs_confdb_key_changed,
+	.confdb_object_create_change_notify_fn = _cs_confdb_object_created,
+	.confdb_object_delete_change_notify_fn = _cs_confdb_object_deleted,
+};
+
+static int32_t _cs_ip_to_hostname(char* ip, char* name_out)
+{
+	struct sockaddr_in sa;
+	int rc;
+
+	if (strchr(ip, ':') == NULL) {
+		sa.sin_family = AF_INET;
+	} else {
+		sa.sin_family = AF_INET6;
+	}
+
+	rc = inet_pton(sa.sin_family, ip, &sa.sin_addr);
+	if (rc == 0) {
+		return -EINVAL;
+	}
+
+	rc = getnameinfo((struct sockaddr*)&sa, sizeof(sa),
+			name_out, CS_MAX_NAME_LENGTH, NULL, 0, 0);
+	if (rc != 0) {
+		syslog (LOG_ERR, "error looking up %s : %s\n", ip, gai_strerror(rc));
+		return -EINVAL;
+	}
+	return 0;
+}
+
+static void
+_cs_confdb_key_changed(confdb_handle_t handle,
+	confdb_change_type_t change_type,
+	hdb_handle_t parent_object_handle,
+	hdb_handle_t object_handle,
+	const void *object_name_pt, size_t  object_name_len,
+	const void *key_name_pt, size_t key_name_len,
+	const void *key_value_pt, size_t key_value_len)
+{
+	char parent_name[CS_MAX_NAME_LENGTH];
+	size_t len = 0;
+	hdb_handle_t real_parent_object_handle;
+	cs_error_t rc = CS_OK;
+	char nodename[CS_MAX_NAME_LENGTH];
+	char nodeid_str[CS_MAX_NAME_LENGTH];
+	uint32_t nodeid;
+	char status[CS_MAX_NAME_LENGTH];
+	char ip[CS_MAX_NAME_LENGTH];
+	size_t ip_len;
+	confdb_value_types_t type;
+	char* open_bracket = NULL;
+	char* close_bracket = NULL;
+
+	rc = confdb_object_parent_get (handle,
+		parent_object_handle, &real_parent_object_handle);
+	assert(rc == CS_OK);
+
+	rc = confdb_object_name_get (handle,
+		real_parent_object_handle,
+		parent_name,
+		&len);
+	parent_name[len] = '\0';
+	assert(rc == CS_OK);
+
+	if (strcmp(parent_name, "members") == 0) {
+		if (strncmp(key_name_pt, "status", strlen("status")) == 0) {
+
+			memcpy(nodeid_str, object_name_pt, object_name_len);
+			nodeid_str[object_name_len] = '\0';
+			nodeid = atoi(nodeid_str);
+
+			memcpy(status, key_value_pt, key_value_len);
+			status[key_value_len] = '\0';
+
+			rc = confdb_key_get_typed(handle, parent_object_handle,
+				"ip", ip, &ip_len, &type);
+			assert(rc == CS_OK);
+			ip[ip_len-1] = '\0';
+
+			/*
+			 * We want the ip out of: "r(0) ip(192.168.100.92)"
+			 */
+			open_bracket = strrchr(ip, '(');
+			open_bracket++;
+			close_bracket = strrchr(open_bracket, ')');
+			*close_bracket = '\0';
+			_cs_ip_to_hostname(open_bracket, nodename);
+
+			_cs_node_membership_event(nodename, nodeid, status, open_bracket);
+		}
+	}
+}
+
+static void
+_cs_confdb_object_created(confdb_handle_t handle,
+	hdb_handle_t parent_object_handle,
+	hdb_handle_t object_handle,
+	const void *name_pt,
+	size_t name_len)
+{
+	char parent_name[CS_MAX_NAME_LENGTH];
+	size_t len = 0;
+	char obj_name[CS_MAX_NAME_LENGTH];
+	cs_error_t rc = CS_OK;
+
+	memcpy(obj_name, name_pt, name_len);
+	obj_name[name_len] = '\0';
+
+	rc = confdb_object_name_get (handle,
+		object_handle, parent_name, &len);
+	parent_name[len] = '\0';
+	if (rc != CS_OK) {
+		return;
+	}
+
+	if (strcmp(parent_name, "connections") == 0) {
+		_cs_application_connection_event(obj_name, "connected");
+	}
+}
+
+static void
+_cs_confdb_object_deleted(confdb_handle_t handle,
+	hdb_handle_t parent_object_handle,
+	const void *name_pt,
+	size_t name_len)
+{
+	char obj_name[CS_MAX_NAME_LENGTH];
+	char parent_name[CS_MAX_NAME_LENGTH];
+	size_t len = 0;
+	cs_error_t rc;
+
+	memcpy(obj_name, name_pt, name_len);
+	obj_name[name_len] = '\0';
+
+	rc = confdb_object_name_get (handle,
+		parent_object_handle, parent_name, &len);
+	parent_name[len] = '\0';
+	assert(rc == CS_OK);
+
+	if (strcmp(parent_name, "connections") == 0) {
+		_cs_application_connection_event(obj_name, "disconnected");
+	}
+}
+
+static cs_error_t
+_cs_confdb_find_object (confdb_handle_t handle,
+	const char * name_pt,
+	hdb_handle_t * out_handle)
+{
+	char * obj_name_pt;
+	char * save_pt;
+	hdb_handle_t obj_handle;
+	confdb_handle_t parent_object_handle = OBJECT_PARENT_HANDLE;
+	char tmp_name[CS_MAX_NAME_LENGTH];
+	cs_error_t res = CS_OK;
+
+	strncpy (tmp_name, name_pt, sizeof (tmp_name));
+	tmp_name[sizeof (tmp_name) - 1] = '\0';
+	obj_name_pt = strtok_r(tmp_name, SEPERATOR_STR, &save_pt);
+
+	while (obj_name_pt != NULL) {
+		res = confdb_object_find_start(handle, parent_object_handle);
+		if (res != CS_OK) {
+			syslog (LOG_ERR, "Could not start object_find %d\n", res);
+			exit (EXIT_FAILURE);
+		}
+
+		res = confdb_object_find(handle, parent_object_handle,
+				obj_name_pt, strlen (obj_name_pt), &obj_handle);
+		if (res != CS_OK) {
+			return res;
+		}
+
+		parent_object_handle = obj_handle;
+		obj_name_pt = strtok_r (NULL, SEPERATOR_STR, &save_pt);
+	}
+
+	*out_handle = parent_object_handle;
+	return res;
+}
+
+static int
+_cs_confdb_dispatch(hdb_handle_t handle,
+	int fd,	int revents, void *data)
+{
+	confdb_dispatch(confdb_handle, CS_DISPATCH_ONE);
+	return 0;
+}
+
+static void _cs_quorum_notification(quorum_handle_t handle,
+	uint32_t quorate, uint64_t ring_seq,
+	uint32_t view_list_entries, uint32_t *view_list)
+{
+	if (_cs_is_quorate == quorate) {
+		return;
+	}
+	_cs_is_quorate = quorate;
+
+	if (quorate) {
+		_cs_node_quorum_event("quorate");
+	} else {
+		_cs_node_quorum_event("not quorate");
+	}
+}
+
+static int
+_cs_quorum_dispatch(hdb_handle_t handle,
+	int fd,	int revents, void *data)
+{
+	quorum_dispatch(quorum_handle, CS_DISPATCH_ONE);
+	return 0;
+}
+
+static void
+_cs_quorum_init(void)
+{
+	cs_error_t rc;
+	int fd;
+
+	quorum_callbacks_t quorum_callbacks = {
+		.quorum_notify_fn = _cs_quorum_notification,
+	};
+
+	rc = quorum_initialize (&quorum_handle, &quorum_callbacks);
+	if (rc != CS_OK) {
+		syslog(LOG_ERR, "Could not connect to corosync(quorum)");
+		return;
+	}
+	quorum_fd_get(quorum_handle, &fd);
+	poll_dispatch_add (poll_handle, fd, POLLIN|POLLNVAL, NULL,
+		_cs_quorum_dispatch);
+	quorum_trackstart(quorum_handle, CS_TRACK_CHANGES);
+}
+
+static void
+_cs_quorum_finalize(void)
+{
+	quorum_finalize (quorum_handle);
+}
+
+
+#ifdef HAVE_DBUS
+/*
+ * dbus notifications
+ */
+static void
+_cs_dbus_auto_flush(void)
+{
+	dbus_connection_ref(db);
+	dbus_connection_read_write(db, 500);
+	dbus_connection_unref(db);
+}
+
+static void
+_cs_dbus_release(void)
+{
+	DBusError err;
+
+	if (!db)
+		return;
+
+	dbus_error_init(&err);
+	dbus_bus_release_name(db, DBUS_CS_NAME, &err);
+	dbus_error_free(&err);
+	dbus_connection_unref(db);
+	db = NULL;
+}
+
+static void
+_cs_dbus_node_quorum_event(char *nodename, uint32_t nodeid, const char *state)
+{
+	DBusMessage *msg = NULL;
+	int ret = -1;
+
+	if (err_set) {
+		syslog (LOG_ERR, "%s\n", _err);
+		err_set = 0;
+	}
+
+	if (!db) {
+		goto out_free;
+	}
+
+	if (dbus_connection_get_is_connected(db) != TRUE) {
+		err_set = 1;
+		snprintf(_err, sizeof(_err), "DBus connection lost");
+		_cs_dbus_release();
+		goto out_unlock;
+	}
+
+	_cs_dbus_auto_flush();
+
+	if (!(msg = dbus_message_new_signal(DBUS_CS_PATH,
+					    DBUS_CS_IFACE,
+					    "QuorumStateChange"))) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	if (!dbus_message_append_args(msg,
+			DBUS_TYPE_STRING, &nodename,
+			DBUS_TYPE_UINT32, &nodeid,
+			DBUS_TYPE_STRING, &state,
+			DBUS_TYPE_INVALID)) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	dbus_connection_send(db, msg, NULL);
+	ret = 0;
+
+out_unlock:
+	if (ret == -1) {
+		syslog (LOG_ERR, "%s() error\n", __func__);
+	}
+	if (msg)
+		dbus_message_unref(msg);
+out_free:
+	return;
+}
+
+static void
+_cs_dbus_node_membership_event(char *nodename, uint32_t nodeid, char *state, char* ip)
+{
+	DBusMessage *msg = NULL;
+	int ret = -1;
+
+	if (err_set) {
+		syslog (LOG_ERR, "%s\n", _err);
+		err_set = 0;
+	}
+
+	if (!db) {
+		goto out_free;
+	}
+
+	if (dbus_connection_get_is_connected(db) != TRUE) {
+		err_set = 1;
+		snprintf(_err, sizeof(_err), "DBus connection lost");
+		_cs_dbus_release();
+		goto out_unlock;
+	}
+
+	_cs_dbus_auto_flush();
+
+	if (!(msg = dbus_message_new_signal(DBUS_CS_PATH,
+					    DBUS_CS_IFACE,
+					    "NodeStateChange"))) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	if (!dbus_message_append_args(msg,
+			DBUS_TYPE_STRING, &nodename,
+			DBUS_TYPE_UINT32, &nodeid,
+			DBUS_TYPE_STRING, &ip,
+			DBUS_TYPE_STRING, &state,
+			DBUS_TYPE_INVALID)) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	dbus_connection_send(db, msg, NULL);
+	ret = 0;
+
+out_unlock:
+	if (ret == -1) {
+		syslog (LOG_ERR, "%s() error\n", __func__);
+	}
+	if (msg)
+		dbus_message_unref(msg);
+out_free:
+	return;
+}
+
+static void
+_cs_dbus_application_connection_event(char *nodename, uint32_t nodeid, char *app_name, const char *state)
+{
+	DBusMessage *msg = NULL;
+	int ret = -1;
+
+	if (err_set) {
+		syslog (LOG_ERR, "%s\n", _err);
+		err_set = 0;
+	}
+
+	if (!db) {
+		goto out_free;
+	}
+
+	if (dbus_connection_get_is_connected(db) != TRUE) {
+		err_set = 1;
+		snprintf(_err, sizeof(_err), "DBus connection lost");
+		_cs_dbus_release();
+		goto out_unlock;
+	}
+
+	_cs_dbus_auto_flush();
+
+	if (!(msg = dbus_message_new_signal(DBUS_CS_PATH,
+				DBUS_CS_IFACE,
+				"ConnectionStateChange"))) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	if (!dbus_message_append_args(msg,
+			DBUS_TYPE_STRING, &nodename,
+			DBUS_TYPE_UINT32, &nodeid,
+			DBUS_TYPE_STRING, &app_name,
+			DBUS_TYPE_STRING, &state,
+			DBUS_TYPE_INVALID)) {
+		syslog (LOG_ERR, "%s(%d) error\n", __func__, __LINE__);
+		goto out_unlock;
+	}
+
+	dbus_connection_send(db, msg, NULL);
+	ret = 0;
+
+out_unlock:
+	if (msg)
+		dbus_message_unref(msg);
+out_free:
+	return;
+}
+
+static void
+_cs_dbus_init(void)
+{
+	DBusConnection *dbc = NULL;
+	DBusError err;
+
+	dbus_error_init(&err);
+
+	dbc = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
+	if (!dbc) {
+		snprintf(_err, sizeof(_err),
+			 "dbus_bus_get: %s", err.message);
+		err_set = 1;
+		dbus_error_free(&err);
+		return;
+	}
+
+	dbus_connection_set_exit_on_disconnect(dbc, FALSE);
+
+	db = dbc;
+
+	notifiers[num_notifiers].node_membership_fn =
+		_cs_dbus_node_membership_event;
+	notifiers[num_notifiers].node_quorum_fn =
+		_cs_dbus_node_quorum_event;
+	notifiers[num_notifiers].application_connection_fn =
+		_cs_dbus_application_connection_event;
+	num_notifiers++;
+}
+
+#endif /* HAVE_DBUS */
+
+#ifdef ENABLE_SNMP
+static netsnmp_session *snmp_init (const char *target)
+{
+	static netsnmp_session *session = NULL;
+#ifndef NETSNMPV54
+	char default_port[128];
+	snprintf (default_port, sizeof (default_port), "%s:162", target);
+#endif
+	if (session) {
+		return (session);
+	}
+
+	if (target == NULL) {
+		return NULL;
+	}
+
+	session = malloc (sizeof (netsnmp_session));
+	snmp_sess_init (session);
+	session->version = SNMP_VERSION_2c;
+	session->callback = NULL;
+	session->callback_magic = NULL;
+
+	session = snmp_add(session,
+#ifdef NETSNMPV54
+		netsnmp_transport_open_client ("snmptrap", target),
+#else
+		netsnmp_tdomain_transport (default_port, 0, "udp"),
+#endif
+		NULL, NULL);
+
+	if (session == NULL) {
+		syslog(LOG_ERR, "Could not create snmp transport");
+	}
+	return (session);
+}
+
+static inline void add_field (
+	netsnmp_pdu *trap_pdu,
+	u_char asn_type,
+	const char *prefix,
+	void *value,
+	size_t value_size)
+{
+	oid _oid[MAX_OID_LEN];
+	size_t _oid_len = MAX_OID_LEN;
+	if (snmp_parse_oid(prefix, _oid, &_oid_len)) {
+		snmp_pdu_add_variable (trap_pdu, _oid, _oid_len, asn_type, (u_char *) value, value_size);
+	}
+}
+
+static void
+_cs_snmp_node_membership_event(char *nodename, uint32_t nodeid, char *state, char* ip)
+{
+	int ret;
+	char csysuptime[CS_TIMESTAMP_STR_LEN];
+	static oid snmptrap_oid[]  = { 1,3,6,1,6,3,1,1,4,1,0 };
+	static oid sysuptime_oid[] = { 1,3,6,1,2,1,1,3,0 };
+	time_t now = time (NULL);
+
+	netsnmp_pdu *trap_pdu;
+	netsnmp_session *session = snmp_init (snmp_manager);
+	if (session == NULL) {
+		syslog (LOG_NOTICE, "Failed to init SNMP session.\n");
+		return ;
+	}
+
+	trap_pdu = snmp_pdu_create (SNMP_MSG_TRAP2);
+	if (!trap_pdu) {
+		syslog (LOG_NOTICE, "Failed to create SNMP notification.\n");
+		return ;
+	}
+
+	/* send uptime */
+	snprintf (csysuptime, CS_TIMESTAMP_STR_LEN, "%ld", now);
+	snmp_add_var (trap_pdu, sysuptime_oid, sizeof (sysuptime_oid) / sizeof (oid), 't', csysuptime);
+	snmp_add_var (trap_pdu, snmptrap_oid, sizeof (snmptrap_oid) / sizeof (oid), 'o', SNMP_OID_TRAPS_NODE);
+
+	/* Add extries to the trap */
+	add_field (trap_pdu, ASN_OCTET_STR, SNMP_OID_OBJECT_NODE_NAME, (void*)nodename, strlen (nodename));
+	add_field (trap_pdu, ASN_INTEGER, SNMP_OID_OBJECT_NODE_ID, (void*)&nodeid, sizeof (nodeid));
+	add_field (trap_pdu, ASN_OCTET_STR, SNMP_OID_OBJECT_NODE_ADDR, (void*)ip, strlen (ip));
+	add_field (trap_pdu, ASN_OCTET_STR, SNMP_OID_OBJECT_NODE_STATUS, (void*)state, strlen (state));
+
+	/* Send and cleanup */
+	ret = snmp_send (session, trap_pdu);
+	if (ret == 0) {
+		/* error */
+		syslog (LOG_ERR, "Could not send SNMP trap");
+		snmp_free_pdu (trap_pdu);
+	}
+}
+
+static void
+_cs_snmp_node_quorum_event(char *nodename, uint32_t nodeid,
+			   const char *state)
+{
+	int ret;
+	char csysuptime[20];
+	static oid snmptrap_oid[]  = { 1,3,6,1,6,3,1,1,4,1,0 };
+	static oid sysuptime_oid[] = { 1,3,6,1,2,1,1,3,0 };
+	time_t now = time (NULL);
+
+	netsnmp_pdu *trap_pdu;
+	netsnmp_session *session = snmp_init (snmp_manager);
+	if (session == NULL) {
+		syslog (LOG_NOTICE, "Failed to init SNMP session.\n");
+		return ;
+	}
+
+	trap_pdu = snmp_pdu_create (SNMP_MSG_TRAP2);
+	if (!trap_pdu) {
+		syslog (LOG_NOTICE, "Failed to create SNMP notification.\n");
+		return ;
+	}
+
+	/* send uptime */
+	sprintf (csysuptime, "%ld", now);
+	snmp_add_var (trap_pdu, sysuptime_oid, sizeof (sysuptime_oid) / sizeof (oid), 't', csysuptime);
+	snmp_add_var (trap_pdu, snmptrap_oid, sizeof (snmptrap_oid) / sizeof (oid), 'o', SNMP_OID_TRAPS_NODE);
+
+	/* Add extries to the trap */
+	add_field (trap_pdu, ASN_OCTET_STR, SNMP_OID_OBJECT_NODE_NAME, (void*)nodename, strlen (nodename));
+	add_field (trap_pdu, ASN_INTEGER, SNMP_OID_OBJECT_NODE_ID, (void*)&nodeid, sizeof (nodeid));
+	add_field (trap_pdu, ASN_OCTET_STR, SNMP_OID_OBJECT_QUORUM, (void*)state, strlen (state));
+
+	/* Send and cleanup */
+	ret = snmp_send (session, trap_pdu);
+	if (ret == 0) {
+		/* error */
+		syslog (LOG_ERR, "Could not send SNMP trap");
+		snmp_free_pdu (trap_pdu);
+	}
+}
+
+
+static void
+_cs_snmp_init(void)
+{
+	if (snmp_manager == NULL) {
+		snmp_manager = (char*)local_host;
+	}
+
+	notifiers[num_notifiers].node_membership_fn =
+		_cs_snmp_node_membership_event;
+	notifiers[num_notifiers].node_quorum_fn = 
+		_cs_snmp_node_quorum_event;
+	notifiers[num_notifiers].application_connection_fn = NULL;
+	num_notifiers++;
+}
+
+#endif /* ENABLE_SNMP */
+
+static void
+_cs_syslog_node_membership_event(char *nodename, uint32_t nodeid, char *state, char* ip)
+{
+	syslog (LOG_NOTICE, "%s[%d] ip:%s %s\n", nodename, nodeid, ip, state);
+}
+
+static void
+_cs_syslog_node_quorum_event(char *nodename, uint32_t nodeid, const char *state)
+{
+	if (strcmp(state, "quorate") == 0) {
+		syslog (LOG_NOTICE, "%s[%d] is now %s\n", nodename, nodeid, state);
+	} else {
+		syslog (LOG_NOTICE, "%s[%d] has lost quorum\n", nodename, nodeid);
+	}
+}
+
+static void
+_cs_syslog_application_connection_event(char *nodename, uint32_t nodeid, char* app_name, const char *state)
+{
+	if (strcmp(state, "connected") == 0) {
+		syslog (LOG_ERR, "%s[%d] %s is now %s to corosync\n", nodename, nodeid, app_name, state);
+	} else {
+		syslog (LOG_ERR, "%s[%d] %s is now %s from corosync\n", nodename, nodeid, app_name, state);
+	}
+}
+
+static void
+_cs_node_membership_event(char *nodename, uint32_t nodeid, char *state, char* ip)
+{
+	int i;
+
+	for (i = 0; i < num_notifiers; i++) {
+		if (notifiers[i].node_membership_fn) {
+			notifiers[i].node_membership_fn(nodename, nodeid, state, ip);
+		}
+	}
+}
+
+static void
+_cs_local_node_info_get(char **nodename, uint32_t *nodeid)
+{
+	cs_error_t rc;
+	corosync_cfg_handle_t cfg_handle;
+
+	if (local_nodeid == 0) {
+		rc = corosync_cfg_initialize(&cfg_handle, NULL);
+		if (rc != CS_OK) {
+			syslog (LOG_ERR, "Failed to initialize the cfg API. Error %d\n", rc);
+			exit (EXIT_FAILURE);
+		}
+
+		rc = corosync_cfg_local_get (cfg_handle, &local_nodeid);
+		corosync_cfg_finalize(cfg_handle);
+		if (rc != CS_OK) {
+			local_nodeid = 0;
+			strncpy(local_nodename, "localhost", sizeof (local_nodename));
+			local_nodename[sizeof (local_nodename) - 1] = '\0';
+		} else {
+			gethostname(local_nodename, CS_MAX_NAME_LENGTH);
+		}
+	}
+	*nodeid = local_nodeid;
+	*nodename = local_nodename;
+}
+
+static void
+_cs_node_quorum_event(const char *state)
+{
+	int i;
+	char *nodename;
+	uint32_t nodeid;
+
+	_cs_local_node_info_get(&nodename, &nodeid);
+
+	for (i = 0; i < num_notifiers; i++) {
+		if (notifiers[i].node_quorum_fn) {
+			notifiers[i].node_quorum_fn(nodename, nodeid, state);
+		}
+	}
+}
+
+static void
+_cs_application_connection_event(char *app_name, const char *state)
+{
+	int i;
+	char *nodename;
+	uint32_t nodeid;
+
+	_cs_local_node_info_get(&nodename, &nodeid);
+
+	for (i = 0; i < num_notifiers; i++) {
+		if (notifiers[i].application_connection_fn) {
+			notifiers[i].application_connection_fn(nodename, nodeid, app_name, state);
+		}
+	}
+}
+
+static void
+sig_exit_handler (int num)
+{
+	poll_stop(poll_handle);
+}
+
+static void
+_cs_confdb_init(void)
+{
+	hdb_handle_t obj_handle;
+	cs_error_t rc;
+	int conf_fd = 0;
+
+	rc = confdb_initialize (&confdb_handle, &callbacks);
+	if (rc != CS_OK) {
+		syslog (LOG_ERR, "Failed to initialize the objdb API. Error %d\n", rc);
+		exit (EXIT_FAILURE);
+	}
+	confdb_fd_get(confdb_handle, &conf_fd);
+
+	poll_dispatch_add (poll_handle, conf_fd, POLLIN|POLLNVAL, NULL,
+		_cs_confdb_dispatch);
+
+	rc = _cs_confdb_find_object (confdb_handle, "runtime.connections.",
+		&obj_handle);
+	if (rc != CS_OK) {
+		syslog (LOG_ERR,
+			"Failed to find the connections object. Error %d\n", rc);
+		exit (EXIT_FAILURE);
+	}
+
+	rc = confdb_track_changes (confdb_handle, obj_handle,
+		CONFDB_TRACK_DEPTH_ONE);
+	if (rc != CS_OK) {
+		syslog (LOG_ERR,
+			"Failed to track the connections object. Error %d\n", rc);
+		exit (EXIT_FAILURE);
+	}
+	rc = _cs_confdb_find_object(confdb_handle,
+		"runtime.totem.pg.mrp.srp.members.", &obj_handle);
+	if (rc != CS_OK) {
+		syslog (LOG_ERR, "Failed to find the object. Error %d\n", rc);
+		exit (EXIT_FAILURE);
+	}
+
+	rc = confdb_track_changes(confdb_handle,
+		obj_handle, CONFDB_TRACK_DEPTH_RECURSIVE);
+	if (rc != CS_OK) {
+		syslog (LOG_ERR,
+			"Failed to track the object. Error %d\n", rc);
+		exit (EXIT_FAILURE);
+	}
+}
+
+static void
+_cs_confdb_finalize(void)
+{
+	confdb_stop_track_changes (confdb_handle);
+	confdb_finalize (confdb_handle);
+}
+
+static void
+_cs_check_config(void)
+{
+	if (conf[CS_NTF_LOG] == 0 &&
+		conf[CS_NTF_STDOUT] == 0 &&
+		conf[CS_NTF_SNMP] == 0 &&
+		conf[CS_NTF_DBUS] == 0) {
+		syslog(LOG_ERR, "no event type enabled, see corosync-notifyd -h, exiting.");
+		exit(EXIT_FAILURE);
+	}
+
+#ifndef ENABLE_SNMP
+	if (conf[CS_NTF_SNMP]) {
+		syslog(LOG_ERR, "Not compiled with SNMP support enabled, exiting.");
+		exit(EXIT_FAILURE);
+	}
+#endif
+#ifndef HAVE_DBUS
+	if (conf[CS_NTF_DBUS]) {
+		syslog(LOG_ERR, "Not compiled with DBus support enabled, exiting.");
+		exit(EXIT_FAILURE);
+	}
+#endif
+
+	if (conf[CS_NTF_STDOUT] && !conf[CS_NTF_FG]) {
+		syslog(LOG_ERR, "configured to print to stdout and run in the background, exiting");
+		exit(EXIT_FAILURE);
+	}
+	if (conf[CS_NTF_SNMP] && conf[CS_NTF_DBUS]) {
+		syslog(LOG_ERR, "configured to send snmp traps and dbus signals - are you sure?.");
+	}
+}
+
+static void
+_cs_usage(void)
+{
+	fprintf(stderr,	"usage:\n"\
+		"        -f     : Start application in foreground.\n"\
+		"        -l     : Log all events.\n"\
+		"        -o     : Print events to stdout (turns on -l).\n"\
+		"        -s     : Send SNMP traps on all events.\n"\
+		"        -m     : SNMP Manager IP address (defaults to localhost).\n"\
+		"        -d     : Send DBUS signals on all events.\n"\
+		"        -h     : Print this help\n\n");
+}
+
+int
+main(int argc, char *argv[])
+{
+	int ch;
+
+	conf[CS_NTF_FG] = 0;
+	conf[CS_NTF_LOG] = 0;
+	conf[CS_NTF_STDOUT] = 0;
+	conf[CS_NTF_SNMP] = 0;
+	conf[CS_NTF_DBUS] = 0;
+
+	while ((ch = getopt (argc, argv, "floshdm:")) != EOF) {
+		switch (ch) {
+			case 'f':
+				conf[CS_NTF_FG] = 1;
+				break;
+			case 'l':
+				conf[CS_NTF_LOG] = 1;
+				break;
+			case 'm':
+				conf[CS_NTF_SNMP] = 1;
+				strncpy(snmp_manager_buf, optarg, sizeof (snmp_manager_buf));
+				snmp_manager_buf[sizeof (snmp_manager_buf) - 1] = '\0';
+				snmp_manager = snmp_manager_buf;
+				break;
+			case 'o':
+				conf[CS_NTF_LOG] = 1;
+				conf[CS_NTF_STDOUT] = 1;
+				break;
+			case 's':
+				conf[CS_NTF_SNMP] = 1;
+				break;
+			case 'd':
+				conf[CS_NTF_DBUS] = 1;
+				break;
+			case 'h':
+			default:
+				_cs_usage();
+				return EXIT_FAILURE;
+		}
+	}
+
+	if (conf[CS_NTF_STDOUT]) {
+		openlog(NULL, LOG_PID|LOG_PERROR, LOG_DAEMON);
+	} else {
+		openlog(NULL, LOG_PID, LOG_DAEMON);
+	}
+	_cs_check_config();
+
+	if (!conf[CS_NTF_FG]) {
+		if (daemon(0, 0) < 0)
+		{
+			perror("daemon() failed");
+			return EXIT_FAILURE;
+		}
+	}
+
+	num_notifiers = 0;
+	if (conf[CS_NTF_LOG]) {
+		notifiers[num_notifiers].node_membership_fn =
+			_cs_syslog_node_membership_event;
+		notifiers[num_notifiers].node_quorum_fn =
+			_cs_syslog_node_quorum_event;
+		notifiers[num_notifiers].application_connection_fn =
+			_cs_syslog_application_connection_event;
+		num_notifiers++;
+	}
+
+	poll_handle = poll_create();
+
+	_cs_confdb_init();
+	_cs_quorum_init();
+
+#ifdef HAVE_DBUS
+	if (conf[CS_NTF_DBUS]) {
+		_cs_dbus_init();
+	}
+#endif /* HAVE_DBUS */
+
+#ifdef ENABLE_SNMP
+	if (conf[CS_NTF_SNMP]) {
+		_cs_snmp_init();
+	}
+#endif /* ENABLE_SNMP */
+
+	(void)signal (SIGINT, sig_exit_handler);
+	(void)signal (SIGQUIT, sig_exit_handler);
+	(void)signal (SIGTERM, sig_exit_handler);
+
+	poll_run(poll_handle);
+
+#ifdef HAVE_DBUS
+	if (conf[CS_NTF_DBUS]) {
+		_cs_dbus_release();
+	}
+#endif /* HAVE_DBUS */
+
+	_cs_quorum_finalize();
+	_cs_confdb_finalize();
+
+	return 0;
+}
+
diff --git a/tools/corosync-notifyd.sysconfig.example b/tools/corosync-notifyd.sysconfig.example
new file mode 100644
index 0000000..5cd7a2e
--- /dev/null
+++ b/tools/corosync-notifyd.sysconfig.example
@@ -0,0 +1,9 @@
+#
+# See "man corosync-notifyd" for descriptions of
+# the options below.
+#
+# OPTIONS="-d -s -l -m <snmp manager address>"
+#
+
+OPTIONS=""
+
diff --git a/tools/corosync-objctl.c b/tools/corosync-objctl.c
index 131bc2b..d043865 100644
--- a/tools/corosync-objctl.c
+++ b/tools/corosync-objctl.c
@@ -93,7 +93,6 @@ static void tail_object_deleted(confdb_handle_t handle,
 
 static void create_object(confdb_handle_t handle, char * name_pt);
 static void create_object_key(confdb_handle_t handle, char * name_pt);
-static void destroy_object_key(confdb_handle_t handle, char * name_pt);
 static void write_key(confdb_handle_t handle, char * path_pt);
 static void get_parent_name(const char * name_pt, char * parent_name);
 
@@ -104,8 +103,29 @@ static confdb_callbacks_t callbacks = {
 };
 
 static int debug = 0;
+static int show_binary = 0;
 static int action;
 
+static void print_binary_key (char *value, size_t value_len)
+{
+	size_t i;
+	char c;
+
+	for (i = 0; i < value_len; i++) {
+		c = value[i];
+		if (c >= ' ' && c < 0x7f && c != '\\') {
+			fputc (c, stdout);
+		} else {
+			if (c == '\\') {
+				printf ("\\\\");
+			} else {
+				printf ("\\x%02X", c);
+			}
+		}
+	}
+	printf ("\n");
+}
+
 static void print_key (char *key_name, void *value, size_t value_len, confdb_value_types_t type)
 {
 	switch (type) {
@@ -146,7 +166,12 @@ static void print_key (char *key_name, void *value, size_t value_len, confdb_val
 			break;
 		default:
 		case CONFDB_VALUETYPE_ANY:
-			printf ("%s=**binary**(%d)\n", key_name, type);
+			if (!show_binary) {
+				printf ("%s=**binary**(%d)\n", key_name, type);
+			} else {
+				printf ("%s=", key_name);
+				print_binary_key ((char *)value, value_len);
+			}
 			break;
 	}
 }
@@ -313,13 +338,13 @@ static int print_all(void)
 static int print_help(void)
 {
 	printf("\n");
-	printf ("usage:  corosync-objctl object%ckey ...                    Print an object\n", SEPERATOR);
+	printf ("usage:  corosync-objctl [-b] object%ckey ...               Print an object\n", SEPERATOR);
 	printf ("        corosync-objctl -c object%cchild_obj ...           Create Object\n", SEPERATOR);
 	printf ("        corosync-objctl -d object%cchild_obj ...           Delete object\n", SEPERATOR);
 	printf ("        corosync-objctl -w object%cchild_obj.key=value ... Create a key\n", SEPERATOR);
 	printf ("        corosync-objctl -n object%cchild_obj.key=value ... Create a new object with the key\n", SEPERATOR);
 	printf ("        corosync-objctl -t object%cchild_obj ...           Track changes\n", SEPERATOR);
-	printf ("        corosync-objctl -a                                Print all objects\n");
+	printf ("        corosync-objctl [-b] -a                           Print all objects\n");
 	printf ("        corosync-objctl -p <filename> Load in config from the specified file.\n");
 	printf("\n");
 	return 0;
@@ -407,7 +432,8 @@ static cs_error_t find_object (confdb_handle_t handle,
 	char tmp_name[OBJ_NAME_SIZE];
 	cs_error_t res = CS_OK;
 
-	strncpy (tmp_name, name_pt, OBJ_NAME_SIZE);
+	strncpy (tmp_name, name_pt, sizeof (tmp_name));
+	tmp_name[sizeof (tmp_name) - 1] = '\0';
 	obj_name_pt = strtok_r(tmp_name, SEPERATOR_STR, &save_pt);
 
 	while (obj_name_pt != NULL) {
@@ -517,7 +543,8 @@ static void create_object(confdb_handle_t handle, char * name_pt)
 	char tmp_name[OBJ_NAME_SIZE];
 	cs_error_t res;
 
-	strncpy (tmp_name, name_pt, OBJ_NAME_SIZE);
+	strncpy (tmp_name, name_pt, sizeof (tmp_name));
+	tmp_name[sizeof (tmp_name) - 1] = '\0';
 	obj_name_pt = strtok_r(tmp_name, SEPERATOR_STR, &save_pt);
 
 	while (obj_name_pt != NULL) {
@@ -570,7 +597,8 @@ static void create_object_key(confdb_handle_t handle, char *name_pt)
 	get_parent_name(name_pt, parent_name);
 	get_key(name_pt, key_name, key_value);
 
-	strncpy (tmp_name, parent_name, OBJ_NAME_SIZE);
+	strncpy (tmp_name, parent_name, sizeof (tmp_name));
+	tmp_name[sizeof (tmp_name) - 1] = '\0';
 	obj_name_pt = strtok_r(tmp_name, SEPERATOR_STR, &save_pt);
 
 	/*
@@ -800,7 +828,7 @@ int main (int argc, char *argv[]) {
 	action = ACTION_READ;
 
 	for (;;){
-		c = getopt (argc,argv,"hawncvdtp:");
+		c = getopt (argc,argv,"habwncvdtp:");
 		if (c==-1) {
 			break;
 		}
@@ -814,6 +842,9 @@ int main (int argc, char *argv[]) {
 			case 'a':
 				action = ACTION_PRINT_ALL;
 				break;
+			case 'b':
+				show_binary++;
+				break;
 			case 'p':
 				return read_in_config_file (optarg);
 				break;

-- 
corosync Debian packaging



More information about the Debian-ha-svn-commits mailing list