monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit-dev] [monit] r387 committed - New Build system based on auto-tool


From: monit
Subject: [monit-dev] [monit] r387 committed - New Build system based on auto-tools and introducing libmonit
Date: Sun, 12 Jun 2011 00:35:11 +0000

Revision: 387
Author:   address@hidden
Date:     Sat Jun 11 17:19:40 2011
Log:      New Build system based on auto-tools and introducing libmonit

http://code.google.com/p/monit/source/detail?r=387

Added:
 /trunk/AUTHORS
 /trunk/CHANGES
 /trunk/COPYING
 /trunk/Makefile.am
 /trunk/README
 /trunk/bootstrap
 /trunk/config
 /trunk/config/install-sh
 /trunk/config/ltmain.sh
 /trunk/config/missing
 /trunk/configure.ac
 /trunk/contrib
 /trunk/contrib/monit.upstart
 /trunk/contrib/monitrc-gentoo
 /trunk/contrib/packages
 /trunk/contrib/packages/freebsd
 /trunk/contrib/packages/freebsd/Makefile
 /trunk/contrib/packages/freebsd/README.porter
 /trunk/contrib/packages/freebsd/distinfo
 /trunk/contrib/packages/freebsd/files
 /trunk/contrib/packages/freebsd/files/monit.sh
 /trunk/contrib/packages/freebsd/pkg-descr
 /trunk/contrib/packages/freebsd/pkg-message
 /trunk/contrib/packages/redhat
 /trunk/contrib/packages/redhat/monit.spec
 /trunk/contrib/packages/solaris
 /trunk/contrib/packages/solaris/README.solaris
 /trunk/contrib/packages/solaris/init.monit
 /trunk/contrib/packages/solaris/makesolpkg.sh
 /trunk/contrib/rc.monit
 /trunk/doc
 /trunk/doc/PLATFORMS
 /trunk/doc/monit.pod
 /trunk/libmonit
 /trunk/libmonit/COPYING
 /trunk/libmonit/Makefile.am
 /trunk/libmonit/README
 /trunk/libmonit/bootstrap
 /trunk/libmonit/config
 /trunk/libmonit/config/depcomp
 /trunk/libmonit/config/install-sh
 /trunk/libmonit/config/ltmain.sh
 /trunk/libmonit/config/missing
 /trunk/libmonit/configure.ac
 /trunk/libmonit/libmonit.xcodeproj
 /trunk/libmonit/libmonit.xcodeproj/project.pbxproj
 /trunk/libmonit/libmonit.xcodeproj/project.xcworkspace
/trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
 /trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/xcuserdata
/trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/xcuserdata/hauk.xcuserdatad /trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/xcuserdata/hauk.xcuserdatad/UserInterfaceState.xcuserstate /trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/xcuserdata/hauk.xcuserdatad/WorkspaceSettings.xcsettings
 /trunk/libmonit/libmonit.xcodeproj/xcuserdata
 /trunk/libmonit/libmonit.xcodeproj/xcuserdata/hauk.xcuserdatad
 /trunk/libmonit/libmonit.xcodeproj/xcuserdata/hauk.xcuserdatad/xcschemes
/trunk/libmonit/libmonit.xcodeproj/xcuserdata/hauk.xcuserdatad/xcschemes/libmonit.xcscheme /trunk/libmonit/libmonit.xcodeproj/xcuserdata/hauk.xcuserdatad/xcschemes/xcschememanagement.plist
 /trunk/libmonit/src
 /trunk/libmonit/src/Bootstrap.c
 /trunk/libmonit/src/Bootstrap.h
 /trunk/libmonit/src/Config.h
 /trunk/libmonit/src/exceptions
 /trunk/libmonit/src/exceptions/AssertException.h
 /trunk/libmonit/src/exceptions/Exception.c
 /trunk/libmonit/src/exceptions/Exception.h
 /trunk/libmonit/src/exceptions/IOException.h
 /trunk/libmonit/src/exceptions/MemoryException.h
 /trunk/libmonit/src/exceptions/NumberFormatException.h
 /trunk/libmonit/src/exceptions/assert.c
 /trunk/libmonit/src/exceptions/assert.h
 /trunk/libmonit/src/io
 /trunk/libmonit/src/io/Dir.c
 /trunk/libmonit/src/io/Dir.h
 /trunk/libmonit/src/io/File.c
 /trunk/libmonit/src/io/File.h
 /trunk/libmonit/src/io/InputStream.c
 /trunk/libmonit/src/io/InputStream.h
 /trunk/libmonit/src/io/OutputStream.c
 /trunk/libmonit/src/io/OutputStream.h
 /trunk/libmonit/src/system
 /trunk/libmonit/src/system/Command.c
 /trunk/libmonit/src/system/Command.h
 /trunk/libmonit/src/system/Mem.c
 /trunk/libmonit/src/system/Mem.h
 /trunk/libmonit/src/system/Net.c
 /trunk/libmonit/src/system/Net.h
 /trunk/libmonit/src/system/Process.h
 /trunk/libmonit/src/system/System.c
 /trunk/libmonit/src/system/System.h
 /trunk/libmonit/src/thread
 /trunk/libmonit/src/thread/Atomic.h
 /trunk/libmonit/src/thread/Thread.c
 /trunk/libmonit/src/thread/Thread.h
 /trunk/libmonit/src/util
 /trunk/libmonit/src/util/List.c
 /trunk/libmonit/src/util/List.h
 /trunk/libmonit/src/util/Str.c
 /trunk/libmonit/src/util/Str.h
 /trunk/libmonit/src/util/StringBuffer.c
 /trunk/libmonit/src/util/StringBuffer.h
 /trunk/libmonit/test
 /trunk/monitrc
 /trunk/src
 /trunk/src/alert.c
 /trunk/src/alert.h
 /trunk/src/collector.c
 /trunk/src/control.c
 /trunk/src/daemonize.c
 /trunk/src/device
 /trunk/src/device/device.h
 /trunk/src/device/device_common.c
 /trunk/src/device/device_sysdep.h
 /trunk/src/device/sysdep_AIX.c
 /trunk/src/device/sysdep_DARWIN.c
 /trunk/src/device/sysdep_FREEBSD.c
 /trunk/src/device/sysdep_HPUX.c
 /trunk/src/device/sysdep_LINUX.c
 /trunk/src/device/sysdep_NETBSD.c
 /trunk/src/device/sysdep_OPENBSD.c
 /trunk/src/device/sysdep_SOLARIS.c
 /trunk/src/device/sysdep_UNKNOWN.c
 /trunk/src/env.c
 /trunk/src/event.c
 /trunk/src/event.h
 /trunk/src/file.c
 /trunk/src/file.h
 /trunk/src/gc.c
 /trunk/src/http
 /trunk/src/http/base64.c
 /trunk/src/http/base64.h
 /trunk/src/http/cervlet.c
 /trunk/src/http/cervlet.h
 /trunk/src/http/engine.c
 /trunk/src/http/engine.h
 /trunk/src/http/httpstatus.h
 /trunk/src/http/processor.c
 /trunk/src/http/processor.h
 /trunk/src/http.c
 /trunk/src/l.l
 /trunk/src/log.c
 /trunk/src/md5.c
 /trunk/src/md5.h
 /trunk/src/monit.c
 /trunk/src/monit.h
 /trunk/src/net.c
 /trunk/src/net.h
 /trunk/src/p.y
 /trunk/src/process
 /trunk/src/process/process_common.c
 /trunk/src/process/process_sysdep.h
 /trunk/src/process/sysdep_AIX.c
 /trunk/src/process/sysdep_DARWIN.c
 /trunk/src/process/sysdep_FREEBSD.c
 /trunk/src/process/sysdep_HPUX.c
 /trunk/src/process/sysdep_LINUX.c
 /trunk/src/process/sysdep_NETBSD.c
 /trunk/src/process/sysdep_OPENBSD.c
 /trunk/src/process/sysdep_SOLARIS.c
 /trunk/src/process/sysdep_UNKNOWN.c
 /trunk/src/process.c
 /trunk/src/process.h
 /trunk/src/protocols
 /trunk/src/protocols/NOTES
 /trunk/src/protocols/apache_status.c
 /trunk/src/protocols/clamav.c
 /trunk/src/protocols/default.c
 /trunk/src/protocols/dns.c
 /trunk/src/protocols/dwp.c
 /trunk/src/protocols/ftp.c
 /trunk/src/protocols/generic.c
 /trunk/src/protocols/gps.c
 /trunk/src/protocols/http.c
 /trunk/src/protocols/imap.c
 /trunk/src/protocols/ldap2.c
 /trunk/src/protocols/ldap3.c
 /trunk/src/protocols/lmtp.c
 /trunk/src/protocols/memcache.c
 /trunk/src/protocols/mysql.c
 /trunk/src/protocols/nntp.c
 /trunk/src/protocols/ntp3.c
 /trunk/src/protocols/pgsql.c
 /trunk/src/protocols/pop.c
 /trunk/src/protocols/postfix_policy.c
 /trunk/src/protocols/protocol.c
 /trunk/src/protocols/protocol.h
 /trunk/src/protocols/radius.c
 /trunk/src/protocols/rdate.c
 /trunk/src/protocols/rsync.c
 /trunk/src/protocols/sip.c
 /trunk/src/protocols/smtp.c
 /trunk/src/protocols/ssh.c
 /trunk/src/protocols/tns.c
 /trunk/src/sendmail.c
 /trunk/src/sha.c
 /trunk/src/sha.h
 /trunk/src/signal.c
 /trunk/src/socket.c
 /trunk/src/socket.h
 /trunk/src/spawn.c
 /trunk/src/ssl.c
 /trunk/src/ssl.h
 /trunk/src/state.c
 /trunk/src/state.h
 /trunk/src/status.c
 /trunk/src/util.c
 /trunk/src/util.h
 /trunk/src/validate.c
 /trunk/src/xmalloc.c
 /trunk/src/xml.c

=======================================
--- /dev/null
+++ /trunk/AUTHORS      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,40 @@
+Authors:
+
+Jan-Henrik Haukeland <address@hidden>
+Martin Pala <address@hidden>
+Christian Hopp <address@hidden>
+Rory Toma <address@hidden>
+
+Contributors in alphabetical order:
+
+Michael Amster (mamster at webeasy com)
+Philipp Berndt (philipp bernd at gmx net)
+Olivier Beyssac (ob at r14 freenix org)
+Marco Bisioli (bisioli at adriacom it)
+Joe Bryant (JBryant at RiteAid com)
+Will Bryant (will bryant at ecosm com)
+Dave Cheney (dcheney at redbubble com)
+Sébastien Debrard (sebastien.debrard strange-garden com)
+Mark Ferlatte (ferlatte at cryptio net)
+David Fletcher (david at megapico co uk)
+Pierrick Grasland (pierrick grasland at nexcom fr)
+Klaus Heinz (k.heinz.apr.sieben at kh-22 de)
+Peter Holdaway (pholdaway at technocom-wireless com)
+Igor Homyakov (homyakov at altlinux ru)
+Mostafa Hosseini (mostafah at oeone com)
+Francois Isabelle (Francois Isabelle at ca kontron com)
+Oliver Jehle (oliver jehle at monex li)
+Kianusch Sayah Karadji (kianusch sayah karadji at sk-tech net)
+Artyom Khafizov (afk at inbox ru)
+Thomas Lohmueller (thomas at lohmueller ch)
+Bret "Trixter" McDanel (trixter at 0xdecafbad com)
+Arkadiusz Miskiewicz (arekm at pld-linux org)
+Tatsuya Nonogaki (nonotats at asahi email ne jp)
+Lior Okman (lior.okman at gmail.com)
+Thomas "Leppo" Oppel (oppel at kbis de)
+Rick Robino (rrobino at wavedivision com)
+Richard Schwaninger (risc at vmilch at)
+Margarida Sequeira (margarida at openbsd org)
+
+
+
=======================================
--- /dev/null
+++ /trunk/CHANGES      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,721 @@
+                     CHANGES version 5.2.6
+
+           This file summarizes changes made since 5.0
+
+       Bug fixes may refer to an auto-generated id in our
+          bug-tracking system, which can be found here
+          https://savannah.nongnu.org/bugs/?group=monit
+
+
+Version 5.2.6
+
+* Fix MySQL protocol test: MySQL 5.5.12 returns new error code in
+  the case of authentication failure.
+
+* Fix Debian bug #621047: monit fails to build after SSLv2 removal
+
+* Fix crash on Solaris which may occur if the system load is zero.
+  Thanks to Paul Sun for report.
+
+* The stacktrace logging on error is disabled in -v (verbose) mode
+  as it was too verbose for common service debugging tasks, it can
+  be enabled using -vv option.
+
+* Improve how fast Monit check if a program was started or stopped.
+  Thanks to Michael Renner for patch.
+
+
+
+Version 5.2.5
+
+* Fix process match check - when the monitored process failed and
+  was restarted by Monit, Monit didn't recognized  it is  running
+  after the restart and reported  start failure (similar on stop).
+  Thanks to  Kenichi Futatsumori for report and  helping to root
+  cause the problem.
+
+* Fix Debian #617259: symbolic links in the filesystem check doesn't
+  work.  Thanks to Sergey B Kirpichev for report.
+
+* Fix Debian bug #614984: smtp protocol test issues both EHLO and
+  HELO.  Thanks to Sergey B Kirpichev for report.
+
+* Fix bug #32583: Multiple SIP OPTIONS messages use the same header
+  data.  Thanks to Hugh Waite for patch.
+
+* Try harder to get FQDN hostname for the host where monit is running.
+  The hostname in the $HOST variable which is used in the mail sender
+  may thus change. Thanks to Sergey B Kirpichev for patch.
+
+* AIX: Fix the time display which was off by GMT difference. Thanks
+  to Helen Chen for report.
+
+* AIX: Fix the M/Monit heartbeat. Thanks to Helen Chen for report.
+
+* Support symbolic link to monit configuration file.
+
+* Fix crash when monit daemon start delay option was used and monit
+  was signalized to stop before the start delay passed. Thanks to
+  John Schult for report.
+
+
+
+Version 5.2.4
+
+NEW FEATURES AND FUNCTIONS:
+
+* Added the "procmatch" CLI command which allows for easy testing
+  of pattern for process match check. The command takes regular
+  expression as an argument and displays all running processes
+  matching the pattern. Example usage:
+      $ monit procmatch "iChatAgent"
+
+* Set the default log file mask to 0640 (originally it was 0664).
+  Thanks to Sergey B Kirpichev.
+
+* Reduced monit memory footprint by ca. 10%.
+
+BUGFIXES:
+
+* FreeBSD, NetBSD, OpenBSD, MacOSX, Solaris filesystem check fix:
+  If block/character device was used in the filesystem path instead
+  of mountpoint, monit reported usage of wrong filesystem.
+
+* NetBSD filesystem check: Fix space usage report.
+
+* Fix memory usage monitoring in OpenVZ VPS 2.6.32 virtual hosts.
+  Thanks to Kelly for report.
+
+* If the protocol test failed, show the request in the event. Thanks
+  to Marco for report.
+
+* Randomize the mail message id to prevent duplicates in the case, that
+  the same hostname is used on multiple hosts running monit and messages
+  are generated in the same second in parallel. Thanks to Sergey B
+  Kirpichev.
+
+* Spelling fixes. Thanks to Sergey B Kirpichev.
+
+
+
+Version 5.2.3
+
+BUGFIXES:
+
+* Mysql protocol test supports mysql 5.5.x and newer now.
+
+
+
+Version 5.2.2
+
+BUGFIXES:
+
+* Fix crash on MacOSX
+
+* ICMP echo test (ping):
+     - bug #31128: do not log error if different response type is received
+ - bug #31129: do not require root to use ping test. Privilege to create + raw socket is still required, but on some platforms such as Solaris it + can be granted to non-root users too. If the user has no permission to + perform ping, monit will skip the icmp test and log message (in debug
+       mode only).
+
+* rsync protocol test:
+     - wait for full server response and verify exit was received
+     - bug #31249: send full version to rsync server. Thanks to John Hall
+       for report
+
+
+
+Version 5.2.1
+
+BUGFIXES:
+
+* HTTP and URL protocol tests: Fixed a problem where HTTP protocol
+  tests using a specific request always failed. This bug may also
+  affect URL tests. The problem was caused by faulty URL encoding. In
+  the process of fixing this bug the new feature that allowed slash in
+  service names has been reverted and instead will be added in a later
+  release.
+
+
+
+Version 5.2
+
+NEW FEATURES AND FUNCTIONS:
+
+* Added support for monitoring processes without pidfile using pattern
+  matching. You can use POSIX regular expressions or string matching
+  process name with arguments as provided by the 'ps' utility. If the
+  pattern matches multiple processes, the first match is used.
+  Example:
+      check process debian
+            matching "/usr/lib/vmware/bin/vmware-vmx .*deb.vmx"
+
+* Added support for swap monitoring. Example:
+      check system myserver
+          if swap usage > 25% then alert
+
+* Allow to override the default action when service doesn't exist. The
+  default action is restart, it can be customized with following
+  statement:
+    if [does] not exist [[<x> times within] <y> cycles] then <action1>
+
+* Monit automatically registers credentials with M/Monit now, so it's
+  not necessary to set it manually in M/Monit anymore. To disable
+  credentials registration:
+     set mmonit https://monit:address@hidden:8443/collector
+         and register without credentials
+
+* Added memcache protocol test. Thanks to Sébastien Debrard for the
+  patch.
+
+* Added openssl FIPS to Monit httpd. Thanks to Lior Okman for the
+  patch.
+
+* The 'check system' can now use start/stop program statements too.
+
+* Added the option to set the "Reply-To" mail header in mail-format.
+
+* Display backtrace on error if debug mode is enabled (requires
+  backtrace support in libc)
+
+BUGFIXES:
+
+* Show real process uptime - formerly the presented uptime was based
+  on create and modify timestamp of process' pidfile which provides
+  invalid uptime if the pidfile is replaced and process keeps running
+  with original PID. Thanks to Nima Chavooshi for report.
+
+* When user triggered action for some service (such as stop) and
+  before that action completed user triggered another action for the
+  same service (such as start), the second action has been ignored.
+  Monit will not accept new action and return temporary error until
+  the previous action completed.
+
+* If process resource usage gathering failed, retry next cycle as the
+  error can be temporary.
+
+* Fixed sporadic failures when SSL was used.
+
+* ICMP echo test (ping):
+     - fixed sporadic false positive/negative
+     - removed limit of 20 pings per cycle
+
+* DNS test:
+     - accept NS root request refusal as correct response because
+       server reacts on request
+     - accept authority answer as alternative to record. Thanks to
+       Nick Osborn for patch
+
+* RADIUS test fix. Thanks to Alan DeKok for patch.
+
+* M/Monit heartbeat is fully independent of testing cycle now to
+  prevent false positive when service test blocks.
+
+* Fixed SMTP STARTTLS protocol, required for servers that adhere
+  strictly to RFC 3207 4.2. Thanks to Lorenzo A. Sedano Cadinanos for
+  patch.
+
+* Service name:
+     - allow the service name to start with "/"
+     - fixed handling of the service names which contain "/" in the
+       name in Monit web interface. Thanks to Artyom Khafizov for
+       patch.
+
+* When 'check system' is not defined, monit adds it automatically
+  using hostname for service name. If existing service was defined
+  with the same service name (matching hostname), monit didn't added
+  the entry and reported confusing error message pointing to the end
+  of configuration file. Thanks to Thorsten Kampe for report and help.
+
+* Remove extra NL characters from message when resource succeeded
+  event is sent. The extra NL character may break the mail headers.
+  Thanks to Hanno Boeck for patch.
+
+* Fixed display of cpu user/system/wait usage which temporarily
+  displayed -1.0% between two monitoring cycles while cpu monitoring
+  was initializing. Thanks to Marcus Muelbuesch for report.
+
+* Fixed display of port response time as -1 if 'monit status' was
+  called in the middle of service test.
+
+* Fixed display of service initializing state after monit start or
+  reload.
+
+* Fixed MONIT_DESCRIPTION environment variable. Thanks to Marco
+  Roeland for patch
+
+* AIX:
+     - fixed compilation
+     - fixed system load average monitoring
+     - fixed ICMP echo test
+
+* Mac OS X:
+     - allow monitoring of system-wide load average, cpu and memory
+       usage even if
+       Monit is running as non-root user
+
+* NetBSD:
+     - fixed ICMP echo test
+
+
+
+Version 5.1.1
+
+BUGFIXES:
+
+* Fix FTP protocol test. Thanks to Axel Reinhold for report.
+
+* Fix the HTTP protocol test's hostheader option which was added in 5.1.
+  Thanks to Naoya Nakazawa for report.
+
+* Removed warning about missing system service check. Missing system service
+  check is not error and it shouldn't be reported as such.
+
+* Fix manual page formating. Thanks to Stefan Alfredsson for report.
+
+
+
+Version 5.1
+
+NEW FEATURES AND FUNCTIONS:
+
+* It is now possible to define any action for the restart timeout rule.
+  Multiple restart timeout rules can also be defined. Example:
+      if 3 restarts within 5 cycles then exec "/foo/bar"
+      if 8 restarts within 10 cycles then unmonitor
+
+* Service can be added to multiple groups. Thanks to Brad Gessler
+  for suggestion. Syntax:
+    check filesystem wwwdata with path /www
+      group www
+      group filesystem
+
+* Added GPS protocol test. Thanks to Sebastien Debrard for patch.
+
+* Added RADIUS protocol test. Thanks to Alan DeKok for patch. Example syntax:
+    check process radiusd with pidfile /var/run/radiusd.pid
+       start program = "/etc/init.d/freeradius start"
+       stop program = "/etc/init.d/freeradius stop"
+       if failed
+ host 127.0.0.1 port 2000 type udp protocol radius secret testing1234
+       then alert
+       if 5 restarts within 5 cycles then timeout
+
+* The HTTP protocol test now supports a hostheader option which allows to
+  override Host header in HTTP request. It can be used for example
+  to test a farm of HTTP servers by IP addresses and to set specific
+  Host header. Thanks to Brady Catherman for patch. Example:
+ if failed host 192.168.1.100 protocol http hostheader "example.com" then alert
+
+* If an error occur during Monit command-line execution, report the error
+ and exit with 1, so it is possible to react if Monit is used from a script.
+  On success, 0 is returned as usual. Previously, Monit always exited with
+  0 even if an error occurred.
+
+* Do not require SSL version type when specifying SSL communication with M/Monit
+  (SSL version is set to auto).
+
+* If the Monit http interface failed to start, provide more details about
+  the reason.
+
+BUGFIXES:
+
+* Support resource monitoring (cpu usage, etc.) when Monit is running
+  inside virtual environment. Tested on:
+      - FreeBSD jail
+      - Solaris zone
+      - Linux Vserver
+
+* Fix #26752: inside Solaris Zone, Monit failed to detect children
+  and computed host memory wrong
+
+* On Solaris, FreeBSD, NetBSD and OpenBSD, Monit no longer needs to run as root user
+  in order to be able to watch process resource usage (cpu and memory).
+
+* Send heartbeat to M/Monit even if Monit is busy in a long testing cycle to prevent
+  false alerts about non-responsive Monit agent.
+
+* Fixed SMTP protocol test which may sometimes incorrectly
+  report ESMTP protocol failure. Thanks to Axel Reinhold for
+  report.
+
+* Fixed content match check which reported only first
+  match during the same cycle. Thanks to Pavel Shevaev for
+  report.
+
+* Allow for the use of complete SSL certificate chains.
+  Thanks to Lawrence Tan for patch.
+
+* Added support for multiline greetings to FTP protocol test.
+  Thanks to Giovanni D'Cristina for report.
+
+* Fix Debian Bug #541139: uses gethostbyname() and thus does
+  not work with "options inet6" in /etc/resolv.conf. Thanks to
+  Michael Stapelberg for patch.
+
+* If Monit configuration allowed http interface access for a read-only
+  user and it was specified as the first allow entry, Monit command line
+  commands failed because it used the read-only account so commands
+  like start, stop, etc. were rejected. Monit will now use full access
+  regardless of allow option order. Thanks to Thorsten Kampe for report.
+
+* Passive monitoring mode fixed. Thanks to Nelson Vale for report.
+
+* Fixed #27784: wait_start/wait_stop can advance too quickly.
+  Thanks to Randy Puro for report.
+
+* Solaris resource usage fixed when Monit was compiled with optimizations enabled.
+
+* Fixed #28369: escape XML properly
+
+* Check service name uniqueness when 'check system' is missing in monitrc and virtual + system service with name set to local hostname is added. Thanks to Marcus Muelbuesch
+  for report.
+
+* Fix crash when queued event delivery was retried for service which was no longer
+  configured in Monit.
+
+
+
+Version 5.0.3
+
+BUGFIXES:
+
+* Fixed #26664: crash on service timeout or unmonitor action
+  (introduced in 5.0.2). Thanks to Bretislav Kubesa and
+  Michael Shigorin for report.
+
+* Removed the configure --without-resource option. If the user
+  who is running Monit doesn't have permissions to check the
+  processes state, the related checks are disabled dynamically.
+
+
+
+Version 5.0.2
+
+BUGFIXES:
+
+* 35 improvements based on code scan with Klocwork
+  (http://www.klocwork.com/) which we were evaluating.
+  Huge thanks to Klocwork for their great product.
+
+* Fixed #26382: if start or stop script for some service didn't
+  exist, monit logged error during configuration file parsing and
+  refused to start. Monit now just logs warning and continues.
+
+
+
+Version 5.0.1
+
+BUGFIXES:
+
+* Fixed a bug where Monit did not stop logging succeeded events.
+  This bug occurred if PID, PPID, timestamp or size change tests
+  were used and failed and then succeeded again.
+
+
+
+Version 5.0
+
+NEW FEATURES AND FUNCTIONS:
+
+* M/Monit support added. If you run Monit on more than one
+  server, you can use M/Monit to manage and control all your
+  Monit enabled servers from one simple Web Interface. See
+  http://mmonit.com/ for details.
+
+* Support use of symbolic links in filesystem check. Thanks to
+  Aleksander Kamenik for suggestion. Example:
+    check filesystem rootfs path
+         /dev/disk/by-uuid/4ef973f7-67d1-4bb0-8223-cb1c692b72e4
+      if space usage > 95% then alert
+      if inode usage > 95% then alert
+
+* If no 'set mailserver' was defined in monitrc, Monit tried to
+  fallback to localhost:25 SMTP server. This fallback was removed
+  since it may be confusing. If you want to deliver mail alerts
+  from Monit, the 'set mailserver' option is necessary. In case
+  it is missing, Monit will log appropriate error and hint to add
+  it.
+
+* The generic send/expect protocol test limited the expect input
+  to 256 bytes. It's possible to set the input buffer for expect
+  globally - for example: set expectbuffer 20 kb Thanks to Asil
+  Carlin for suggestion.
+
+* The following event types were added CONTENT, FSFLAGS, PID and
+  PPID and the following generic event types CHANGED and MATCH were
+  removed and replaced by the above types and with the existing SIZE,
+  CHECKSUM, TIMESTAMP events so the information is more specific
+  The event types are internal to Monit and unless you have used
+  either CHANGED or MATCH event in your alert filters, no change
+  is necessary (alerts are delivered as usual, the tests just use
+  different types internally).
+
+* Monit now generates a unique id on first start and store the id
+  in a permanent file. This id is used in protocol communication
+  between Monit and M/Monit to pair a Monit instance with it's
+  host entry in M/Monit. By default the id file is placed in
+  $HOME/.monit.id. The location can be changed by using the set
+  idfile statement, for example:
+    set idfile /var/monit.id
+
+* Monit now keep its service monitoring state even on Monit
+  restart. Previously Monit dropped the state when it was stopped
+  correctly. Services in manual monitoring mode will remember the
+  monitoring state across Monit restarts. If Monit is used in a
+  cluster, it is recommended to place the state file in a
+  temporary filesystem incase the primary machine will crash and
+  the the spare machine takeover, the state will be dropped on
+  reboot for the crashed machine and the services in manual
+  monitoring mode won't be started on reboot. For example the
+  "set statefile /tmp/monit.state" can be used to place the state
+  file in the /tmp/ filesystem.
+
+* Added a protocol test for testing the LMTP protocol. Thanks
+  to Fco. Javier Felix for patch.
+
+* Added the start delay option for daemon statement which allows
+  to pause Monit on its startup for a while. If monitored
+  services are started by init scripts in parallel on system
+  boot, Monit may be too fast and detect that the service is not
+  running (yet) and restart the service. Note that it's still
+  recommended Monit is setup to be responsible for service
+  startup (that is, don't use init to start Monit controlled
+  services, instead use Monit). This will ensure correct startup
+  without need for a start delay since Monit will have full
+  control of service startup. Many users start services from init
+  on boot anyway, so in such cases this option will solve their
+  problems. Default start delay is 0 which corresponds to the
+  current behavior. Example syntax which will make Monit wait one
+  minute before starting its first monitoring cycle:
+  --8<--
+    set daemon 5 with start delay 60
+  --8<--
+  Thanks to Fco. Javier Felix for patch.
+
+* Added PAM support for Monit http interface authentication. Note
+  that PAM is not supported on all platforms - currently works on
+  Linux, Mac OS X, FreeBSD, NetBSD. Monit uses the PAM service "monit".
+  Here is a Monit PAM service example for Mac OS X which is able
+  to authenticate system users for Monit access -
+  /etc/pam.d/monit:
+  --8<--
+    # monit: auth account password session
+    auth       sufficient     pam_securityserver.so
+    auth       sufficient     pam_unix.so
+    auth       required       pam_deny.so
+    account    required       pam_permit.so
+  --8<--
+  And configuration for monitrc which allows only group admins
+  to access the http interface:
+  --8<--
+    set httpd port 2812 allow @admin
+  --8<--
+  See the PAM manual page for details on how to configure the PAM
+  service on your system and the available PAM plugins. Thanks to
+  Wilhelm Meier for patch.
+
+* Added more detailed reports for Monit resource tests on service
+  recovery. Thanks to Lars Kotthoff for patch.
+
+* Set locale to C.
+
+* Added a protocol test for testing the SIP protocol which is
+  used by popular communication servers such as Asterisk and
+  FreeSWITCH. We received two patches for this protocol and have
+  taken code from both and merged them. Many thanks to Bret
+  McDanel and to Pierrick Grasland for supplying the patches.
+
+* Added MONIT_DESCRIPTION to the list of environment variables
+  available to programs started by monit. Thanks to Morten
+  Bressendorff Schmidt for patch.
+
+* If a service group is specified for Monit CLI action,
+  Monit no longer requires the "all" verb, so the following
+  command is possible:
+    monit -g web stop
+  If group is not specified (i.e. the -g option is omitted), the
+  service name or "all" is still required as a safeguard.
+
+* Added an option to the 'set mailserver' statement so it is
+  possible to override the hostname used in SMTP EHLO/HELO and in
+  the Message-ID header when sending mail. Monit defaults to use
+  the localhost name. I.e. what you get when executing this
+  command 'uname -n'. Overriding the host name can be useful if
+  the host does not have a DNS entry and if the receiving
+  mailserver uses DNS verification as spam protection. The new
+  override option is:
+  set mailserver foo.bar.baz using hostname "my.monit.host"
+
+* A new Event_Action type was added which reports actions
+  performed on Monit's administrator request (either via web
+  interface or CLI). If you don't want to received these events,
+  you can set the mail-filter for "action" event type.
+
+* NOTA BENE: Monit start action is synchronous now. This improves
+  the startup sequence for dependent services, since Monit will
+  wait for parent service to start before trying to start the
+  child.
+
+* It is now possible to define execution timeout for start and
+  stop commands. That is, how long Monit will wait after
+  executing a command before it assume execution failed. If the
+  timeout option is omitted, Monit defaults to 30 seconds. You
+  can override the timeout for example for services which are
+  starting slower.
+  Example syntax:
+    start program = "/bin/foo start" with timeout 60 seconds
+
+* The event passed state is renamed to succeeded as this name
+  more reflects the state of things.
+
+* The device service test is renamed to filesystem.
+
+BUGFIXES:
+
+* Some linux virtualization platforms report CPU count as 0.
+  Monit then dynamically disabled CPU usage monitoring. In such
+  case we now override the CPU count from 0 to 1 so resource
+  usage monitoring can continue. Thanks to Jenny Hopkins for
+  report.
+
+* Increased the server socket backlog queue which will make Monit
+  able to handle more services. Thanks to Jochen Kramer.
+
+* Fixed #24866: Email messages such as: cpu wait usage check
+  succeeded [current cpu wait usage=17.4%] were displayed as
+  "...usage<SOMEGARBAGE>.4%". The problem was incorrect transfer
+  encoding header in the email (the body itself was OK). Thanks
+  to Dave Cheney for report.
+
+* When a Monit shutdown requested was issued while Monit were
+  working and testing services, Monit did not shutdown until all
+  work were done, i.e. until all services were tested. Monit will
+  now shutdown faster - as soon as it finish testing the current
+  service.
+
+* Monit blocked/unblocked SIGTERM, SIGINT SIGHUP and SIGUSR1
+  signals during operation to protect certain code sections. When
+  a signal was sent during such a time, for example to stop
+  Monit, it was dropped and had to be retried in order to stop
+  Monit. This limitation is now removed and signals will be
+  processed at any time. Thanks to Nicola Tiling for report.
+
+* If the Monit httpd allow option did not include a
+  user:password, Monit CLI logged the following error (even if
+  the action was performed anyway):
+     Cleartext credentials needed for basic authorization!
+  This error was false - even access restriction based on
+  host/net is sufficient - user and password is just one of
+  possible options (not requirement). Thanks to Gilad Benjamini
+  for report.
+
+* Allow localhost as a value for the host header in the http
+  protocol test instead of setting an empty host header and let
+  the http server decide
+
+* The 'if changed checksum ...' test can now be used even if a
+  monitored file doesn't exist at Monit startup. Thanks to Joe
+  Shang for report.
+
+* If both event handlers (M/Monit and mail alerts) temporarily
+  failed at once and event queue was enabled, events will be
+  stored in the queue and delivered in the next cycle. However, a
+  bug caused delivery to be retried for every cycle for both
+  handlers if just one of them was recovered. Monit could then
+  deliver the same message multiple times until both handlers
+  recovered. The problem is now fixed and only one copy of the
+  event is sent even if only one handler did recover.
+
+* Make unit in size test optional and default to byte unless
+  specified. So it is possible to write, if size > 1000 then ..
+
+* Fixed handling of invalid input files in event queue handler.
+  Thanks to Fco.Javier Felix for patch.
+
+* Set the content type to text/html for Monit web interface POST
+  responses. Thanks to Rich Drummond for patch.
+
+* Fixed #23530: configure script will return error if bison,
+  byacc or yacc are not found at Monit compile time.
+
+* Fix CPU and memory monitoring on Solaris (it was disabled on
+  Monit start)
+
+* AIX fixes and extensions, Monit should run on AIX without
+  problems, including cpu, memory and filesystem monitoring
+  (tested with AIX 5.3). Thanks to Brian Downey for support
+  and help.
+
+* HP-UX fixes and extensions, Monit should run on HP-UX without
+  problems, including cpu, memory and filesystem monitoring.
+  Thanks to Brian Downey for support and help.
+
+* Fixed #23467: Don't exit, only issue a warning if the "include"
+  statement did not find any files to include.
+
+* Fixed #23530: Event queue did not work with the default
+  unlimited slots.
+
+* Fixed #23617: The process cpu usage is initializing in the
+  first cycle so the value is set to 0% - if the 'cpu usage <
+  xyz%' test was used to check that the process usage is higher
+  then given level, it was always true. Monit now skips the
+  process cpu usage check in the first cycle.
+
+* Make sure Monit alerts has a unique message id. Thanks to Steve
+  Purcell for report
+
+* Fixed possible crash when Monit is watching VPS environment on
+  Linux which reports number of CPUs as 0. Thanks to Marius
+  Schmidt for report.
+
+* Cleanup event states during a service stop/unmonitor so old
+  events are not sent when the service is started/monitored again.
+
+* Fixed #21989: Monit could start two instances of the process
+  when service restart is performed and the process is starting
+  slowly. Thanks to Nick Upson, Aaron Scamehorn and David Greaves
+  for report.
+
+* Fixed #21550: Fix crash when Monit event queue contained an
+  empty file. Thanks to Douglas J Hunley for report.
+
+* Fixed possible crash when the 'if changed checksum' test was
+  used along with restart action. Thanks to Brian Candler for
+  report.
+
+* Fixed #22075: Allow using a mail address as username when using
+  SMTP authentication.
+
+* Fixed #22191 and #19823: If the file content test does not match
+  anymore, reset the service error state. (Previous versions did
+  not clear the error state and kept showing a match in the status
+  listing and in the http interface).
+
+* The 'if changed size ...' test can now be used even if the
+  monitored file does not exist on monit's start.
+
+* If a htpasswd file is used to control Monit http interface
+  access and the hash type is set to MD5 but the file contains
+  wrong format (non-MD5), report the error and keep running.
+  Formerly Monit exited with an assert exception. Thanks to
+  Adrian Bridgett for report.
+
+BACKWARD INCOMPATIBLE CHANGES:
+
+* The current CPU usage test which checked the cpu usage of the
+  process itself plus the cpu usage of child processes was
+  renamed to TOTALCPU (otherwise it works the same). The new CPU
+  usage test checks the CPU usage of the process itself only.
+  This change was introduced to align the syntax with MEMORY and
+  TOTALMEMORY tests and to allow to test the CPU usage of
+  processes which fork child processes but the user don't want to
+  include children (such as Mythtv). Users who are using the CPU
+  check for services like Apache webserver to watch total cpu
+  utilization (including children) should rename the CPU
+  statement in their configuration to TOTALCPU.
+
=======================================
--- /dev/null
+++ /trunk/COPYING      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,677 @@
+                    GNU AFFERO GENERAL PUBLIC LICENSE
+                       Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+  A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate.  Many developers of free software are heartened and
+encouraged by the resulting cooperation.  However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+  The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community.  It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server.  Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+  An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals.  This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Remote Network Interaction; Use with the GNU General Public License.
+
+  Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software.  This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source.  For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code.  There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
+
+                        License Exception
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL. If you modify
+file(s) with this exception, you may extend this exception to your
+version of the file(s), but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source
+files in the program, then also delete it here.
=======================================
--- /dev/null
+++ /trunk/Makefile.am  Sat Jun 11 17:19:40 2011
@@ -0,0 +1,145 @@
+# Copyright (C) 2011 Tildeslash Ltd. All rights reserved.
+
+AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
+ACLOCAL_AMFLAGS         = -I m4
+
+EXTRA_DIST = README AUTHORS CHANGES COPYING bootstrap doc src config monitrc contrib libmonit
+
+SUBDIRS                = libmonit
+
+CC             = @CC@
+FLEX           = @FLEX@
+FLEXFLAGS      = -i
+YACC           = @YACC@
+YACCFLAGS      = -dvt
+POD2MAN                = @POD2MAN@
+POD2MANFLAGS   = @POD2MANFLAGS@
+
+AM_CPPFLAGS = $(CPPFLAGS) $(EXTCPPFLAGS) address@hidden@ -DSYSCONFDIR="\"@address@hidden""
+AM_LDFLAGS     = $(LDFLAGS) $(EXTLDFLAGS) -L./lib/
+INCLUDES = -I./src -I./src/device -I./src/http -I./src/process -I./src/protocols
+INCLUDES       += -I./libmonit/src
+
+# The mmonit binary
+bin_PROGRAMS   = monit
+monit_SOURCES  = src/y.tab.c \
+                 src/lex.yy.c \
+                 src/monit.c \
+                 src/alert.c \
+                 src/collector.c \
+                 src/control.c \
+                 src/daemonize.c \
+                 src/env.c \
+                 src/event.c \
+                 src/file.c \
+                 src/gc.c \
+                 src/http.c \
+                 src/log.c \
+                 src/md5.c \
+                 src/net.c \
+                 src/process.c \
+                 src/sendmail.c \
+                 src/sha.c \
+                 src/signal.c \
+                 src/socket.c \
+                 src/spawn.c \
+                 src/ssl.c \
+                 src/state.c \
+                 src/status.c \
+                 src/util.c \
+                 src/validate.c \
+                 src/xmalloc.c \
+                 src/xml.c \
+                 src/http/base64.c \
+                 src/http/cervlet.c \
+                 src/http/engine.c \
+                 src/http/processor.c \
+                 src/protocols/apache_status.c \
+                 src/protocols/clamav.c \
+                 src/protocols/default.c \
+                 src/protocols/dns.c \
+                 src/protocols/dwp.c \
+                 src/protocols/ftp.c \
+                 src/protocols/generic.c \
+                 src/protocols/gps.c \
+                 src/protocols/http.c \
+                 src/protocols/imap.c \
+                 src/protocols/ldap2.c \
+                 src/protocols/ldap3.c \
+                 src/protocols/lmtp.c \
+                 src/protocols/memcache.c \
+                 src/protocols/mysql.c \
+                 src/protocols/nntp.c \
+                 src/protocols/ntp3.c \
+                 src/protocols/pgsql.c \
+                 src/protocols/pop.c \
+                 src/protocols/postfix_policy.c \
+                 src/protocols/protocol.c \
+                 src/protocols/radius.c \
+                 src/protocols/rdate.c \
+                 src/protocols/rsync.c \
+                 src/protocols/sip.c \
+                 src/protocols/smtp.c \
+                 src/protocols/ssh.c \
+                 src/protocols/tns.c \
+                 src/device/device_common.c \
+                 src/device/address@hidden@.c \
+                 src/process/process_common.c \
+                 src/process/address@hidden@.c
+
+monit_LDADD    = libmonit/libmonit.la
+monit_LDFLAGS  = -static $(EXTLDFLAGS)
+
+man_MANS       = monit.1
+
+BUILT_SOURCES   = src/lex.yy.c src/y.tab.c src/tokens.h
+
+CLEANFILES     = $(BUILT_SOURCES)
+DISTCLEANFILES = *~
+
+
+# -------
+# Targets
+# -------
+
+dist-hook::
+       -rm -rf `find $(distdir) -name "._*"`
+       -rm -rf `find $(distdir) -name ".DS_Store"`
+       -rm -rf `find $(distdir) -name ".libs"`
+       -rm -rf `find $(distdir) -name ".svn"`
+       -rm -f $(distdir)/src/config.h $(distdir)/src/stamp-*
+ -perl -pi -e 's/^Version: .*/Version: '$(VERSION)'/' $(distdir)/contrib/packages/redhat/monit.spec
+       -chmod 600 monitrc
+
+clean-local:
+       -rm -f `find . -name "*.o" -o -name "*.lo" -o -name "*.loT" -o -name 
"*~"`
+
+distclean-local:
+       -rm -rf autom4te.cache/ \
+               src/y.output \
+               monit-[0-9].*tar.gz
+       -rm -rf lib include
+
+cleanall: clean distclean
+ -rm -f Makefile.in configure aclocal.m4 autom4te.cache src/config.h.in monit.1 config/config.*
+       -rm -rf m4
+
+monit.1: doc/monit.pod
+       $(POD2MAN) $(POD2MANFLAGS) $< > $@
+       -rm -f pod2*
+
+# -------------
+# Grammar rules
+# -------------
+
+src/y.tab.c src/tokens.h : src/p.y
+       $(YACC) $(YACCFLAGS) $< -o src/y.tab.c
+       echo "#include <config.h>" > src/.y.tab.c
+       cat src/y.tab.c >> src/.y.tab.c
+       -mv src/.y.tab.c src/y.tab.c
+       -mv src/y.tab.h src/tokens.h
+
+src/lex.yy.c: src/l.l
+       $(FLEX) $(FLEXFLAGS) -o $@ $<
+
+
=======================================
--- /dev/null
+++ /trunk/README       Sat Jun 11 17:19:40 2011
@@ -0,0 +1,98 @@
+MONIT
+
+Introduction
+------------
+
+Monit is a utility for managing and monitoring processes, files,
+directories and filesystems on a Unix system. Monit conducts automatic
+maintenance and repair and can execute meaningful causal actions in error
+situations.
+
+Monit logs to syslog or to its own log file and notifies you about error
+conditions via customizable alert messages. Monit can perform various
+TCP/IP network checks, protocol checks and can utilize SSL for such checks.
+Monit provides an optional http(s) interface and you can use a browser to
+access the Monit program.
+
+
+System requirements
+-------------------
+
+* Memory and Disk space
+
+  A minimum of 1 megabytes RAM are required and around 500KB of free disk
+  space. You may need more RAM depending on how many services Monit should
+  monitor.
+
+* ANSI-C Compiler and Build System
+
+  You will need an ANSI-C99 compiler installed to build Monit. The GNU C
+  compiler (GCC) from the Free Software Foundation (FSF) is recommended. In
+  addition, your PATH must contain basic build tools such as make, bison
+  and flex.
+
+
+Installation
+------------
+
+Monit utilize the GNU auto-tools and provided the requirements above are
+satisfied, building Monit is conducted via the standard;
+
+ ./configure
+ make
+ make install
+
+This will install Monit and the Monit man-file in /usr/local/bin and
+/usr/local/man/man1 respectively. If you want another location than
+/usr/local, run configure with the prefix options, like so: ./configure
+--prefix=<dir>
+
+Use ./configure --help for build and install options. By default, Monit is
+built with SSL, PAM and large file support. You may change this with the
+--without-<xxx> options to ./configure. E.g. --without-ssl, --without-pam
+or --without-largefiles.
+
+
+QUICK START
+-----------
+
+After you have built Monit you can simply start the monit program from the
+build directory to test it. Monit will use the monitrc control file located
+in this directory for it's configuration. The file is setup to start
+Monit's http server so you have something interesting to look at; After you
+have started monit, point your browser to http://127.0.0.1:2812/ and log in
+with the username admin and password monit.
+
+Once started, monit will run as a background process. To stop monit, use
+monit quit. To run monit in the foreground and in diagnostic mode, start
+monit with the -Iv options. In diagnostic mode, monit will print debug
+information to the console. Use ctrl+c to stop monit in diagnostic mode. To
+see all options for the program, use monit -h.
+
+Copy monitrc in the build directory to $HOME/.monitrc or if you plan to run
+Monit as root to /etc/monitc. Use this file as a starting point to write
+your own configuration file for Monit.
+
+Please also use `man monit' for an in-depth documentation on the program.
+
+
+Questions and support
+---------------------
+
+If you have questions or comments about the software or documentation
+please subscribe to the Monit general mailing list and post your questions
+there. http://lists.nongnu.org/mailman/listinfo/monit-general
+
+
+Acknowledgments
+---------------
+
+Monit is a product of Tildeslash Ltd. a company registered in Norway and in
+United Kingdom. Many have contributed to this software and they are listed
+in the AUTHORS file.
+
+Thanks to the Free Software Foundation (FSF) for hosting the mailing lists
+and many thanks to Google for providing the subversion repository.
+
+For further information about this Software, please visit
+http://mmonit.com/monit/
=======================================
--- /dev/null
+++ /trunk/bootstrap    Sat Jun 11 17:19:40 2011
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Use this script to re-create configure. Requires the following auto-tools,
+# autoconf        >= 2.59
+# automake        >= 1.9
+# libtool         >= 1.4
+glibtoolize -f 2>/dev/null || libtoolize -f
+if aclocal -I config && autoheader && automake --foreign --add-missing --copy && autoconf
+then
+        cd libmonit || exit 1;
+        ./bootstrap || exit 1;
+        echo "Success bootstrapping Monit"
+        exit 0;
+fi
+echo "Failed bootstrapping Monit"
+exit 1;
=======================================
--- /dev/null
+++ /trunk/config/install-sh    Sat Jun 11 17:19:40 2011
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""        $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+ -C install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from 
address@hidden
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"  2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"       2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /trunk/config/ltmain.sh     Sat Jun 11 17:19:40 2011
@@ -0,0 +1,1 @@
+link /opt/local/share/libtool/config/ltmain.sh
=======================================
--- /dev/null
+++ /trunk/config/missing       Sat Jun 11 17:19:40 2011
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <address@hidden>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <address@hidden>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /address@hidden/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /trunk/configure.ac Sat Jun 11 17:19:40 2011
@@ -0,0 +1,807 @@
+# Process this file with bootstrap to produce a configure script.
+
+# autoconf requirement
+AC_PREREQ([2.53])
+
+# Note: in case of beta subversion, use underscore "_" rather then dash "-"
+# since RPM doesn't allow dash in Version
+# Example: 5.0_beta2
+AC_INIT([monit], [5.2.6], address@hidden)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src/monit.c])
+AC_CONFIG_SUBDIRS([libmonit])
+AC_CONFIG_COMMANDS([libtool_patch],[test `uname` = "OpenBSD" && perl -p -i -e "s/deplibs_check_method=.*/deplibs_check_method=pass_all/g" libtool])
+
+
+# ------------------------------------------------------------------------
+# Programs
+# ------------------------------------------------------------------------
+
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [no], [$PATH:/usr/local/bin:/usr/bin])
+if test "x$YACC" = "xno"; then
+ AC_MSG_ERROR([Monit requires bison, byacc or yacc. Download bison from http://www.gnu.org/software/bison/])
+fi
+AC_PATH_PROG([FLEX], [flex], [no], [$PATH:/usr/local/bin:/usr/bin])
+if test "x$FLEX" = "xno"; then
+ AC_MSG_ERROR([flex is required. Download from http://www.gnu.org/software/flex/])
+fi
+AC_PATH_PROG([POD2MAN], [pod2man], [no], [$PATH:/usr/local/bin:/usr/bin])
+if test "x$POD2MAN" = "xno"; then
+       # Require pod2man unless monit.1 already is built
+       if test ! -f monit.1; then
+               AC_MSG_ERROR([pod2man is required to build the monit.1 man 
file.])
+       fi
+else
+       d=`date  '+%B %d. %Y'`
+ POD2MANFLAGS="--center 'User Commands' --release '${d}' --date='www.mmonit.com' --lax"
+       AC_SUBST([POD2MANFLAGS])
+fi
+
+
+# ------------------------------------------------------------------------
+# Libtool
+# ------------------------------------------------------------------------
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+
+# ------------------------------------------------------------------------
+# Libraries
+# ------------------------------------------------------------------------
+
+# Check for libraries
+AC_CHECK_LIB([socket], [socket])
+AC_CHECK_LIB([inet],   [socket])
+AC_CHECK_LIB([nsl],    [inet_addr])
+AC_CHECK_LIB([resolv], [inet_aton])
+AC_CHECK_LIB([crypt],  [crypt])
+
+AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([POSIX thread library is required])])
+
+# ------------------------------------------------------------------------
+# Header files
+# ------------------------------------------------------------------------
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_STAT
+AC_HEADER_TIME
+
+AC_CHECK_HEADERS([ \
+        alloca.h \
+       arpa/inet.h \
+       asm/page.h \
+       asm/param.h \
+       cf.h \
+       crt_externs.h \
+       ctype.h \
+       crypt.h \
+       dirent.h \
+       errno.h \
+       execinfo.h \
+       fcntl.h \
+       getopt.h \
+       glob.h \
+       grp.h \
+       kvm.h \
+       paths.h \
+       kstat.h \
+       libperfstat.h \
+       limits.h \
+       loadavg.h \
+       locale.h \
+        mach/host_info.h \
+        mach/mach.h \
+        mach/mach_host.h \
+       memory.h \
+       mntent.h \
+       netdb.h \
+        sys/socket.h \
+       netinet/in.h \
+        netinet/in_systm.h \
+        pam/pam_appl.h \
+       poll.h \
+       procfs.h \
+       sys/procfs.h \
+       procinfo.h \
+       pthread.h \
+       pwd.h \
+       regex.h \
+        security/pam_appl.h \
+       setjmp.h \
+       signal.h \
+       stdarg.h \
+        stddef.h \
+       stdio.h \
+       string.h \
+       strings.h \
+       stropts.h \
+       sys/cfgodm.h \
+       sys/cfgdb.h \
+       sys/dk.h \
+       sys/dkstat.h \
+       sys/filio.h \
+       sys/ioctl.h \
+       sys/loadavg.h \
+       sys/lock.h \
+       sys/mnttab.h \
+       sys/mutex.h \
+       sys/nlist.h \
+       sys/param.h \
+       sys/pstat.h \
+       sys/queue.h \
+       sys/resource.h \
+       sys/statfs.h \
+       sys/statvfs.h \
+       sys/systemcfg.h \
+       sys/time.h \
+       sys/tree.h \
+       sys/types.h \
+       sys/un.h \
+       sys/utsname.h \
+        sys/vmmeter.h \
+       sys/vfs.h \
+       syslog.h \
+       unistd.h \
+        uvm/uvm.h \
+        uvm/uvm_extern.h \
+        vm/vm.h \
+       ])
+
+AC_CHECK_HEADERS([ \
+       netinet/ip.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_TYPES_H
+         #include <sys/types.h>
+         #endif
+         #if HAVE_NETINET_IN_SYSTM_H
+         #include <netinet/in_systm.h>
+         #endif
+         #if HAVE_NETINET_IN_SYSTM_H
+         #include <netinet/in.h>
+         #endif
+        ])
+
+AC_CHECK_HEADERS([ \
+       net/if.h \
+       netinet/ip_icmp.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_TYPES_H
+         #include <sys/types.h>
+         #endif
+         #if HAVE_SYS_SOCKET_H
+         #include <sys/socket.h>
+         #endif
+         #if HAVE_NETINET_IN_SYSTM_H
+         #include <netinet/in.h>
+         #endif
+         #if HAVE_NETINET_IN_SYSTM_H
+         #include <netinet/in_systm.h>
+         #endif
+         #if HAVE_NETINET_IP_H
+         #include <netinet/ip.h>
+         #endif
+        ])
+
+AC_CHECK_HEADERS([ \
+        sys/sysctl.h \
+        sys/mount.h \
+        sys/proc.h \
+        sys/swap.h \
+       sys/ucred.h \
+        sys/user.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_PARAM_H
+         #include <sys/param.h>
+         #endif
+        ])
+
+AC_CHECK_HEADERS([ \
+       machine/vmparam.h \
+        vm/pmap.h \
+        machine/pmap.h \
+        vm/vm_map.h \
+       vm/vm_object.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_PARAM_H
+         #include <sys/param.h>
+         #endif
+         #ifdef HAVE_SYS_QUEUE_H
+         #include <sys/queue.h>
+         #endif
+         #ifdef HAVE_SYS_LOCK_H
+         #include <sys/lock.h>
+         #endif
+         #ifdef HAVE_SYS_MUTEX_H
+         #include <sys/mutex.h>
+         #endif
+         #ifdef HAVE_VM_VM_H
+         #include <vm/vm.h>
+         #endif
+         #ifdef HAVE_VM_PMAP_H
+         #include <vm/pmap.h>
+         #endif
+        ])
+
+AC_CHECK_HEADERS([ \
+        sys/resourcevar.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_TIME_H
+         #include <sys/time.h>
+         #endif
+         #ifdef HAVE_SYS_RESOURCE_H
+         #include <sys/resource.h>
+         #endif
+        ])
+
+AC_CHECK_HEADERS([ \
+       uvm/uvm_map.h \
+       uvm/uvm_pmap.h \
+       uvm/uvm_object.h \
+        ],
+        [],
+        [],
+        [
+         #ifdef HAVE_SYS_TIME_H
+         #include <sys/time.h>
+         #endif
+         #ifdef HAVE_SYS_LOCK_H
+         #include <sys/lock.h>
+         #endif
+         #ifdef HAVE_SYS_TREE_H
+         #include <sys/tree.h>
+         #endif
+         #ifdef HAVE_UVM_UVM_EXTERN_H
+         #include <uvm/uvm_extern.h>
+         #endif
+        ])
+
+# Check for types.
+AC_TYPE_MODE_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+
+# Check for structures.
+AC_STRUCT_TM
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
+
+
+# ------------------------------------------------------------------------
+# Functions
+# ------------------------------------------------------------------------
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_STAT
+AC_FUNC_STRFTIME
+AC_CHECK_FUNCS(statfs)
+AC_CHECK_FUNCS(statvfs)
+AC_CHECK_FUNCS(setlocale)
+AC_CHECK_FUNCS(getaddrinfo)
+AC_CHECK_FUNCS(syslog)
+AC_CHECK_FUNCS(vsyslog)
+AC_CHECK_FUNCS(backtrace)
+
+# Check for SOL_IP
+AC_MSG_CHECKING(for SOL_IP)
+AC_TRY_COMPILE([
+       #include <netdb.h>
+       #include <sys/socket.h>],
+       [int level = SOL_IP;],
+       [AC_MSG_RESULT(yes)
+       AC_DEFINE([HAVE_SOL_IP], [1], [Define to 1 if SOL_IP is defined.])],
+       [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING(for va_copy)
+AC_TRY_LINK([
+       #include <stdarg.h>
+], [
+       va_list ap;
+       va_list ap_copy;
+       va_copy(ap, ap_copy);
+], [
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([HAVE_VA_COPY], [1], [Define to 1 if VA_COPY is defined.])
+], [
+       AC_MSG_RESULT(no)
+])
+
+
+# ------------------------------------------------------------------------
+# Compiler
+# ------------------------------------------------------------------------
+
+# Compiler characteristics
+AC_C_CONST
+AC_C_BIGENDIAN
+
+# If the compiler is gcc, tune warnings and make the char type unsigned
+# and enable C99 support
+if test "x$GCC" = "xyes"; then
+       CFLAGS="$CFLAGS -Wall -Wunused -Wno-unused-label -funsigned-char";
+        # Add C99 support
+        CFLAGS="$CFLAGS -D_GNU_SOURCE -std=c99"
+        # does this compiler support -Wno-pointer-sign ?
+        svd_CFLAGS="$CFLAGS"
+        CFLAGS="-Wno-pointer-sign $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])], [], [CFLAGS="$svd_CFLAGS"])
+        # does this compiler support -Wno-address ?
+        svd_CFLAGS="$CFLAGS"
+        CFLAGS="-Wno-address $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])], [], [CFLAGS="$svd_CFLAGS"])
+fi
+
+
+# ------------------------------------------------------------------------
+# Paths
+# ------------------------------------------------------------------------
+
+# Find the right directory to put the root-mode PID file in
+AC_MSG_CHECKING([pid file location])
+if test -d "/var/run"
+then
+       piddir="/var/run"
+elif test -d "/etc"
+then
+       piddir="/etc"
+fi
+
+AC_DEFINE_UNQUOTED([PIDDIR], "$piddir",
+         [Define to the pid storage directory.])
+AC_MSG_RESULT([$piddir])
+
+# Test mounted filesystem description file
+if test -f "/etc/mtab"
+then
+  AC_DEFINE([HAVE_MTAB], 1, [Define to 1 if you have /etc/mtab])
+elif test -f "/etc/mnttab"; then
+  AC_DEFINE([HAVE_MNTTAB], 1, [Define to 1 if you have /etc/mnttab])
+fi
+
+# ------------------------------------------------------------------------
+# Architecture/OS detection
+# ------------------------------------------------------------------------
+
+# Backward compatibility until we get ride of arch settings
+if test `uname` = "SunOS"
+then
+   ARCH="SOLARIS"
+   CFLAGS="$CFLAGS -D _REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+   test_kstat="true"
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
+elif test `uname` = "Linux"
+then
+   ARCH="LINUX"
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   LDFLAGS="$LDFLAGS -rdynamic"
+   if test `uname -r | awk -F '.' '{print$1$2}'` -ge "26"
+   then
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
+   fi
+elif test `uname` = "HP-UX"
+then
+   ARCH="HPUX"
+   CFLAGS="$CFLAGS -D _REENTRANT"
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
+elif test `uname` = "OpenBSD"
+then
+   ARCH="OPENBSD"
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   test_kvm="true"
+elif test `uname` = "FreeBSD"
+then
+   ARCH="FREEBSD"
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   test_kvm="true"
+elif test `uname` = "NetBSD"
+then
+   ARCH="NETBSD"
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   test_kvm="true"
+elif test `uname` = "Darwin"
+then
+   ARCH="DARWIN"
+   CFLAGS="$CFLAGS -DREENTRANT -no-cpp-precomp -DNEED_SOCKLEN_T_DEFINED"
+   test_kvm="true"
+   LIBS="$LIBS -framework System -multiply_defined suppress"
+elif test `uname` = "AIX"
+then
+   ARCH="AIX"
+   CFLAGS="$CFLAGS -D_THREAD_SAFE -D_REENTRANT"
+   LIBS="$LIBS -lodm"
+   # AIX v. 5.2
+   LIBS="$LIBS -lcfg"
+   # AIX v. 5.3
+   LIBS="$LIBS -lperfstat"
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
+else
+   AC_MSG_WARN([Architecture not supported: `uname`.])
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   ARCH="UNKNOWN"
+fi
+AC_SUBST(ARCH)
+
+# ------------------------------------------------------------------------
+# Resource code
+# ------------------------------------------------------------------------
+
+# Test for kvm libs
+kvm_libs=""
+if test "$test_kvm"; then
+               AC_CHECK_LIB([kvm],
+                    [kvm_open],
+                    [kvm_libs="-lkvm"])
+               if test "$kvm_libs"
+               then
+                       LIBS="$LIBS $kvm_libs"
+               fi
+fi
+kstat_libs=""
+if test "$test_kstat"; then
+               AC_CHECK_LIB([kstat],
+                    [kstat_open],
+                    [kstat_libs="-lkstat"])
+               if test "$kstat_libs"
+               then
+                       LIBS="$LIBS $kstat_libs"
+               fi
+fi
+
+
+# ------------------------------------------------------------------------
+# Large files code
+# ------------------------------------------------------------------------
+
+# Check if we want to have large files support
+AC_MSG_CHECKING([for large files support])
+AC_ARG_WITH(largefiles,
+ [ --without-largefiles disable large files support (default: enabled)],
+    [
+        dnl Check the withvalue
+        if test "x$withval" = "xno" ; then
+            use_largefiles=0
+            AC_MSG_RESULT([disabled])
+        fi
+        if test "x$withval" = "xyes" ; then
+            use_largefiles=1
+            AC_MSG_RESULT([enabled])
+        fi
+    ],
+    [
+       if test `uname` = "AIX"
+       then
+           use_largefiles=0
+           AC_MSG_RESULT([disabled])
+       else
+           use_largefiles=1
+           AC_MSG_RESULT([enabled])
+       fi
+    ]
+)
+
+# Settings for largefiles support
+if test "$use_largefiles" = 1; then
+        if test "$ARCH" = "SOLARIS"; then
+            if ! ( echo $CFLAGS | egrep '(64|v9)' >/dev/null 2>&1); then
+ echo "###############################################################################" + echo "### Solaris requires 64-bit support for large files and resource monitoring ###" + echo "### enabled. ###" + echo "### ###" + echo "### Compile monit with 64-bit support (see PLATFORMS file for details) ###" + echo "###############################################################################" + AC_MSG_ERROR([Solaris requires 64-bit support for large files and resource monitoring enabled])
+            fi
+        fi
+        AC_SYS_LARGEFILE
+fi
+
+
+# ------------------------------------------------------------------------
+# PAM Code
+# ------------------------------------------------------------------------
+
+AC_MSG_CHECKING([for PAM support])
+AC_ARG_WITH(pam,
+    [  --without-pam           disable the use of pam (default: enabled)],
+    [
+        dnl Check the withvalue
+        if test "x$withval" = "xno" ; then
+            use_pam=0
+            AC_MSG_RESULT([disabled])
+        fi
+        if test "x$withval" = "xyes" ; then
+            use_pam=1
+            AC_MSG_RESULT([enabled])
+        fi
+    ],
+    [
+        use_pam=1
+        AC_MSG_RESULT([enabled])
+    ]
+)
+
+if test "$use_pam" = "1"; then
+        AC_CHECK_LIB([pam],    [pam_start])
+fi
+
+
+# ------------------------------------------------------------------------
+# SSL Code
+# ------------------------------------------------------------------------
+
+# Check for ssl includes (taken from the stunnel project)
+checksslincldir() { :
+    if test -f "$1/openssl/ssl.h"; then
+        sslincldir="$1"
+        return 0
+    fi
+    return 1
+}
+
+# Check for ssl libraries
+checkssllibdirdynamic() { :
+    if test "(" -f "$1/libcrypto.so" -o -f "$1/libcrypto.dylib" ")"  -a \
+            "(" -f "$1/libssl.so"    -o -f "$1/libssl.dylib" ")" ; then
+        ssllibdir="$1"
+        return 0
+    fi
+    return 1
+}
+
+checkssllibdirstatic() { :
+    if test "(" -f "$1/libcrypto.a" ")"  -a \
+            "(" -f "$1/libssl.a" ")" ; then
+        ssllibdir="$1"
+        return 0
+    fi
+    return 1
+}
+
+# Check if we want to have SSL
+
+AC_MSG_CHECKING([for static SSL support])
+
+AC_ARG_WITH(ssl-static,
+    [  --with-ssl-static=DIR       location of SSL installation],
+    [
+        dnl Check the specified location only
+        for dir in "$withval" "$withval/include"; do
+            checksslincldir "$dir"
+        done
+        for dir in "$withval" "$withval/lib"; do
+            checkssllibdirstatic "$dir" && break 2
+        done
+        use_sslstatic=1
+        LDFLAGS="`echo $LDFLAGS | sed -e 's/-rdynamic/-ldl/g'`"
+        AC_MSG_RESULT([enabled])
+        AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
+        AC_SUBST(sslincldir)
+        AC_SUBST(ssllibdir)
+        CFLAGS="$CFLAGS -I$sslincldir"
+        LIBS="$LIBS $ssllibdir/libssl.a $ssllibdir/libcrypto.a"
+    ],
+    [
+       use_sslstatic=0
+        AC_MSG_RESULT([disabled])
+    ]
+)
+
+if test "$use_sslstatic" = "0"
+then
+    AC_MSG_CHECKING([for SSL support])
+
+    AC_ARG_WITH(ssl,
+ [ --without-ssl disable the use of ssl (default: enabled)],
+        [
+            dnl Check the withvalue
+            if test "x$withval" = "xno" ; then
+                use_ssl=0
+                AC_MSG_RESULT([disabled])
+            fi
+            if test "x$withval" = "xyes" ; then
+                use_ssl=1
+                AC_MSG_RESULT([enabled])
+            fi
+        ],
+        [
+            use_ssl=1
+            AC_MSG_RESULT([enabled])
+        ]
+    )
+
+
+    # Check for SSL directory (taken from the stunnel project)
+    if test "$use_ssl" = "1"; then
+
+        AC_ARG_WITH(ssl-dir,
+            [  --with-ssl-dir=DIR       location of SSL installation],
+            [
+                dnl Check the specified location only
+                for dir in "$withval" "$withval/include"; do
+                       checksslincldir "$dir"
+                done
+                for dir in "$withval" "$withval/lib"; do
+                    checkssllibdirdynamic "$dir" && break 2
+                done
+            ]
+        )
+
+        AC_MSG_CHECKING([for SSL include directory])
+        AC_ARG_WITH(ssl-incl-dir,
+ [ --with-ssl-incl-dir=DIR location of installed SSL include files],
+            [
+                dnl Check the specified location only
+                checksslincldir "$withval"
+            ],
+            [
+                if test -z "$sslincldir"; then
+                    dnl Search default locations of SSL includes
+ for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt /usr/sfw; do
+                        for dir in "$maindir/include"\
+                                   "$maindir/include/openssl"\
+                                   "$maindir/include/ssl"\
+                                   "$maindir/ssl/include"; do
+                            checksslincldir $dir && break 2
+                        done
+                    done
+                fi
+            ]
+        )
+        if test -z "$sslincldir"; then
+            AC_MSG_RESULT([Not found])
+            echo
+            echo "Couldn't find your SSL header files."
+ echo "Use --with-ssl-incl-dir option to fix this problem or disable"
+            echo "the SSL support with --without-ssl"
+            echo
+            exit 1
+        fi
+        AC_MSG_RESULT([$sslincldir])
+
+        AC_MSG_CHECKING([for SSL library directory])
+        AC_ARG_WITH(ssl-lib-dir,
+ [ --with-ssl-lib-dir=DIR location of installed SSL library files],
+            [
+                dnl Check the specified location only
+                checkssllibdirdynamic "$withval"
+            ],
+            [
+                if test -z "$ssllibdir"; then
+                    dnl Search default locations of SSL libraries
+                    for maindir in /usr \
+                                   /usr/local \
+                                   /usr/pkg \
+                                   /var /opt \
+                                   /usr/sfw; do
+                        for dir in $maindir \
+                                   $maindir/openssl \
+                                   $maindir/ssl \
+                                   $maindir/lib \
+                                   $maindir/lib/openssl \
+                                   $maindir/lib/ssl \
+                                   $maindir/ssl/lib \
+                                   $maindir/lib/64 \
+                                   $maindir/lib/64/openssl \
+                                   $maindir/lib/64/ssl \
+                                   $maindir/ssl/lib/64 \
+                                   $maindir/lib64 \
+                                   $maindir/lib64/openssl \
+                                   $maindir/lib64/ssl \
+                                   $maindir/ssl/lib64; do
+                            checkssllibdirdynamic $dir && break 2
+                        done
+                    done
+                fi
+            ]
+        )
+        if test -z "$ssllibdir"; then
+            AC_MSG_RESULT([Not found])
+            echo
+            echo "Couldn't find your SSL library files."
+ echo "Use --with-ssl-lib-dir option to fix this problem or disable the"
+            echo "SSL support with --without-ssl"
+            echo
+            exit 1
+        fi
+        AC_MSG_RESULT([$ssllibdir])
+
+        AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
+        AC_SUBST(sslincldir)
+        AC_SUBST(ssllibdir)
+    fi
+
+    # Add SSL includes and libraries
+    if test "$sslincldir" -a "$ssllibdir"
+    then
+        if test "x$ARCH" = "xDARWIN"; then
+         # Darwin already knows about ssldirs
+         LIBS="$LIBS -lssl -lcrypto"
+        elif test -f "/usr/kerberos/include/krb5.h"; then
+         # Redhat 9 compilation fix:
+         CFLAGS="$CFLAGS -I$sslincldir -I/usr/kerberos/include"
+         LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+        else
+         CFLAGS="$CFLAGS -I$sslincldir"
+         LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+        fi
+    fi
+fi
+
+# ------------------------------------------------------------------------
+# Outputs
+# ------------------------------------------------------------------------
+
+AC_CONFIG_HEADER([src/config.h])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+echo
+echo "Monit Build Information:"
+echo
+echo "                Architecture: ${ARCH}"
+if test "$use_sslstatic" = "1" -o "$use_ssl" = "1"; then
+echo "       SSL include directory: ${sslincldir}"
+echo "       SSL library directory: ${ssllibdir}"
+fi
+echo "              Compiler flags: ${CFLAGS}"
+echo "                Linker flags: ${LIBS}"
+echo "           pid file location: ${piddir}"
+echo "           Install directory: ${prefix}"
+echo
+
+cat <<EOT
++------------------------------------------------------------+
+| License:                                                   |
+| This is Open Source Software and use is subject to the GNU |
+| AFFERO GENERAL PUBLIC LICENSE version 3, available in this |
+| distribution in the file COPYING.                          |
+|                                                            |
+| By continuing this installation process, you are bound by  |
+| the terms of this license agreement. If you do not agree   |
+| with the terms of this license, you must abort the         |
+| installation process at this point.                        |
++------------------------------------------------------------+
+| Monit has been configured with the following options:      |
+|                                                            |
+EOT
+if test "$use_pam" = "1"; then
+echo "|   PAM support:                                  ENABLED    |"
+else
+echo "|   PAM support:                                  DISABLED   |"
+fi
+if test "$use_sslstatic" = "1" -o "$use_ssl" = "1"; then
+echo "|   SSL support:                                  ENABLED    |"
+else
+echo "|   SSL support:                                  DISABLED   |"
+fi
+if test "$use_largefiles" = "1"; then
+echo "|   Large files support:                          ENABLED    |"
+else
+echo "|   Large files support:                          DISABLED   |"
+fi
+echo "+------------------------------------------------------------+"
=======================================
--- /dev/null
+++ /trunk/contrib/monit.upstart        Sat Jun 11 17:19:40 2011
@@ -0,0 +1,35 @@
+# This is an event.d (upstart) script to keep monit running.
+# To install disable the old way of doing things:
+#
+#   /etc/init.d/monit stop && update-rc.d -f monit remove
+#
+# then put this script here:
+#
+#   /etc/init/monit.conf
+#
+# and reload upstart configuration:
+#
+#   initctl reload-configuration
+#
+# You can manually start and stop monit like this:
+#
+# start monit
+# stop monit
+#
+# Michael Hale (http://halethegeek.com)
+# Martin Pala (http://www.mmonit.com)
+
+description "Monit service manager"
+
+limit core unlimited unlimited
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+expect daemon
+respawn
+
+exec /usr/local/bin/monit -c /etc/monitrc
+
+pre-stop exec /usr/local/bin/monit -c /etc/monitrc quit
+
=======================================
--- /dev/null
+++ /trunk/contrib/monitrc-gentoo       Sat Jun 11 17:19:40 2011
@@ -0,0 +1,328 @@
+###############################################################################
+## Monit control file
+###############################################################################
+##
+## Comments begin with a '#' and extend through the end of the line. Keywords +## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
+##
+## Bellow is the example of some frequently used statements. For information
+## about the control file, a complete list of statements and options please
+## have a look in the monit manual.
+##
+##
+###############################################################################
+## Global section
+###############################################################################
+##
+## Start monit in background (run as daemon) and check the services at 2-minute
+## intervals.
+#
+set daemon  120
+#
+#
+## Set syslog logging with the 'daemon' facility. If the FACILITY option is
+## omited, monit will use 'user' facility by default. You can specify the
+## path to the file for monit native logging.
+#
+# set logfile syslog facility log_daemon
+#
+#
+## Set list of mailservers for alert delivery. Multiple servers may be
+## specified using comma separator. By default monit uses port 25 - it is
+## possible to override it with the PORT option.
+#
+# set mailserver mail.bar.baz,               # primary mailserver
+# backup.bar.baz port 10025, # backup mailserver on port 10025
+#                localhost                   # fallback relay
+#
+#
+## By default monit will drop the event alert, in the case that there is no
+## mailserver available. In the case that you want to keep the events for
+## later delivery retry, you can use the EVENTQUEUE statement. The base
+## directory where undelivered events will be stored is specified by the
+## BASEDIR option. You can limit the maximal queue size using the SLOTS
+## option (if omited then the queue is limited just by the backend filesystem).
+#
+# set eventqueue
+# basedir /var/monit # set the base directory where events will be stored
+#     slots 100           # optionally limit the queue size
+#
+#
+## Monit by default uses the following alert mail format:
+##
+## --8<--
+## From: address@hidden                         # sender
+## Subject: monit alert --  $EVENT $SERVICE  # subject
+##
+## $EVENT Service $SERVICE                   #
+##                                           #
+##     Date:        $DATE                   #
+##     Action:      $ACTION                 #
+##     Host:        $HOST                   # body
+##     Description: $DESCRIPTION            #
+##                                           #
+## Your faithful employee,                   #
+## monit                                     #
+## --8<--
+##
+## You can override the alert message format or its parts such as subject
+## or sender using the MAIL-FORMAT statement. Macros such as $DATE, etc.
+## are expanded on runtime. For example to override the sender:
+#
+# set mail-format { from: address@hidden }
+#
+#
+## You can set the alert recipients here, which will receive the alert for
+## each service. The event alerts may be restricted using the list.
+#
+# set alert address@hidden                       # receive all alerts
+# set alert address@hidden only on { timeout }  # receive just service-
+#                                                # timeout alert
+#
+#
+## Monit has an embedded webserver, which can be used to view the
+## configuration, actual services parameters or manage the services using the
+## web interface.
+#
+set httpd port 2812 and
+     use address localhost  # only accept connection from localhost
+     allow localhost        # allow localhost to connect to the server and
+#     allow admin:monit      # require user 'admin' with password 'monit'
+#
+#
+###############################################################################
+## Services
+###############################################################################
+##
+## Check the general system resources such as load average, cpu and memory
+## usage. Each rule specifies the tested resource, the limit and the action
+## which will be performed in the case that the test failed.
+#
+check system localhost
+#    if loadavg (1min) > 4 then alert
+#    if loadavg (5min) > 2 then alert
+#    if memory usage > 75% then alert
+#    if cpu usage (user) > 70% then alert
+#    if cpu usage (system) > 30% then alert
+#    if cpu usage (wait) > 20% then alert
+#
+#
+
+# vixie cron
+check process cron with pidfile /var/run/cron.pid
+   group system
+   start program = "/etc/init.d/vixie-cron start"
+   stop  program = "/etc/init.d/vixie-cron stop"
+   if 5 restarts within 5 cycles then timeout
+   depends on cron_rc
+
+check file cron_rc with path /etc/init.d/vixie-cron
+   group system
+   if failed checksum then unmonitor
+   if failed permission 755 then unmonitor
+   if failed uid root then unmonitor
+   if failed gid root then unmonitor
+
+check process syslogd with pidfile /var/run/syslog-ng.pid
+    start program = "/etc/init.d/syslog-ng start"
+    stop program = "/etc/init.d/syslog-ng stop"
+    if 5 restarts within 5 cycles then timeout
+
+check file syslogd_file with path /var/log/messages
+    if timestamp > 65 minutes then alert # Have you seen "-- MARK --"?
+
+
+# vsftp
+check process vsftpd with pidfile /var/run/vsftpd.pid
+   start program = "/etc/init.d/vsftpd start"
+   stop program  = "/etc/init.d/vsftpd stop"
+   if failed port 21 protocol ftp then restart
+   if 5 restarts within 5 cycles then timeout
+
+check process sshd with pidfile /var/run/sshd.pid
+   start program  "/etc/init.d/sshd start"
+   stop program  "/etc/init.d/sshd stop"
+   if failed port 22 protocol ssh then restart
+   if 5 restarts within 5 cycles then timeout
+
+# apache2
+check process apache with pidfile /var/run/apache2.pid
+   group www
+   start program = "/etc/init.d/apache2 start"
+   stop  program = "/etc/init.d/apache2 stop"
+   if failed port 80 protocol http then restart
+   if 5 restarts within 5 cycles then timeout
+
+# postfix
+check process postfix with pidfile /var/spool/postfix/pid/master.pid
+   group mail
+   start program = "/etc/init.d/postfix start"
+   stop  program = "/etc/init.d/postfix stop"
+   if failed port 25 protocol smtp then restart
+   if 5 restarts within 5 cycles then timeout
+   depends on postfix_rc
+
+check file postfix_rc with path /etc/init.d/postfix
+   group mail
+   if failed checksum then unmonitor
+   if failed permission 755 then unmonitor
+   if failed uid root then unmonitor
+   if failed gid root then unmonitor
+
+# postgresql
+check process postgresql with pidfile /var/postgresql/data/postmaster.pid
+   group database
+   start program = "/etc/init.d/postgresql start"
+   stop program = "/etc/init.d/postgresql stop"
+
+# slapd
+check process slapd with pidfile /var/run/openldap/slapd.pid
+   group database
+   start program = "/etc/init.d/slapd start"
+   stop program = "/etc/init.d/slapd stop"
+#   if failed port 389 protocol ldap3 then restart
+#   if 5 restarts within 5 cycles then timeout
+
+check process smbd with pidfile /var/run/samba/smbd.pid
+   group samba
+   start program = "/etc/init.d/samba start"
+   stop  program = "/etc/init.d/samba stop"
+   if failed port 139 type TCP then restart
+   if 5 restarts within 5 cycles then timeout
+   depends on smbd_bin
+
+check file smbd_bin with path /usr/sbin/smbd
+   group samba
+   if failed checksum then unmonitor
+   if failed permission 755 then unmonitor
+   if failed uid root then unmonitor
+   if failed gid root then unmonitor
+
+check process nmbd with pidfile /var/run/samba/nmbd.pid
+    group samba
+    start program = "/etc/init.d/samba start"
+    stop  program = "/etc/init.d/samba stop"
+    if failed port 138 type UDP  then restart
+    if failed port 137 type UDP  then restart
+    if 5 restarts within 5 cycles then timeout
+    depends on nmbd_bin
+
+check file nmbd_bin with path /usr/sbin/nmbd
+    group samba
+    if failed checksum then unmonitor
+    if failed permission 755 then unmonitor
+    if failed uid root then unmonitor
+    if failed gid root then unmonitor
+
+check process ddclient with pidfile /var/run/ddclient.pid
+    group other
+    start program = "/etc/init.d/ddclient start"
+    stop  program = "/etc/init.d/ddclient stop"
+
+## Check a file for existence, checksum, permissions, uid and gid. In addition +## to the recipients in the global section, customized alert will be send to +## the additional recipient. The service may be grouped using the GROUP option.
+#
+#  check file apache_bin with path /usr/local/apache/bin/httpd
+#    if failed checksum and
+#       expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor
+#    if failed permission 755 then unmonitor
+#    if failed uid root then unmonitor
+#    if failed gid root then unmonitor
+#    alert address@hidden on {
+#           checksum, permission, uid, gid, unmonitor
+#        } with the mail-format { subject: Alarm! }
+#    group server
+#
+#
+## Check that a process is running, responding on the HTTP and HTTPS request,
+## check its resource usage such as cpu and memory, number of children.
+## In the case that the process is not running, monit will restart it by
+## default. In the case that the service was restarted very often and the
+## problem remains, it is possible to disable the monitoring using the
+## TIMEOUT statement. The service depends on another service (apache_bin) which
+## is defined in the monit control file as well.
+#
+#  check process apache with pidfile /usr/local/apache/logs/httpd.pid
+#    start program = "/etc/init.d/httpd start"
+#    stop program  = "/etc/init.d/httpd stop"
+#    if cpu > 60% for 2 cycles then alert
+#    if cpu > 80% for 5 cycles then restart
+#    if totalmem > 200.0 MB for 5 cycles then restart
+#    if children > 250 then restart
+#    if loadavg(5min) greater than 10 for 8 cycles then stop
+#    if failed host www.tildeslash.com port 80 protocol http
+#       and request "/monit/doc/next.php"
+#       then restart
+#    if failed port 443 type tcpssl protocol http
+#       with timeout 15 seconds
+#       then restart
+#    if 3 restarts within 5 cycles then timeout
+#    depends on apache_bin
+#    group server
+#
+#
+## Check the filesystem permissions, uid, gid, space and inode usage. Other
+## services such as databases may depend on this resource and automatical
+## graceful stop may be cascaded to them before the filesystem will become
+## full and the data will be lost.
+#
+#  check filesystem datafs with path /dev/sdb1
+#    start program  = "/bin/mount /data"
+#    stop program  = "/bin/umount /data"
+#    if failed permission 660 then unmonitor
+#    if failed uid root then unmonitor
+#    if failed gid disk then unmonitor
+#    if space usage > 80% for 5 times within 15 cycles then alert
+#    if space usage > 99% then stop
+#    if inode usage > 30000 then alert
+#    if inode usage > 99% then stop
+#    group server
+#
+#
+## Check a file's timestamp: when it becomes older then 15 minutes, the
+## file is not updated and something is wrong. In the case that the size
+## of the file exceeded given limit, perform the script.
+#
+#  check file database with path /data/mydatabase.db
+#    if failed permission 700 then alert
+#    if failed uid data then alert
+#    if failed gid data then alert
+#    if timestamp > 15 minutes then alert
+#    if size > 100 MB then exec "/my/cleanup/script"
+#
+#
+## Check the directory permission, uid and gid.  An event is triggered
+## if the directory does not belong to the user with the  uid 0 and
+## the gid 0.  In the addition the permissions have to match the octal
+## description of 755 (see chmod(1)).
+#
+#  check directory bin with path /bin
+#    if failed permission 755 then unmonitor
+#    if failed uid 0 then unmonitor
+#    if failed gid 0 then unmonitor
+#
+#
+## Check the remote host network services availability and the response
+## content.  One of three pings, a successfull connection to a port and
+## application level network check is performed.
+#
+#  check host myserver with address 192.168.1.1
+#    if failed icmp type echo count 3 with timeout 3 seconds then alert
+#    if failed port 3306 protocol mysql with timeout 15 seconds then alert
+#    if failed url
+#       http://user:address@hidden:8080/?querystring
+#       and content == 'action="j_security_check"'
+#       then alert
+#
+#
+###############################################################################
+## Includes
+###############################################################################
+##
+## It is possible to include the configuration or its parts from other files or
+## directories.
+#
+#  include /etc/monit.d/*
+#
+#
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/Makefile    Sat Jun 11 17:19:40 2011
@@ -0,0 +1,72 @@
+# New ports collection makefile for:   monit
+# Date created:        11 Januar 2006
+# Whom:                Martin Pala <address@hidden>
+#
+# $FreeBSD$
+#
+
+PORTNAME=              monit
+PORTVERSION=           4.9
+CATEGORIES=            sysutils
+MASTER_SITES=          http://www.tildeslash.com/monit/dist/
+
+MAINTAINER=            address@hidden
+COMMENT=               Unix system management and monitoring
+
+MAN1=                  monit.1
+
+GNU_CONFIGURE=         yes
+USE_GMAKE=             yes
+USE_BISON=             yes
+USE_RC_SUBR=           yes
+
+CONFIGURE_ENV=         CC="${CC}" CPPFLAGS="${CPPFLAGS}" \
+                       CFLAGS="${CFLAGS}" \
+                       LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}" \
+                       LOCALBASE="${LOCALBASE}"
+
+OPTIONS=               SSL "Enable SSL support" on
+
+PLIST_FILES=           bin/monit \
+                       etc/monitrc.sample \
+                       etc/rc.d/monit.sh \
+                       share/doc/monit/CHANGES.txt \
+                       share/doc/monit/LICENSE \
+                       share/doc/monit/README \
+                       share/doc/monit/README.SSL \
+                       share/doc/monit/STATUS \
+                       share/doc/monit/examples.html \
+                       share/doc/monit/monit.html
+PLIST_DIRS=            share/doc/monit
+
+.include <bsd.port.pre.mk>
+
+pre-install:
+       @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+               -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
+               ${FILESDIR}/monit.sh > ${WRKDIR}/monit.sh
+
+post-install:
+       @${INSTALL_SCRIPT} -m 755 ${WRKDIR}/monit.sh ${PREFIX}/etc/rc.d/monit.sh
+ @${INSTALL_SCRIPT} -m 600 ${WRKDIR}/${DISTNAME}/monitrc ${PREFIX}/etc/monitrc.sample
+       ${MKDIR} ${DOCSDIR}
+ @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/CHANGES.txt ${PREFIX}/share/doc/monit/CHANGES.txt + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/LICENSE ${PREFIX}/share/doc/monit/LICENSE + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/README ${PREFIX}/share/doc/monit/README + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/README.SSL ${PREFIX}/share/doc/monit/README.SSL + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/STATUS ${PREFIX}/share/doc/monit/STATUS + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/doc/examples.html ${PREFIX}/share/doc/monit/examples.html + @${INSTALL_SCRIPT} -m 644 ${WRKDIR}/${DISTNAME}/doc/monit.html ${PREFIX}/share/doc/monit/monit.html
+       @${CAT} ${PKGMESSAGE}
+       @${ECHO_MSG} "     ${PREFIX}/etc/monitrc.sample"
+       @${ECHO_MSG} "     ${PREFIX}/share/doc/monit/examples.html"
+
+.if defined(WITH_SSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CONFIGURE_ARGS+=       --enable-ssl \
+                       --with-openssl="${OPENSSLBASE}"
+.else
+CONFIGURE_ARGS+=       --without-ssl
+.endif
+
+.include <bsd.port.post.mk>
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/README.porter       Sat Jun 11 17:19:40 2011
@@ -0,0 +1,35 @@
+###############################
+# To update the FreeBSD port: #
+###############################
+
+1.) prerequisites:
+
+  md5
+  sha256 (sysutils/freebsd-sha256)
+
+
+2.) modify the port:
+
+  portsnap fetch
+  portsnap update
+  cd /usr/ports/sysutils
+  cp -rp monit monit-new
+ perl -p -i -e 's/^PORTVERSION=.*/PORTVERSION= <new_version>' monit-new/Makefile
+  make -C monit-new makesum
+  diff -ruN monit monit-new > /tmp/monit.patch
+
+
+3.) send the port upgrade (for example using 'send-pr -a' or http://www.freebsd.org/send-pr.html):
+
+
+  if you are monit port maintainer:
+    synopsis: [maintainer update] sysutils/monit <new_version>
+    class:    maintainer-update
+    category: ports
+
+  otherwise:
+    synopsis: Update port: sysutils/monit <new_version>
+    class:    change-request
+    category: ports
+
+  you can include the diff as is to the PR provided it is <20KB
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/distinfo    Sat Jun 11 17:19:40 2011
@@ -0,0 +1,3 @@
+MD5 (monit-4.9.tar.gz) = bcbaab776a54d1e34e3a057c925de9ca
+SHA256 (monit-4.9.tar.gz) = 6963046fa976b682d27ac8e78cf7107d76c6907aef27b30f725f371ce64fb4bf
+SIZE (monit-4.9.tar.gz) = 573711
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/files/monit.sh      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: monit
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable monit:
+# monit_enable (bool):        Set to "NO" by default.
+#                             Set it to "YES" to enable monit
+#
+. %%RC_SUBR%%
+
+name="monit"
+rcvar=`set_rcvar`
+
+restart_precmd="monit_checkconfig"
+reload_precmd="monit_checkconfig"
+
+default_config=%%PREFIX%%/etc/monitrc
+required_files=${default_config}
+command="%%PREFIX%%/bin/monit"
+command_args="-c ${default_config}"
+pidfile="/var/run/monit.pid"
+
+[ -z "$monit_enable" ] && monit_enable="NO"
+
+load_rc_config $name
+
+monit_checkconfig()
+{
+  echo "Performing sanity check on monit configuration:"
+  ${command} ${command_args} -t
+}
+
+extra_commands="reload"
+run_rc_command "$1"
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/pkg-descr   Sat Jun 11 17:19:40 2011
@@ -0,0 +1,24 @@
+Monit is a utility for managing and monitoring processes,
+files, directories, filesystems and network services on a Unix system.
+Monit conducts automatic maintenance and repair and can execute
+meaningful causal actions in error situations.
+
+monit supports:
+ * Daemon mode - poll services at a specified interval
+ * Group and manage groups of services, service dependencies
+ * Logging - syslog or own logfile
+ * Alert, start, stop and restart of services based on it's characteristics
+ * MD5 and SHA1 checksums
+ * Runtime Unix socket and TCP/IP port checking (tcp and udp)
+ * Process status, timeout, memory and cpu usage, etc.
+ * Filesystem usage monitoring (inodes and space)
+ * File monitoring (timestamp, checksum, permission, owner, etc.)
+ * Directory monitoring (timestamp, permission, owner, etc.)
+ * Remote network services monitoring (ping, response time, protocol, etc.)
+ * System load average monitoring
+ * Flexible and customizable email alert messages and notifications
+ * Protocol verification such as HTTP, FTP, SMTP, POP, IMAP, NNTP, NTP, etc.
+ * A HTTP interface with XML output option
+ and many more features :)
+
+WWW: http://www.tildeslash.com/monit/
=======================================
--- /dev/null
+++ /trunk/contrib/packages/freebsd/pkg-message Sat Jun 11 17:19:40 2011
@@ -0,0 +1,5 @@
+===> USAGE:
+       To enable monit you need to add monit_enable="YES" to rc.conf file.
+       Before running monit you have to configure monitrc file. There is
+       example configuration file monitrc.sample, you can find many
+       samples for particular services in examples.html:
=======================================
--- /dev/null
+++ /trunk/contrib/packages/redhat/monit.spec   Sat Jun 11 17:19:40 2011
@@ -0,0 +1,133 @@
+Name: Monit
+Summary: Process monitor and restart utility
+Version: 5.2.5
+Release: 1
+Source: http://www.mmonit.com/monit/dist/%{name}-%{version}.tar.gz
+Group: Utilities/Console
+URL: http://www.mmonit.com/monit/
+BuildRoot: %{_tmppath}/%{name}-buildroot
+License: GPL
+BuildRequires: flex
+BuildRequires: bison
+BuildRequires: openssl-devel
+
+%description
+Monit is a utility for managing and monitoring processes,
+files, directories and filesystems on a Unix system. Monit conducts
+automatic maintenance and repair and can execute meaningful causal
+actions in error situations.
+
+%prep
+%setup
+
+%build
+%{configure}
+make
+
+%install
+if [ -d %{buildroot} ] ; then
+  rm -rf %{buildroot}
+fi
+
+make BINDIR=%{buildroot}%{_bindir} MANDIR=%{buildroot}%{_mandir}/man1 install
+
+mkdir -p %{buildroot}/etc/init.d
+install -m 600 monitrc %{buildroot}/etc/monitrc
+install -m 755 contrib/rc.monit %{buildroot}/etc/init.d/%{name}
+
+%post
+/sbin/chkconfig --add %{name}
+
+%preun
+if [ $1 = 0 ]; then
+   /etc/init.d/%{name} stop >/dev/null 2>&1
+   /sbin/chkconfig --del %{name}
+fi
+
+%clean
+if [ -d %{buildroot} ] ; then
+  rm -rf %{buildroot}
+fi
+
+%files
+%defattr(-,root,root)
+%doc CHANGES.txt COPYING LICENSE README README.SSL
+%config /etc/monitrc
+%config /etc/init.d/%{name}
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1.gz
+
+%changelog
+* Wed Mar 28 2011 Martin Pala <address@hidden>
+- Upgraded to monit-5.2.5
+
+* Wed Feb 23 2011 Martin Pala <address@hidden>
+- Upgraded to monit-5.2.4
+
+* Thu Sep 16 2010 Martin Pala <address@hidden>
+- Upgraded to monit-5.2
+
+* Thu Feb 18 2010 Martin Pala <address@hidden>
+- Upgraded to monit-5.1.1
+
+* Sat Jan 09 2010 Martin Pala <address@hidden>
+- Upgraded to monit-5.1
+
+* Thu May 28 2009 Martin Pala <address@hidden>
+- Upgraded to monit-5.0.3
+
+* Thu May 7 2009 Martin Pala <address@hidden>
+- Upgraded to monit-5.0.2
+
+* Wed Apr 22 2009 Martin Pala <address@hidden>
+- Upgraded to monit-5.0.1
+
+* Sun Apr 13 2008 Martin Pala <address@hidden>
+- Upgraded to monit-5.0
+
+* Mon Nov 06 2007 Martin Pala <address@hidden>
+- Upgraded to monit-4.10.1
+
+* Mon Nov 05 2007 Martin Pala <address@hidden>
+- Upgraded to monit-4.10
+
+* Wed Feb 19 2007 Martin Pala <address@hidden>
+- Upgraded to monit-4.9
+
+* Sun Mar 05 2006 Martin Pala <address@hidden>
+- Upgraded to monit-4.7
+
+* Wed Sep 19 2005 Martin Pala <address@hidden>
+- Upgraded to monit-4.6
+
+* Wed Oct 19 2004 Martin Pala <address@hidden>
+- Upgraded to monit-4.4
+
+* Wed Nov 04 2003 Martin Pala <address@hidden>
+- Fixed the bad path to monit binary in startup script. Thanks to Ben Ciceron
+  for report of the problem.
+
+* Wed Oct 27 2003 Martin Pala <address@hidden>
+- Upgraded to monit-4.1
+
+* Wed Sep 23 2003 Martin Pala <address@hidden>
+- change the description
+
+* Wed Mar 07 2003 Martin Pala <address@hidden>
+- Upgraded to monit-4.0
+- Updated documentation list
+- Changed use of monit.conf file to default monitrc ( => monit could find it )
+- Use monitrc and rc.monit from default monit distribution
+
+* Wed Jul 10 2002 Rory Toma <address@hidden>
+- Upgraded to monit-2.4.3
+
+* Mon Feb 05 2001 Clinton Work <address@hidden>
+- Upgraded to monit 1.2
+- Use chkconfig to add monit to the rc.d startup scripts
+- Use the example monitrc instead of my custom monit.conf
+- Fixed the monit homepage URL
+
+* Thu Feb 01 2001 Clinton Work <address@hidden>
+- Create the inital spec file
+- Created a sample config file and a rc startup script
=======================================
--- /dev/null
+++ /trunk/contrib/packages/solaris/README.solaris      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,84 @@
+Readme for Monit with Solaris
+=============================
+
+Written by Christian Hopp <address@hidden>  2002/07/15
+Updated by Christian Hopp <address@hidden>  2003/06/11
+
+
+Installation of the package: (e.g. for Solaris 7/Sparc)
+-------------------------------------------------------
+
+You need "gzip" for solaris in order to unpack it. You can find it at
+http://www.sunfreeware.com for your platform.
+
+Then do...
+
+gzip -d  monit-4.0-sol7-sparc-local.pkg.gz
+pkgadd -d monit-4.0-sol7-sparc-local.pkg
+
+All the stuff went to /usr/local.  The documentation is located in
+/usr/local/doc/monit.  For the installation and configuration of monit
+please look in the documents located in /usr/local/doc/monit. An
+example of an init script is there, too.
+
+In the case that you are using the 64 bit binary, the path to the ssl
+libraries has to be set. For example adding the path to the Solaris
+bundled ssl libraries:
+
+  crle -64 -l /lib/64:/usr/lib/64:/usr/sfw/lib/64
+
+
+Deinstallation of the package:
+------------------------------
+
+Simply type...
+
+pkgrm GNUmonit
+
+...and the content of the package should be gone then.
+
+
+Generation of a Solaris package:
+--------------------------------
+
+First of all you need:
+        GNU/gzip
+        openssl
+        and all other stuff you need for compilation.
+
+All that you can find at http://www.sunfreeware.com .
+
+Start the "makesolpkg.sh" script.  Beware you have to be in the
+contrib/package/solaris directory to make it work.  The pkginfo and
+the prototype files are generated.  If you wish to use different
+settings like the base directory (aka prefix) or temporary directory
+just change it in the script.
+
+Example for creating the 64-bit monit package with Sun Studio compiler
+and SSL support enabled:
+
+sparc:
+  ./makesolpkg.sh \
+     --with-ssl-incl-dir=/usr/sfw/include \
+     --with-ssl-lib-dir=/usr/sfw/lib/64 \
+     CFLAGS='-xarch=v9' \
+     LDFLAGS='-xarch=v9'
+
+amd64:
+  ./makesolpkg.sh \
+     --with-ssl-incl-dir=/usr/sfw/include \
+     --with-ssl-lib-dir=/usr/sfw/lib/64 \
+     CFLAGS='-xarch=amd64' \
+     LDFLAGS='-xarch=amd64'
+
+Make sure that the path to the GNU/make in the script is right.  The
+generated file is named for Solaris 7/Sparc:
+
+  monit-4.0-sol7-sparc-local.pkg.gz
+
+
+Bye,
+
+C.Hopp
+
+
=======================================
--- /dev/null
+++ /trunk/contrib/packages/solaris/init.monit  Sat Jun 11 17:19:40 2011
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Start/stop the monitoring server
+
+PATH=$PATH:/usr/local/bin # Change to the right path
+CONFFILE=/root/.monitrc # This is default!
+
+case "$1" in
+'start')
+       monit -c $CONFFILE
+       ;;
+'stop')
+       monit -c $CONFFILE quit
+       ;;
+*)
+       echo "Usage: $0 { start | stop }"
+       ;;
+esac
+exit 0
=======================================
--- /dev/null
+++ /trunk/contrib/packages/solaris/makesolpkg.sh       Sat Jun 11 17:19:40 2011
@@ -0,0 +1,105 @@
+#!/bin/sh
+#
+# This script generates a solaris package of of monit
+#
+# Author: Christian Hopp <address@hidden>
+#
+# Beware: You have to run it from the contrib/packages/solaris dir!!!
+#
+
+place=`pwd | sed 's%^.*/\([a-zA-z0-9]*/[a-zA-z0-9]*/[a-zA-z0-9]*\)$%\1%'`
+
+if [ $place != "contrib/packages/solaris" ]; then
+    echo "This script has to be started from [contrib/packages/solaris]!"
+    exit 1
+fi
+
+# 0) Configuration
+# ----------------
+
+cd ../../..
+
+# set path to strip
+PATH=$PATH:/usr/ccs/bin
+export PATH
+
+name=monit
+pkgname=GNUmonit
+make=/usr/local/bin/make
+prefix=/usr/local
+vendor="http://www.tildeslash.com/monit/";
+
+version=`cat configure.ac | sed -n -e '/AC_INIT/s%.*\[.*\].*\[\(.*\)\].*\[.*\].*%\1%p'`
+pstamp=monit`hostname | cut -d "." -f 1`-`date +%Y%m%d%H%M`
+platform=`uname -p`
+release=`uname -r | sed 's/5\./sol/'`
+filename=${name}-${version}-${release}-${platform}-local.pkg
+tmpdir=/tmp/${name}-install
+docs="monitrc CHANGES.txt COPYING LICENSE \
+      PLATFORMS README README.SSL STATUS UPGRADE.txt \
+      doc/* contrib/packages/solaris/init.monit \
+      contrib/packages/solaris/README.solaris"
+
+# 1) Compilation phase
+# --------------------
+
+if [ -f Makefile ]; then
+    $make clean
+fi
+
+./configure --prefix=$prefix $*
+$make
+
+# 2) Data gathering
+# -----------------
+
+if [ -x ${tmpdir} ]; then
+    /bin/rm -Rf ${tmpdir}
+fi
+
+mkdir ${tmpdir}
+mkdir ${tmpdir}/doc
+mkdir ${tmpdir}/doc/${name}
+
+$make exec_prefix=${tmpdir} prefix=${tmpdir} install
+
+cp -r $docs ${tmpdir}/doc/${name}/
+
+chown bin:bin ${tmpdir}/*
+chown bin:bin ${tmpdir}/man/*
+
+# 3) Package generation
+# ---------------------
+
+cd contrib/packages/solaris
+
+cat > pkginfo <<EOF
+CLASSES=none
+BASEDIR=$prefix
+LC_CTYPE=iso_8859_1
+LANG=C
+TZ=MET
+PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
+OAMBASE=/usr/sadm/sysadm
+PKG=$pkgname
+NAME=$name
+ARCH=$platform
+VERSION=$version
+CATEGORY=application
+VENDOR=$vendor
+PSTAMP=$pstamp
+EOF
+
+(echo 'i pkginfo'; pkgproto ${tmpdir}= ) > prototype
+pkgmk -o
+pkgtrans -s /var/spool/pkg `pwd`/${filename} $pkgname
+gzip ./${filename}
+openssl dgst -md5 ${filename}.gz > ${filename}.gz.md5
+
+# 4) Cleaning up
+# --------------
+
+/bin/rm -Rf ${tmpdir}
+/bin/rm -Rf /var/spool/pkg/$pkgname
+/bin/rm prototype
+/bin/rm pkginfo
=======================================
--- /dev/null
+++ /trunk/contrib/rc.monit     Sat Jun 11 17:19:40 2011
@@ -0,0 +1,64 @@
+#! /bin/sh
+#
+# monit         Monitor Unix systems
+#
+# Author:      Clinton Work,   <address@hidden>
+#
+# chkconfig:    2345 98 02
+# description:  Monit is a utility for managing and monitoring processes,
+#               files, directories and filesystems on a Unix system.
+# processname:  monit
+# pidfile:      /var/run/monit.pid
+# config:       /etc/monitrc
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+MONIT=/usr/bin/monit
+
+# Source monit configuration.
+if [ -f /etc/sysconfig/monit ] ; then
+        . /etc/sysconfig/monit
+fi
+
+[ -f $MONIT ] || exit 0
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+  start)
+        echo -n "Starting monit: "
+        daemon $NICELEVEL $MONIT
+        RETVAL=$?
+        echo
+        [ $RETVAL = 0 ] && touch /var/lock/subsys/monit
+        ;;
+  stop)
+        echo -n "Stopping monit: "
+        killproc monit
+        RETVAL=$?
+        echo
+        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monit
+        ;;
+  restart)
+       $0 stop
+       $0 start
+       RETVAL=$?
+       ;;
+  condrestart)
+       [ -e /var/lock/subsys/monit ] && $0 restart
+       ;;
+  status)
+        status monit
+       RETVAL=$?
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|restart|condrestart|status}"
+       exit 1
+esac
+
+exit $RETVAL
=======================================
--- /dev/null
+++ /trunk/doc/PLATFORMS        Sat Jun 11 17:19:40 2011
@@ -0,0 +1,203 @@
+                           Platform Notes
+                           --------------
+
+This file describes platform specific notes for Monit.
+
+Platforms overview in alphabetical order:
+
+ o AIX
+ o Darwin (Mac OS X)
+ o FreeBSD
+ o Linux
+ o NetBSD
+ o OpenBSD
+ o Solaris
+
+Following platforms are not actively maintained because of lack of testing
+machine for these OS's. They may work - its support was added and confirmed
+in particular Monit releases by contributors. Possible status reports, bug
+reports, patch contributions or access to such platforms for development is
+welcomed :)
+
+ o HPUX
+
+
+Platform specific notes:
+========================
+
+
+GNU/Linux
+=========
+
+Monit compiles out of the box on Linux.  Some Linux Distributions
+might have Monit as a precompiled package (see PACKAGES).
+
+In order to be able to use resource support you have to have PROCFS
+support enabled in your kernel.  In case your kernel has fortified
+your proc filesystem, e.g. using the openwall patchset, you might need
+to start Monit as the root user.
+
+In case a glibc replacement is used one of the following parts may
+apply.
+
+dietlibc
+--------
+
+Since version 4.0 the use of dietlibc is supported by Monit.  For SSL
+support you need to compile the ssl libraries with dietlibc; use the
+"--with-ssl-lib-dir=<path>" option to configure Monit.
+
+A configure for dietlibc might look like this:
+
+  env CC="diet gcc" CFLAGS="-Os" \
+      ./configure --with-ssl-lib-dir=/usr/lib/diet/lib-i386/
+
+
+uClibc
+------
+
+The support for uClibc has been integrated in version 4.0.  Like
+dietlibc you need to compile openssl with uClibc for SSL support.  You
+also need to have the openssl include files outside of your "standard"
+include files (e.g. use an "openssl" link in you <uClibc>/include
+tree).  Otherwise your uClibc include files are mixed up with the
+glibc includes. Finally, specify your <uClibc>/ tree in your configure
+run with "--with-ssl-dir=<path>".
+
+A configure for uClibc might look like this:
+
+  env CC="i386-uclibc-gcc" CFLAGS="-Os" \
+      ./configure --with-ssl-dir=/usr/i386-linux-uclibc
+
+
+Solaris
+=======
+
+64-bit Monit is required for Solaris support.
+
+You can use either gcc or Sun Studio for compilation.
+
+Package prerequisites
+
+Solaris 10:
+  SUNWbash
+  SUNWgmake
+  SUNWgcc
+  SUNWopenssl-include
+  SUNWopenssl-libraries
+  SUNWbison
+  SUNWflexlex
+  SUNWflexruntime
+  CSWautoconf           (http://www.blastwave.org))
+  CSWautomake           (http://www.blastwave.org))
+  CSWgm4                (http://www.blastwave.org))
+
+Solaris Nevada:
+  SUNWaconf              NOTE: only if compiling using cvs sources
+  SUNWbash
+  SUNWgmake
+  SUNWgcc
+  SUNWopenssl-include
+  SUNWopenssl-libraries
+  SUNWbison
+  SUNWflexlex
+  SUNWflexruntime        NOTE: see bellow for Solaris Nevada x86 - AMD64
+  CSWgm4                (http://www.blastwave.org))
+
+Set path to the SFW utilities and libraries, for example:
+
+  PATH=$PATH:/usr/sfw/bin:/opt/csw/bin
+  export PATH
+
+  crle -l /lib:/usr/lib:/usr/sfw/lib               # (32-bit)
+  crle -64 -l /lib/64:/usr/lib/64:/usr/sfw/lib/64  # (64-bit)
+
+Configure Monit with 64-bit support (examples):
+
+  gcc [sparc]:
+  ./configure \
+      --with-ssl-incl-dir=/usr/sfw/include \
+      --with-ssl-lib-dir=/usr/sfw/lib/64 \
+      CFLAGS='-m64 -mtune=v9' \
+      LDFLAGS='-m64 -mtune=v9'
+
+  gcc [amd64]:
+  ./configure \
+      --with-ssl-incl-dir=/usr/sfw/include \
+      --with-ssl-lib-dir=/usr/sfw/lib/64 \
+      CFLAGS='-m64 -mtune=opteron' \
+      LDFLAGS='-m64 -mtune=opteron'
+
+  Sun Studio 12 [sparc]:
+  ./configure \
+      --with-ssl-incl-dir=/usr/sfw/include \
+      --with-ssl-lib-dir=/usr/sfw/lib/64 \
+      CFLAGS='-xarch=v9' \
+      LDFLAGS='-xarch=v9' \
+      CC=/opt/SUNWspro/bin/cc
+
+  Sun Studio 12 [amd64]:
+  ./configure \
+      --with-ssl-incl-dir=/usr/sfw/include \
+      --with-ssl-lib-dir=/usr/sfw/lib/64 \
+      CFLAGS='-m64' \
+      LDFLAGS='-m64' \
+      CC=/opt/SUNWspro/bin/cc
+
+Compile Monit with:
+
+  gmake
+
+
+AIX
+===
+
+Configure Monit with SSL path (examples):
+
+    ./configure \
+        --with-ssl-incl-dir=/opt/freeware/include \
+        --with-ssl-lib-dir=/opt/freeware/64/lib
+
+Use GNU make to compile ('gmake')
+
+
+FreeBSD + NetBSD + OpenBSD
+==========================
+
+Use GNU make to compile ('gmake')
+
+
+Darwin (Mac OS X)
+=================
+
+Monit compiles out of the box on Mac OS X.
+
+It seems that Apple is phasing out the kvm interface and that
+it is disabled by default on Intel based Mac OS X 10.4.8 and later.
+You can get following error in such case for Monit <= 4.9:
+
+ --8<--
+ kvm_open: : /dev/mem: No such file or directory
+ system statistic error -- cannot initialize kvm interface
+ system statistic error -- cannot initialize the process tree =>
+ process resource monitoring disabled
+ --8<--
+
+You can reenable the kvm interface by adding the kmem to the boot-args
+Open Firmware variable as root - for example:
+
+ nvram boot-arg="kmem=1"
+
+and reboot the machine.
+
+Monit > 4.9 don't need this workaround.
+
+
+Any other not yet mentioned but posix compatible platform
+=========================================================
+
+Monit might be able to compile using the "UNKNOWN" architecure.  In
+case a wrong platform is detected you can enforce this behavior by
+using the "--without-resource" flag in the configure run.  Generally,
+it is advisable to stick to gcc for compiling.
+
=======================================
--- /dev/null
+++ /trunk/doc/monit.pod        Sat Jun 11 17:19:40 2011
@@ -0,0 +1,3871 @@
+#
+# The right margin in this file is 65 characters.
+# In Emacs use -- set-variable: fill-column = 65
+#
+
+=head1 NAME
+
+Monit - utility for monitoring services on a Unix system
+
+
+=head1 SYNOPSIS
+
+B<monit> [options] {arguments}
+
+
+=head1 DESCRIPTION
+
+B<monit> is a utility for managing and monitoring processes,
+files, directories and filesystems on a Unix system. Monit
+conducts automatic maintenance and repair and can execute
+meaningful causal actions in error situations. E.g. Monit can
+start a process if it does not run, restart a process if it does
+not respond and stop a process if it uses too much resources. You
+may use Monit to monitor files, directories and filesystems for
+changes, such as timestamps changes, checksum changes or size
+changes.
+
+Monit is controlled via an easy to configure control file based
+on a free-format, token-oriented syntax. Monit logs to syslog or
+to its own log file and notifies you about error conditions via
+customizable alert messages. Monit can perform various TCP/IP
+network checks, protocol checks and can utilize SSL for such
+checks. Monit provides a http(s) interface and you may use a
+browser to access the Monit program.
+
+
+=head1 GENERAL OPERATION
+
+The behavior of Monit is controlled by command-line options
+I<and> a run control file, F<~/.monitrc>, the syntax of which we
+describe in a later section. Command-line options override
+F<.monitrc> declarations.
+
+The following options are recognized by monit. However, it is
+recommended that you set options (when applicable) directly in
+the I<.monitrc> control file.
+
+=head2 General Options and Arguments
+
+B<-c> I<file>
+   Use this control file
+
+B<-d> I<n>
+   Run as a daemon once per I<n> seconds
+
+B<-g>
+   Set group name for start, stop, restart, monitor and
+   unmonitor.
+
+B<-l> I<logfile>
+   Print log information to this file
+
+B<-p> I<pidfile>
+   Use this lock file in daemon mode
+
+B<-s> I<statefile>
+   Write state information to this file
+
+B<-I>
+   Do not run in background (needed for run from init)
+
+B<-t>
+   Run syntax check for the control file
+
+B<-v>
+   Verbose mode, work noisy (diagnostic output)
+
+B<-vv>
+   Very verbose mode, same as -v plus log stacktrace on error
+
+B<-H> I<[filename]>
+   Print MD5 and SHA1 hashes of the file or of stdin if the
+   filename is omitted; Monit will exit afterwards
+
+B<-V>
+   Print version number and patch level
+
+B<-h>
+   Print a help text
+
+
+In addition to the options above, Monit can be started with one
+of the following action arguments; Monit will then execute the
+action and exit without transforming itself to a daemon.
+
+
+B<start all>
+   Start all services listed in the control file and
+   enable monitoring for them. If the group option is
+   set, only start and enable monitoring of services in
+   the named group (no "all" verb is required in this
+   case).
+
+B<start name>
+   Start the named service and enable monitoring for
+   it. The name is a service entry name from the
+   monitrc file.
+
+B<stop all>
+   Stop all services listed in the control file and
+   disable their monitoring. If the group option is
+   set, only stop and disable monitoring of the services
+   in the named group (no "all" verb is required in this
+   case).
+
+B<stop name>
+   Stop the named service and disable its monitoring.
+   The name is a service entry name from the monitrc
+   file.
+
+B<restart all>
+   Stop and start I<all> services. If the group option
+   is set, only restart the services in the named group
+   (no "all" verb is required in this case).
+
+B<restart name>
+   Restart the named service. The name is a service entry
+   name from the monitrc file.
+
+B<monitor all>
+   Enable monitoring of all services listed in the
+   control file. If the group option is set, only start
+   monitoring of services in the named group (no "all"
+   verb is required in this case).
+
+B<monitor name>
+   Enable monitoring of the named service.  The name is
+   a service entry name from the monitrc file. Monit will
+   also enable monitoring of all services this service
+   depends on.
+
+B<unmonitor all>
+   Disable monitoring of all services listed in the
+   control file. If the group option is set, only disable
+   monitoring of services in the named group (no "all"
+   verb is required in this case).
+
+B<unmonitor name>
+   Disable monitoring of the named service. The name is
+   a service entry name from the monitrc file. Monit
+   will also disable monitoring of all services that
+   depends on this service.
+
+B<status>
+    Print full status information for each service.
+
+B<summary>
+    Print short status information for each service.
+
+B<reload>
+    Reinitialize a running Monit daemon, the daemon will
+    reread its configuration, close and reopen log files.
+
+B<quit>
+    Kill a Monit daemon process
+
+B<validate>
+   Check all services listed in the control file. This
+   action is also the default behavior when Monit runs
+   in daemon mode.
+
+B<procmatch regex>
+   Allows for easy testing of pattern for process match
+   check. The command takes regular expression as an
+   argument and displays all running processes matching
+   the pattern.
+
+
+=head1 WHAT TO MONITOR
+
+You may use Monit to monitor daemon processes or similar programs
+running on localhost. Monit is particular useful for monitoring
+daemon processes, such as those started at system boot time from
+/etc/init.d/. For instance sendmail, sshd, apache and mysql. In
+difference to many monitoring systems, Monit can act if an error
+situation should occur, e.g.; if sendmail is not running, monit
+can start sendmail or if apache is using too much resources (e.g.
+if a DoS attack is in progress) Monit can stop or restart apache
+and send you an alert message. Monit can also monitor process
+characteristics, such as; if a process has become a zombie and
+how much memory or cpu cycles a process is using.
+
+You may also use Monit to monitor files, directories and
+filesystems on localhost. Monit can monitor these items for
+changes, such as timestamps changes, checksum changes or size
+changes. This is also useful for security reasons - you can
+monitor the md5 checksum of files that should not change.
+
+You may even use Monit to monitor remote hosts. First and
+foremost Monit is a utility for monitoring and mending services
+on localhost, but if a service depends on a remote service, e.g.
+a database server or an application server, it might by useful to
+be able to test a remote host as well.
+
+You may monitor the general system-wide resources such as cpu
+usage, memory and load average.
+
+
+=head1 HOW TO MONITOR
+
+Monit is configured and controlled via a control file called
+B<monitrc>. The default location for this file is ~/.monitrc. If
+this file does not exist, Monit will try /etc/monitrc, then
+S<@sysconfdir@>/monitrc and finally ./monitrc.
+
+A Monit control file consists of a series of service entries and
+global option statements in a free-format, token-oriented syntax.
+Comments begin with a # and extend through the end of the line.
+There are three kinds of tokens in the control file: grammar
+keywords, numbers and strings.
+
+On a semantic level, the control file consists of three types of
+statements:
+
+=over 4
+
+=item 1. Global set-statements
+
+A global set-statement starts with the keyword I<set> and the
+item to configure.
+
+=item 2. Global include-statement
+
+The include statement consists of the keyword I<include> and
+a glob string.
+
+=item 3. One or more service entry statements.
+
+A service entry starts with the keyword I<check> followed by the
+service type.
+
+=back
+
+A Monit control file example:
+
+ #
+ # Monit control file
+ #
+
+ set daemon 120 # Poll at 2-minute intervals
+ set logfile syslog facility log_daemon
+ set alert address@hidden
+ set httpd port 2812 and use address localhost
+     allow localhost   # Allow localhost to connect
+     allow admin:Monit # Allow Basic Auth
+
+ check system myhost.mydomain.tld
+    if loadavg (1min) > 4 then alert
+    if loadavg (5min) > 2 then alert
+    if memory usage > 75% then alert
+    if swap usage > 25% then alert
+    if cpu usage (user) > 70% then alert
+    if cpu usage (system) > 30% then alert
+    if cpu usage (wait) > 20% then alert
+
+ check process apache
+    with pidfile "/usr/local/apache/logs/httpd.pid"
+    start program = "/etc/init.d/httpd start" with timeout 60 seconds
+    stop program = "/etc/init.d/httpd stop"
+    if 2 restarts within 3 cycles then timeout
+    if totalmem > 100 Mb then alert
+    if children > 255 for 5 cycles then stop
+    if cpu usage > 95% for 3 cycles then restart
+    if failed port 80 protocol http then restart
+    group server
+    depends on httpd.conf, httpd.bin
+
+ check file httpd.conf
+     with path /usr/local/apache/conf/httpd.conf
+     # Reload apache if the httpd.conf file was changed
+     if changed checksum
+        then exec "/usr/local/apache/bin/apachectl graceful"
+
+ check file httpd.bin
+     with path /usr/local/apache/bin/httpd
+     # Run /watch/dog in the case that the binary was changed
+     if failed checksum then exec "/watch/dog"
+
+ include /etc/monit/mysql.monitrc
+ include /etc/monit/mail/*.monitrc
+
+The above example illustrates a service entry for monitoring the
+apache web server process as well as related files. The meaning
+of the various statements will be explained in the following
+sections.
+
+
+=head1 LOGGING
+
+Monit will log status and error messages to a log file. Use the
+I<set logfile> statement in the monitrc control file. To setup
+Monit to log to its own logfile, use e.g. I<set logfile
+/var/log/monit.log>. If B<syslog> is given as a value for the
+I<-l> command-line switch (or the keyword I<set logfile syslog>
+is found in the control file) Monit will use the B<syslog> system
+daemon to log messages with a priority assigned to each message
+based on the context. To turn off logging, simply do not set the
+logfile in the control file (and of course, do not use the -l
+switch)
+
+
+=head1 DAEMON MODE
+
+The I<-d interval> command-line switch runs Monit in daemon
+mode. You must specify a numeric argument which is a polling
+interval in seconds.
+
+In daemon mode, Monit detaches from the console, puts itself in
+the background and runs continuously, monitoring each specified
+service and then goes to sleep for the given poll interval.
+
+Simply invoking
+
+              Monit -d 300
+
+will poll all services described in your F<~/.monitrc> file every
+5 minutes.
+
+It is strongly recommended to set the poll interval in your
+~/.monitrc file instead, by using I<set daemon B<n>>, where B<n>
+is an integer number of seconds. If you do this, Monit will
+always start in daemon mode (as long as no action arguments are
+given). Example (check every 5 minutes):
+
+  set daemon 300
+
+If you need Monit to wait some time at startup before it start
+checking services you can use the delay statement. Example (check
+every 5 minutes, wait 1 minute on start before first monitoring
+cycle):
+
+  set daemon 300 with start delay 60
+
+Monit makes a per-instance lock-file in daemon mode. If you need
+more Monit instances, you will need more configuration files,
+each pointing to its own lock-file.
+
+Calling I<monit> with a Monit daemon running in the background
+sends a wake-up signal to the daemon, forcing it to check
+services immediately.
+
+The I<quit> argument will kill a running daemon process instead
+of waking it up.
+
+
+=head1 INIT SUPPORT
+
+Monit can run and be controlled from I<init>. If Monit should
+crash, I<init> will re-spawn a new Monit process. Using init to
+start Monit is probably the best way to run Monit if you want to
+be certain that you always have a running Monit daemon on your
+system. (It's obvious, but never the less worth to stress; Make
+sure that the control file does not have any syntax errors before
+you start Monit from init. Also, make sure that if you run monit
+from init, that you do not start Monit from a startup scripts as
+well).
+
+To setup Monit to run from init, you can either use the 'set
+init' statement in monit's control file or use the -I option from
+the command line and here is what you must add to /etc/inittab:
+
+  # Run Monit in standard run-levels
+  mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
+
+After you have modified init's configuration file, you can run
+the following command to re-examine /etc/inittab and start monit:
+
+  telinit q
+
+For systems without telinit:
+
+  kill -1 1
+
+If Monit is used to monitor services that are also started at
+boot time (e.g. services started via SYSV init rc scripts or via
+inittab) then, in some cases, a race condition could occur. That
+is; if a service is slow to start, Monit can assume that the
+service is not running and possibly try to start it and raise an
+alert, while, in fact the service is already about to start or
+already in its startup sequence. Please see the FAQ for solutions
+to this problem.
+
+=head1 INCLUDE FILES
+
+The Monit control file, I<monitrc>, can include additional
+configuration files. This feature helps one to maintain a certain
+structure or to place repeating settings into one file. Include
+statements can be placed at virtually any spot. The syntax is the
+following:
+
+  INCLUDE globstring
+
+The globstring is any kind of string as defined in glob(7).
+Thus, you can refer to a single file or you can load several
+files at once.  In case you want to use whitespace in your string
+the globstring need to be embedded into quotes (') or double
+quotes ("). For example,
+
+ INCLUDE "/etc/monit/Monit configuration files/printer.*.monitrc"
+
+loads any file matching the single globstring.  If the globstring
+matches a directory instead of a file, it is silently ignored.
+
+I<INCLUDE> statements in included files are parsed as in the main
+control file.
+
+If the globstring matches several results, the files are included
+in a non sorted manner.  If you need to rely on a certain order,
+you might need to use single I<include> statements.
+
+=head1 GROUP SUPPORT
+
+Service entries in the control file, I<monitrc>, can be grouped
+together by the I<group> statement. The syntax is simply (keyword
+in capital):
+
+  GROUP groupname
+
+With this statement it is possible to group similar service
+entries together and manage them as a whole. Monit provides
+functions to start, stop, restart, monitor and unmonitor a
+group of services, like so:
+
+To start a group of services from the console:
+
+  Monit -g <groupname> start
+
+To stop a group of services:
+
+  Monit -g <groupname> stop
+
+To restart a group of services:
+
+  Monit -g <groupname> restart
+
+Note:
+the I<status> and I<summary> commands don't support the -g
+option and will print the state of all services.
+
+Service can be added to multiple groups by adding group statement
+multiple times:
+
+  group www
+  group filesystem
+
+
+=head1 MONITORING MODE
+
+Monit supports three monitoring modes per service: I<active>,
+I<passive> and I<manual>. See also the example section below for
+usage of the mode statement.
+
+In I<active> mode, Monit will monitor a service and in case of
+problems Monit will act and raise alerts, start, stop or restart
+the service. Active mode is the default mode.
+
+In I<passive> mode, Monit will passively monitor a service and
+specifically B<not> try to fix a problem, but it will still raise
+alerts in case of a problem.
+
+For use in clustered environments there is also a I<manual>
+mode. In this mode, Monit will enter I<active> mode B<only> if a
+service was brought under monit's control, for example by
+executing the following command in the console:
+
+  Monit start sybase
+  (Monit will call sybase's start method and enable monitoring)
+
+If a service was not started by Monit or was stopped or disabled
+for example by:
+
+  Monit stop sybase
+  (Monit will call sybase's stop method and disable monitoring)
+
+Monit will then not monitor the service. This allows for having
+services configured in monitrc and start it with Monit only if it
+should run. This feature can be used to build a simple failsafe
+cluster.
+
+A service's monitoring state is persistent across Monit restart.
+This means that you probably would like to make certain that
+services in manual mode are stopped or in unmonitored mode at
+server shutdown. Do for instance the following in a server
+shutdown script:
+
+  Monit stop sybase
+
+or
+
+  Monit unmonitor sybase
+
+If you use Monit in a HA-cluster you should place the state file
+in a temporary filesystem so if the machine should crash and the
+stand-by machine take over services, any manual monitoring mode
+services that were started on the crashed machine won't be
+started on reboot. Use for example:
+
+  set statefile /tmp/monit.state
+
+
+
+=head1 ALERT MESSAGES
+
+Monit will raise an email alert in the following situations:
+
+ o A service timed out
+ o A service does not exist
+ o A service related data access problem
+ o A service related program execution problem
+ o A service is of invalid object type
+ o A icmp problem
+ o A port connection problem
+ o A resource statement match
+ o A file checksum problem
+ o A file size problem
+ o A file/directory timestamp problem
+ o A file/directory/filesystem permission problem
+ o A file/directory/filesystem uid problem
+ o A file/directory/filesystem gid problem
+ o An action is done per administrator's request
+
+Monit will send an alert each time a monitored object changed.
+This involves:
+
+ o Monit started, stopped or reloaded
+ o A file checksum changed
+ o A file size changed
+ o A file content match
+ o A file/directory timestamp changed
+ o A filesystem mount flags changed
+ o A process PID changed
+ o A process PPID changed
+
+You use the alert statement to notify Monit that you want alert
+messages sent to an email address. If you do not specify an alert
+statement, Monit will not send alert messages.
+
+There are two forms of alert statement:
+
+ o Global - common for all services
+ o Local  - per service
+
+In both cases you can use more than one alert statement. In other
+words, you can send many different emails to many different
+addresses.
+
+Recipients in the global and in the local lists are alerted when
+a service failed, recovered or changed. If the same email address
+is in the global and in the local list, Monit will only send one
+alert. Local (per service) defined alert email addresses override
+global addresses in case of a conflict. Finally, you may choose
+to only use a global alert list (recommended), a local per
+service list or both.
+
+It is also possible to disable the global alerts locally for
+particular service(s) and recipients.
+
+=head2 Setting a global alert statement
+
+If a change occurred on a monitored services, Monit will send an
+alert to all recipients in the global list who has registered
+interest for the event type. Here is the syntax for the global
+alert statement:
+
+=over 4
+
+=item SET ALERT mail-address [ [NOT] {events}] [MAIL-FORMAT
+          {mail-format}] [REMINDER number]
+
+=back
+
+Simply using the following in the global section of monitrc:
+
+ set alert address@hidden
+
+will send a default email to the address address@hidden whenever an
+event occurred on any service. Such an event may be that a
+service timed out, a service doesn't exist and so on. If you want
+to send alert messages to more email addresses, add a I<set alert
+'email'> statement for each address.
+
+For explanations of the I<events, MAIL-FORMAT and REMINDER>
+keywords above, please see below.
+
+You can also use the NOT option ahead of the events list which
+will reverse the meaning of the list. That is, only send alerts
+for events I<not> in the list. This can save you some
+configuration bytes if you are interested in most events except a
+few.
+
+
+=head2 Setting a local alert statement
+
+Each service can also have its own recipient list.
+
+=over 4
+
+=item ALERT mail-address [ [NOT] {events}] [MAIL-FORMAT
+           {mail-format}] [REMINDER number]
+
+=back
+
+or
+
+=over 4
+
+=item NOALERT mail-address
+
+=back
+
+If you only want an alert message sent for certain events and for
+certain service(s), for example only for timeout events or only
+if a service died, then postfix the alert-statement with a filter
+block:
+
+ check process myproc with pidfile /var/run/my.pid
+   alert address@hidden only on { timeout, nonexist }
+   ...
+
+(I<only> and I<on> are noise keywords, ignored by Monit. As a
+side note; Noise keywords are used in the control file grammar to
+make an entry resemble English and thus make it easier to read
+(or, so goes the philosophy). The full set of available noise
+keywords are listed below in the Control File section).
+
+You can also setup to send alerts for all events except some by
+putting the word I<not> ahead of the list. For example, if you
+want to receive alerts for all events except Monit instance
+events, you can write (note that the noise words 'but' and 'on'
+are optional):
+
+ check system myserver
+   alert address@hidden but not on { instance }
+   ...
+
+instead of:
+
+   alert address@hidden on { action
+                      checksum
+                      content
+                      data
+                      exec
+                      gid
+                      icmp
+                      invalid
+                      fsflags
+                      nonexist
+                      permission
+                      pid
+                      ppid
+                      size
+                      timeout
+                      timestamp }
+
+This will send alerts for all events to address@hidden, except Monit
+instance events. An instance event BTW, is an event fired
+whenever the Monit program start or stop.
+
+Event filtering can be used to send an email to different email
+addresses depending on the events that occurred. For instance:
+
+ alert address@hidden { nonexist, timeout, resource, icmp, connection }
+ alert address@hidden on { checksum, permission, uid, gid }
+ alert address@hidden
+
+This will send an alert message to address@hidden whenever a nonexist,
+timeout, resource or connection problem occurs and a message to
address@hidden if a checksum, permission, uid or gid problem
+occurs. And finally, a message to address@hidden whenever any error
+event occurs.
+
+Here is the list of events you can use in a mail-filter: I<uid,
+gid, size, nonexist, data, icmp, instance, invalid, exec,
+content, timeout, resource, checksum, fsflags, timestamp,
+connection, permission, pid, ppid, action>
+
+You can also disable the alerts localy using the NOALERT
+statement. This is useful if you have lots of services monitored
+and are using the global alert statement, but don't want to
+receive alerts for some minor subset of services:
+
+ noalert address@hidden
+
+For example, if you stick the noalert statement in a 'check
+system' entry, you won't receive system related alerts (such as
+Monit instance started/stopped/reloaded alert, system overloaded
+alert, etc.) but will receive alerts for all other monitored
+services.
+
+The following example will alert address@hidden on all events on all
+services by default, except the service mybar which will send an
+alert only on timeout. The trick is based on the fact that local
+definition of the same recipient overrides the global setting
+(including registered events and mail format):
+
+ set alert address@hidden
+
+ check process myfoo with pidfile /var/run/myfoo.pid
+   ...
+ check process mybar with pidfile /var/run/mybar.pid
+   alert address@hidden only on { timeout }
+
+=head2 Alert message layout
+
+Monit provides a default mail message layout that is short and to
+the point. Here's an example of a standard alert mail sent by
+monit:
+
+ From: address@hidden
+ Subject: Monit alert -- Does not exist apache
+ To: address@hidden
+ Date: Thu, 04 Sep 2003 02:33:03 +0200
+
+ Does not exist Service apache
+
+        Date:   Thu, 04 Sep 2003 02:33:03 +0200
+        Action: restart
+        Host:   www.tildeslash.com
+
+ Your faithful employee,
+ monit
+
+
+If you want to, you can change the format of this message with
+the optional I<mail-format> statement. The syntax for this
+statement is as follows:
+
+ mail-format {
+      from: address@hidden
+  reply-to: address@hidden
+   subject: $SERVICE $EVENT at $DATE
+   message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.
+            Yours sincerely,
+            monit
+ }
+
+Where the keyword I<from:> is the email address Monit should
+pretend it is sending from. It does not have to be a real mail
+address, but it must be a proper formated mail address, on the
+form: address@hidden The I<reply-to:> keyword can be used to set
+the reply-to mail header. The keyword I<subject:> is for the
+email subject line. The subject must be on only I<one> line. The
+I<message:> keyword denotes the mail body. If used, this keyword
+should always be the last in a mail-format statement. The mail
+body can be as long as you want, but must B<not> contain the '}'
+character.
+
+All of these format keywords are optional, but if used, you must
+provide at least one. Thus if you only want to change the from
+address Monit is using you can do:
+
+ set alert address@hidden with mail-format { from: address@hidden }
+
+From the previous example you will notice that some special $XXX
+variables were used. If used, they will be substituted and
+expanded into the text with these values:
+
+=over 4
+
+=item * I<$EVENT>
+
+ A string describing the event that occurred. The values are
+ fixed and are:
+
+ Event:    | Failure state:           | Success state:
+ -------------------------------------------------------------------
+ ACTION    | "Action done"            | "Action done"
+ CHECKSUM  | "Checksum failed"        | "Checksum succeeded"
+ CONNECTION| "Connection failed"      | "Connection succeeded"
+ CONTENT   | "Content failed",        | "Content succeeded"
+ DATA      | "Data access error"      | "Data access succeeded"
+ EXEC      | "Execution failed"       | "Execution succeeded"
+ FSFLAG    | "Filesystem flags failed"| "Filesystem flags succeeded"
+ GID       | "GID failed"             | "GID succeeded"
+ ICMP      | "ICMP failed"            | "ICMP succeeded"
+ INSTANCE  | "Monit instance changed" | "Monit instance changed not"
+ INVALID   | "Invalid type"           | "Type succeeded"
+ NONEXIST  | "Does not exist"         | "Exists"
+ PERMISSION| "Permission failed"      | "Permission succeeded"
+ PID       | "PID failed"             | "PID succeeded"
+ PPID      | "PPID failed"            | "PPID succeeded"
+ RESOURCE  | "Resource limit matched" | "Resource limit succeeded"
+ SIZE      | "Size failed"            | "Size succeeded"
+ TIMEOUT   | "Timeout"                | "Timeout recovery"
+ TIMESTAMP | "Timestamp failed"       | "Timestamp succeeded"
+ UID       | "UID failed"             | "UID succeeded"
+
+=item * I<$SERVICE>
+
+ The service entry name in monitrc
+
+=item * I<$DATE>
+
+ The current time and date (RFC 822 date style).
+
+=item * I<$HOST>
+
+ The name of the host Monit is running on
+
+=item * I<$ACTION>
+
+ The name of the action which was done. Action names are fixed
+ and are:
+
+ Action:  | Name:
+ --------------------
+ ALERT    | "alert"
+ EXEC     | "exec"
+ RESTART  | "restart"
+ START    | "start"
+ STOP     | "stop"
+ UNMONITOR| "unmonitor"
+
+=item * I<$DESCRIPTION>
+
+ The description of the error condition
+
+=back
+
+
+=head2 Setting a global mail format
+
+It is possible to set a standard mail format with the following
+global set-statement (keywords are in capital):
+
+=over 4
+
+=item SET MAIL-FORMAT {mail-format}
+
+=back
+
+Format set with this statement will apply to every alert
+statement that does I<not> have its own specified mail-format.
+This statement is most useful for setting a default from address
+for messages sent by monit, like so:
+
+ set mail-format { from: address@hidden }
+
+
+=head2 Setting an error reminder
+
+Monit by default sends just one error notification if a service
+failed and another when it recovered. If you want to be notified
+more then once if a service remains in a failed state, you can
+use the reminder option to the alert statement (keywords are in
+capital):
+
+=over 4
+
+=item ALERT ... [WITH] REMINDER [ON] number [CYCLES]
+
+=back
+
+For example if you want to be notified each tenth cycle if a
+service remains in a failed state, you can use:
+
+  alert address@hidden with reminder on 10 cycles
+
+Likewise if you want to be notified on each failed cycle, you can
+use:
+
+  alert address@hidden with reminder on 1 cycle
+
+
+=head2 Setting a mail server for alert messages
+
+The mail server Monit should use to send alert messages is
+defined with a global set statement (keywords are in capital and
+optional statements in [brackets]):
+
+ SET MAILSERVER {hostname|ip-address [PORT port]
+                [USERNAME username] [PASSWORD password]
+                [using SSLV2|SSLV3|TLSV1] [CERTMD5 checksum]}+
+                [with TIMEOUT X SECONDS]
+                [using HOSTNAME hostname]
+
+The port statement allows one to use SMTP servers other then those
+listening on port 25. If omitted, port 25 is used unless ssl or
+tls is used, in which case port 465 is used by default.
+
+Monit support plain smtp authentication - you can set a username
+and a password using the USERNAME and PASSWORD options.
+
+To use secure communication, use the SSLV2, SSLV3 or TLSV1
+options, you can also specify the server certificate checksum
+using CERTMD5 option.
+
+As you can see, it is possible to set several SMTP servers. If
+Monit cannot connect to the first server in the list it will try
+the second server and so on. Monit has a default 5 seconds
+connection timeout and if the SMTP server is slow, Monit could
+timeout when connecting or reading from the server. If this is
+the case, you can use the optional timeout statement to explicit
+set the timeout to a higher value if needed. Here is an example
+for setting several mail servers:
+
+ set mailserver mail.tildeslash.com, mail.foo.bar port 10025
+     username "Rabbi" password "Loewe" using tlsv1, localhost
+     with timeout 15 seconds
+
+Here Monit will first try to connect to the server
+"mail.tildeslash.com", if this server is down Monit will try
+"mail.foo.bar" on port 10025 using the given credentials via tls
+and finally "localhost". We also set an explicit connect and read
+timeout; If Monit cannot connect to the first SMTP server in the
+list within 15 seconds it will try the next server and so on. The
+I<set mailserver ..> statement is optional and if not defined
+Monit will not send email alerts. Not setting a mail server is
+recommended only if alert notification is delegated to M/Monit.
+
+Monit, by default, use the local host name in SMTP HELO/EHLO and
+in the Message-ID header. Some mail servers check this
+information against DNS for spam protection and can reject the
+email if the DNS and the hostname used in the transaction does
+not match. If this is the case, you can override the default
+local host name by using the HOSTNAME option:
+
+ set mailserver mail.tildeslash.com using hostname
+     "myhost.example.org"
+
+
+=head2 Event queue
+
+If the MTA (mail server) for sending alerts is not available,
+Monit I<can> queue events on the local file-system until the MTA
+recover. Monit will then post queued events in order with their
+original timestamp so the events are not lost. This feature is
+most useful if Monit is used together with M/Monit and when event
+history is important.
+
+The event queue is persistent across monit restarts and provided
+that the back-end filesystem is persistent too, across system
+restart as well.
+
+By default, the queue is disabled and if the alert handler fails,
+Monit will simply drop the alert message. To enable the event
+queue, add the following statement to the Monit control file:
+
+ SET EVENTQUEUE BASEDIR <path> [SLOTS <number>]
+
+The <path> is the path to the directory where events will be
+stored. Optionally if you want to limit the queue size, use the
+slots option to only store up to I<number> event messages. If the
+slots option is not used, Monit will store as many events as the
+backend filesystem allows.
+
+Example:
+
+  set eventqueue
+      basedir /var/monit
+      slots 5000
+
+Events are stored in a binary format, with one file per event.
+The file size is ca. 130 bytes or a bit more (depending on the
+message length). The file name is composed of the unix timestamp,
+underscore and the service name, for example:
+
+ /var/monit/1131269471_apache
+
+If you are running more then one Monit instance on the same
+machine, you B<must> use separated event queue directories to
+avoid sending wrong alerts to the wrong addresses.
+
+If you want to purge the queue by hand, that is, remove queued
+event-files, Monit should be stopped before the removal.
+
+
+=head1 SERVICE TIMEOUT
+
+B<monit> provides a service timeout mechanism for situations
+where a service simply refuses to start or respond over a longer
+period.
+
+The timeout mechanism is based on number if service restarts and
+number of poll-cycles. For example, if a service had I<x>
+restarts within I<y> poll-cycles (where I<x> <= I<y>) then Monit
+will perform an action (for example unmonitor the service). If a
+timeout occurs Monit will send an alert message if you have
+register interest for this event.
+
+The syntax for the timeout statement is as follows (keywords are
+in capital):
+
+=over 4
+
+=item IF <number> RESTART <number> CYCLE(S) THEN <action>
+
+=back
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/libmonit/COPYING     Sat Jun 11 17:19:40 2011
@@ -0,0 +1,673 @@
+                    GNU AFFERO GENERAL PUBLIC LICENSE
+                       Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+  A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate.  Many developers of free software are heartened and
+encouraged by the resulting cooperation.  However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+  The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community.  It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server.  Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+  An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals.  This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Remote Network Interaction; Use with the GNU General Public License.
+
+  Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software.  This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source.  For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code.  There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
+
+
+                        License Exception
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL.
=======================================
--- /dev/null
+++ /trunk/libmonit/Makefile.am Sat Jun 11 17:19:40 2011
@@ -0,0 +1,45 @@
+AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
+ACLOCAL_AMFLAGS  = -I m4
+
+EXTRA_DIST      = README COPYING bootstrap test src config
+
+AM_CPPFLAGS     = $(CPPFLAGS) $(DBCPPFLAGS)
+
+INCLUDES = -I./src -I./src/exceptions -I./src/io -I./src/net -I./src/util -I./src/thread
+
+# libmonit is built static
+noinst_LTLIBRARIES = libmonit.la
+
+libmonit_la_SOURCES = \
+                 src/Bootstrap.c \
+                  src/exceptions/assert.c \
+                  src/exceptions/Exception.c \
+                  src/io/Dir.c \
+                  src/io/File.c \
+                  src/io/InputStream.c \
+                  src/io/OutputStream.c \
+                  src/system/Mem.c \
+                  src/system/Net.c \
+                  src/system/Command.c \
+                  src/system/System.c \
+                  src/util/List.c \
+                  src/util/Str.c \
+                  src/util/StringBuffer.c \
+                  src/thread/Thread.c
+
+dist-hook::
+       -rm -rf `find $(distdir) -name "._*"`
+       -rm -rf `find $(distdir) -name ".DS_Store"`
+       -rm -rf `find $(distdir) -name ".libs"`
+       -rm -rf `find $(distdir) -name ".svn"`
+       -rm -f $(distdir)/src/xconfig.h $(distdir)/src/stamp-*
+
+clean-local:
+       -rm -f `find . -name "*.o" -o -name "*.lo" -o -name "*.loT" -o -name 
"*~"`
+
+distclean-local:
+       -rm -rf autom4te.cache/
+
+cleanall: clean distclean
+ -rm -f Makefile.in test/Makefile.in src/Makefile.in configure aclocal.m4 src/xconfig.h.in config/config.*
+       -rm -rf m4
=======================================
--- /dev/null
+++ /trunk/libmonit/README      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,15 @@
+libmonit
+
+
+This library synthesis modules used by Monit into a static library. This
+factoring of functionality into a separate library represent the first step in
+our process of refactoring and improving Monit.
+
+What you see here now is only a small subset of the actual library and just the
+bare minimum for what is necessary to implement 'check program'.
+
+The long-term goal is to reduce the source code of Monit to basically a
+parser for the configuration language and a validator which will run the
+different checks. The rest of the code will be moved into libmonit.
+
+
=======================================
--- /dev/null
+++ /trunk/libmonit/bootstrap   Sat Jun 11 17:19:40 2011
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Use this script to re-create configure. Requires the following auto-tools,
+# autoconf        >= 2.59
+# automake        >= 1.9
+# libtool         >= 1.4
+#!/bin/bash
+libtoolize -f 2>/dev/null || glibtoolize -f
+if aclocal -I config && autoheader && automake --foreign --add-missing --copy && autoconf
+then
+        echo "Success bootstrapping libmonit"
+else
+        echo "Failed bootstrapping libmonit"
+        exit 1;
+fi
+exit 0;
=======================================
--- /dev/null
+++ /trunk/libmonit/config/depcomp      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <address@hidden>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <address@hidden>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/'
"$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile"
"$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile"
"$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/'
"$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/'
"$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u
"$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p'
"$depfile"
+  echo "  " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p'
"$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /trunk/libmonit/config/install-sh   Sat Jun 11 17:19:40 2011
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""        $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+ -C install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from 
address@hidden
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"  2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"       2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /trunk/libmonit/config/ltmain.sh    Sat Jun 11 17:19:40 2011
@@ -0,0 +1,1 @@
+link /opt/local/share/libtool/config/ltmain.sh
=======================================
--- /dev/null
+++ /trunk/libmonit/config/missing      Sat Jun 11 17:19:40 2011
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <address@hidden>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <address@hidden>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /address@hidden/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /trunk/libmonit/configure.ac        Sat Jun 11 17:19:40 2011
@@ -0,0 +1,258 @@
+# Copyright (C) 2000-2011 Tildeslash Ltd. All rights reserved.
+
+AC_PREREQ([2.53])
+
+AC_INIT([monit], [1.0], address@hidden)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src])
+
+# ---------------------------------------------------------------------------
+# Programs
+# ---------------------------------------------------------------------------
+
+AC_PROG_CC
+
+# ---------------------------------------------------------------------------
+# Libtool
+# ---------------------------------------------------------------------------
+
+AC_PROG_LIBTOOL
+
+# ---------------------------------------------------------------------------
+# Build options
+# ---------------------------------------------------------------------------
+
+AC_ARG_ENABLE(optimized,
+       AS_HELP_STRING([--enable-optimized],
+               [Build software optimized]),
+    [
+        CFLAGS=`echo $CFLAGS|sed 's/-O.//'`
+        if test "x$enableval" = "xyes" ; then
+               CFLAGS=`echo $CFLAGS|sed 's/-g//'`
+               CFLAGS="$CFLAGS -O3"
+               OPTIMIZED=1
+       else
+               OPTIMIZED=0
+        fi
+    ],
+    [
+       OPTIMIZED=0
+    ]
+)
+
+AC_ARG_ENABLE(profiling,
+        AS_HELP_STRING([--enable-profiling],
+                [Build with debug and profiling options]),
+    [
+        if test "x$enableval" = "xyes" ; then
+                CFLAGS="$CFLAGS -g -pg"
+                profile="true"
+        fi
+    ],
+    [
+        profile="false"
+    ]
+)
+
+AC_ARG_ENABLE([openssl],
+        AS_HELP_STRING([--enable-openssl(=<path>)],
+                [Link Monit with openssl. An optional path argument may
+                be given to specify the top-level directory to search for
+                openssl to link with]),
+     [
+        openssl="true"
+        if test "x$enableval" = "xyes"; then
+ AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([libssl not found])]) + AC_CHECK_LIB([crypto], [SHA1_Init], [], [AC_MSG_ERROR([libcrypto not found])])
+       else
+                AC_MSG_CHECKING([for openssl in $enableval])
+                LDFLAGS="-L$enableval/lib -lssl -lcrypto $LDFLAGS "
+                CPPFLAGS="-I$enableval/include $CPPFLAGS"
+ if test -r "$enableval/lib/libssl.a" -a -r "$enableval/lib/libcrypto.a"; then
+                        AC_MSG_RESULT([ok])
+                else
+                       AC_MSG_ERROR([openssl not found in $enableval])
+                fi
+        fi
+     ],[openssl="false"])
+
+# ---------------------------------------------------------------------------
+# Libraries
+# ---------------------------------------------------------------------------
+
+AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([POSIX thread library is required])])
+
+# ---------------------------------------------------------------------------
+# Header files
+# ---------------------------------------------------------------------------
+
+AC_HEADER_STDC
+
+# ------------------------------------------------------------------------
+# Functions
+# ------------------------------------------------------------------------
+
+# Require a working setjmp
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]],
+        [[jmp_buf env; setjmp(env);]])],
+        [], [AC_MSG_FAILURE([setjmp is required])])
+
+
+# ------------------------------------------------------------------------
+# Architecture/OS
+# ------------------------------------------------------------------------
+
+if test `uname` = "Linux"
+then
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   AC_DEFINE([LINUX], 1, [Define to 1 if the system is Linux])
+elif test `uname` = "FreeBSD"
+then
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   AC_DEFINE([FREEBSD], 1, [Define to 1 if the system is FreeBSD])
+elif test `uname` = "OpenBSD"
+then
+   CFLAGS="$CFLAGS -D _REENTRANT"
+   AC_DEFINE([OPENBSD], 1, [Define to 1 if the system is OpenBSD])
+elif test `uname` = "Darwin"
+then
+   CFLAGS="$CFLAGS -DREENTRANT"
+   AC_DEFINE([DARWIN], 1, [Define to 1 if the system is OSX])
+elif test `uname` = "SunOS"
+then
+   LIBS="$(DEPS_LIBS) -lsocket -lnsl"
+   CFLAGS="$CFLAGS -D _REENTRANT -D_POSIX_PTHREAD_SEMANTICS -m64"
+   LDFLAGS="$LDFLAGS -m64"
+   if test `uname -m` != "i86pc"
+   then
+       CFLAGS="$CFLAGS -mtune=v9"
+       LDFLAGS="$LDFLAGS -mtune=v9"
+   fi
+   AC_DEFINE([SOLARIS], 1, [Define to 1 if the system is SOLARIS])
+else
+   AC_MSG_ERROR([Architecture not supported: `uname`.])
+fi
+
+# ---------------------------------------------------------------------------
+# Compiler
+# ---------------------------------------------------------------------------
+
+# Compiler characteristics
+AC_C_CONST
+AC_C_BIGENDIAN
+
+# If the compiler is gcc, tune warnings and make the char type unsigned
+# and enable C99 support
+if test "x$GCC" = "xyes"; then
+       CFLAGS="$CFLAGS -Wall -Wunused -Wno-unused-label -funsigned-char";
+        # Add C99 support
+        CFLAGS="$CFLAGS -D_GNU_SOURCE -std=c99"
+        # does this compiler support -Wno-pointer-sign ?
+        svd_CFLAGS="$CFLAGS"
+        CFLAGS="-Wno-pointer-sign $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])], [], [CFLAGS="$svd_CFLAGS"])
+        # does this compiler support -Wno-address ?
+        svd_CFLAGS="$CFLAGS"
+        CFLAGS="-Wno-address $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])], [], [CFLAGS="$svd_CFLAGS"])
+fi
+
+
+# ------------------------------------------------------------------------
+# Atomic support
+# ------------------------------------------------------------------------
+AC_MSG_CHECKING(for Atomic support)
+if test `uname` = "Darwin" -o `uname` = "FreeBSD"
+then
+        AC_MSG_RESULT(yes)
+elif test `uname` = "SunOS"
+then
+        AC_CHECK_HEADER([atomic.h],
+        [AC_MSG_RESULT(yes)],
+        [AC_MSG_ERROR([atomic.h is required for atomic support])])
+else
+        AC_RUN_IFELSE([AC_LANG_PROGRAM([],[
+ #if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)))
+             return 0;
+             #else
+             return 1;
+             #endif
+       ])],
+       [AC_MSG_RESULT(yes)],
+       [AC_MSG_FAILURE([GCC version > 4.1 is required for atomic support])])
+fi
+
+
+# ------------------------------------------------------------------------
+# IPv6 Support
+# ------------------------------------------------------------------------
+
+AC_MSG_CHECKING(for IPv6 support)
+AC_CACHE_VAL(ac_cv_ipv6,
+       AC_TRY_RUN([
+       #include <sys/types.h>
+       #include <sys/socket.h>
+       #include <netinet/in.h>
+       /* Make sure the definitions for AF_INET6 and struct sockaddr_in6
+        * are defined, and that we can actually create an IPv6 TCP socket.*/
+       main()
+       {
+               int fd;
+               struct sockaddr_in6 foo;
+               fd = socket(AF_INET6, SOCK_STREAM, 0);
+               exit(fd >= 0 ? 0 : 1);
+       }],
+       ac_cv_ipv6=yes,
+       ac_cv_ipv6=no,
+       ac_cv_ipv6=no))
+AC_MSG_RESULT($ac_cv_ipv6)
+if test $ac_cv_ipv6 = yes ; then
+       AC_DEFINE([IPV6], 1, [Define to 1 if the system supports IPv6])
+fi
+
+# ---------------------------------------------------------------------------
+# Functions
+# ---------------------------------------------------------------------------
+
+
+# ---------------------------------------------------------------------------
+# Outputs
+# ---------------------------------------------------------------------------
+
+AM_CONFIG_HEADER(src/xconfig.h)
+AC_OUTPUT(Makefile)
+
+cat <<EOT
++------------------------------------------------------------+
+| License:                                                   |
+| This is Open Source Software and use is subject to the GNU |
+| AFFERO GENERAL PUBLIC LICENSE version 3, available in this |
+| distribution in the file COPYING.                          |
+|                                                            |
+| By continuing this installation process, you are bound by  |
+| the terms of this license agreement. If you do not agree   |
+| with the terms of this license, you must abort the         |
+| installation process at this point.                        |
++------------------------------------------------------------+
+| Libmonit is configured as follows:                         |
+|                                                            |
+EOT
+
+if test "x1" = "x$OPTIMIZED"; then
+echo "|   Optimized:                                    ENABLED    |"
+else
+echo "|   Optimized:                                    DISABLED   |"
+fi
+if test "xfalse" = "x$profile"; then
+echo "|   Profiling:                                    DISABLED   |"
+else
+echo "|   Profiling:                                    ENABLED    |"
+fi
+if test "xtrue" = "x$openssl"; then
+echo "|   Openssl:                                      ENABLED    |"
+fi
+echo "+------------------------------------------------------------+"
+
+
=======================================
--- /dev/null
+++ /trunk/libmonit/libmonit.xcodeproj/project.pbxproj Sat Jun 11 17:19:40 2011
@@ -0,0 +1,420 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 46;
+       objects = {
+
+/* Begin PBXBuildFile section */
+ 5274583B13A1009C00C422FE /* Bootstrap.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274581013A1009C00C422FE /* Bootstrap.c */; }; + 5274583C13A1009C00C422FE /* Bootstrap.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581113A1009C00C422FE /* Bootstrap.h */; }; + 5274583D13A1009C00C422FE /* Config.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581213A1009C00C422FE /* Config.h */; }; + 5274583E13A1009C00C422FE /* assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274581413A1009C00C422FE /* assert.c */; }; + 5274583F13A1009C00C422FE /* assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581513A1009C00C422FE /* assert.h */; }; + 5274584013A1009C00C422FE /* AssertException.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581613A1009C00C422FE /* AssertException.h */; }; + 5274584113A1009C00C422FE /* Exception.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274581713A1009C00C422FE /* Exception.c */; }; + 5274584213A1009C00C422FE /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581813A1009C00C422FE /* Exception.h */; }; + 5274584313A1009C00C422FE /* IOException.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581913A1009C00C422FE /* IOException.h */; }; + 5274584413A1009C00C422FE /* MemoryException.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581A13A1009C00C422FE /* MemoryException.h */; }; + 5274584513A1009C00C422FE /* NumberFormatException.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581B13A1009C00C422FE /* NumberFormatException.h */; }; + 5274584613A1009C00C422FE /* Dir.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274581D13A1009C00C422FE /* Dir.c */; }; + 5274584713A1009C00C422FE /* Dir.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274581E13A1009C00C422FE /* Dir.h */; }; + 5274584813A1009C00C422FE /* File.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274581F13A1009C00C422FE /* File.c */; }; + 5274584913A1009C00C422FE /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582013A1009C00C422FE /* File.h */; }; + 5274584A13A1009C00C422FE /* InputStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582113A1009C00C422FE /* InputStream.c */; }; + 5274584B13A1009C00C422FE /* InputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582213A1009C00C422FE /* InputStream.h */; }; + 5274584C13A1009C00C422FE /* OutputStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582313A1009C00C422FE /* OutputStream.c */; }; + 5274584D13A1009C00C422FE /* OutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582413A1009C00C422FE /* OutputStream.h */; }; + 5274584E13A1009C00C422FE /* Command.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582613A1009C00C422FE /* Command.c */; }; + 5274584F13A1009C00C422FE /* Command.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582713A1009C00C422FE /* Command.h */; }; + 5274585013A1009C00C422FE /* Mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582813A1009C00C422FE /* Mem.c */; }; + 5274585113A1009C00C422FE /* Mem.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582913A1009C00C422FE /* Mem.h */; }; + 5274585213A1009C00C422FE /* Net.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582A13A1009C00C422FE /* Net.c */; }; + 5274585313A1009C00C422FE /* Net.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582B13A1009C00C422FE /* Net.h */; }; + 5274585413A1009C00C422FE /* Process.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582C13A1009C00C422FE /* Process.h */; }; + 5274585513A1009C00C422FE /* System.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274582D13A1009C00C422FE /* System.c */; }; + 5274585613A1009C00C422FE /* System.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274582E13A1009C00C422FE /* System.h */; }; + 5274585713A1009C00C422FE /* Atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274583013A1009C00C422FE /* Atomic.h */; }; + 5274585813A1009C00C422FE /* Thread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274583113A1009C00C422FE /* Thread.c */; }; + 5274585913A1009C00C422FE /* Thread.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274583213A1009C00C422FE /* Thread.h */; }; + 5274585A13A1009C00C422FE /* List.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274583413A1009C00C422FE /* List.c */; }; + 5274585B13A1009C00C422FE /* List.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274583513A1009C00C422FE /* List.h */; }; + 5274585C13A1009C00C422FE /* Str.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274583613A1009C00C422FE /* Str.c */; }; + 5274585D13A1009C00C422FE /* Str.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274583713A1009C00C422FE /* Str.h */; }; + 5274585E13A1009C00C422FE /* StringBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 5274583813A1009C00C422FE /* StringBuffer.c */; }; + 5274585F13A1009C00C422FE /* StringBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5274583913A1009C00C422FE /* StringBuffer.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 523F408213A40FD2008EE7B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; }; + 5274580B13A1009C00C422FE /* bootstrap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = bootstrap; sourceTree = "<group>"; }; + 5274580C13A1009C00C422FE /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = configure.ac; sourceTree = "<group>"; }; + 5274580D13A1009C00C422FE /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; }; + 5274580E13A1009C00C422FE /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; + 5274581013A1009C00C422FE /* Bootstrap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Bootstrap.c; sourceTree = "<group>"; }; + 5274581113A1009C00C422FE /* Bootstrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bootstrap.h; sourceTree = "<group>"; }; + 5274581213A1009C00C422FE /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = "<group>"; }; + 5274581413A1009C00C422FE /* assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = assert.c; sourceTree = "<group>"; }; + 5274581513A1009C00C422FE /* assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = assert.h; sourceTree = "<group>"; }; + 5274581613A1009C00C422FE /* AssertException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssertException.h; sourceTree = "<group>"; }; + 5274581713A1009C00C422FE /* Exception.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Exception.c; sourceTree = "<group>"; }; + 5274581813A1009C00C422FE /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = "<group>"; }; + 5274581913A1009C00C422FE /* IOException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOException.h; sourceTree = "<group>"; }; + 5274581A13A1009C00C422FE /* MemoryException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryException.h; sourceTree = "<group>"; }; + 5274581B13A1009C00C422FE /* NumberFormatException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NumberFormatException.h; sourceTree = "<group>"; }; + 5274581D13A1009C00C422FE /* Dir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Dir.c; sourceTree = "<group>"; }; + 5274581E13A1009C00C422FE /* Dir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dir.h; sourceTree = "<group>"; }; + 5274581F13A1009C00C422FE /* File.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = File.c; sourceTree = "<group>"; }; + 5274582013A1009C00C422FE /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = "<group>"; }; + 5274582113A1009C00C422FE /* InputStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = InputStream.c; sourceTree = "<group>"; }; + 5274582213A1009C00C422FE /* InputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputStream.h; sourceTree = "<group>"; }; + 5274582313A1009C00C422FE /* OutputStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = OutputStream.c; sourceTree = "<group>"; }; + 5274582413A1009C00C422FE /* OutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputStream.h; sourceTree = "<group>"; }; + 5274582613A1009C00C422FE /* Command.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Command.c; sourceTree = "<group>"; }; + 5274582713A1009C00C422FE /* Command.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Command.h; sourceTree = "<group>"; }; + 5274582813A1009C00C422FE /* Mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Mem.c; sourceTree = "<group>"; }; + 5274582913A1009C00C422FE /* Mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mem.h; sourceTree = "<group>"; }; + 5274582A13A1009C00C422FE /* Net.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Net.c; sourceTree = "<group>"; }; + 5274582B13A1009C00C422FE /* Net.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Net.h; sourceTree = "<group>"; }; + 5274582C13A1009C00C422FE /* Process.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Process.h; sourceTree = "<group>"; }; + 5274582D13A1009C00C422FE /* System.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = System.c; sourceTree = "<group>"; }; + 5274582E13A1009C00C422FE /* System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = System.h; sourceTree = "<group>"; }; + 5274583013A1009C00C422FE /* Atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomic.h; sourceTree = "<group>"; }; + 5274583113A1009C00C422FE /* Thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Thread.c; sourceTree = "<group>"; }; + 5274583213A1009C00C422FE /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = "<group>"; }; + 5274583413A1009C00C422FE /* List.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = List.c; sourceTree = "<group>"; }; + 5274583513A1009C00C422FE /* List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = List.h; sourceTree = "<group>"; }; + 5274583613A1009C00C422FE /* Str.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Str.c; sourceTree = "<group>"; }; + 5274583713A1009C00C422FE /* Str.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Str.h; sourceTree = "<group>"; }; + 5274583813A1009C00C422FE /* StringBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = StringBuffer.c; sourceTree = "<group>"; }; + 5274583913A1009C00C422FE /* StringBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuffer.h; sourceTree = "<group>"; }; + 52A12C2B13A0FFAB00C6CEB7 /* libmonit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmonit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               52A12C2813A0FFAB00C6CEB7 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               5274580F13A1009C00C422FE /* src */ = {
+                       isa = PBXGroup;
+                       children = (
+                               523F408213A40FD2008EE7B3 /* Makefile.am */,
+                               5274581013A1009C00C422FE /* Bootstrap.c */,
+                               5274581113A1009C00C422FE /* Bootstrap.h */,
+                               5274581213A1009C00C422FE /* Config.h */,
+                               5274581313A1009C00C422FE /* exceptions */,
+                               5274581C13A1009C00C422FE /* io */,
+                               5274582513A1009C00C422FE /* system */,
+                               5274582F13A1009C00C422FE /* thread */,
+                               5274583313A1009C00C422FE /* util */,
+                       );
+                       path = src;
+                       sourceTree = "<group>";
+               };
+               5274581313A1009C00C422FE /* exceptions */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5274581413A1009C00C422FE /* assert.c */,
+                               5274581513A1009C00C422FE /* assert.h */,
+                               5274581613A1009C00C422FE /* AssertException.h 
*/,
+                               5274581713A1009C00C422FE /* Exception.c */,
+                               5274581813A1009C00C422FE /* Exception.h */,
+                               5274581913A1009C00C422FE /* IOException.h */,
+                               5274581A13A1009C00C422FE /* MemoryException.h 
*/,
+                               5274581B13A1009C00C422FE /* 
NumberFormatException.h */,
+                       );
+                       path = exceptions;
+                       sourceTree = "<group>";
+               };
+               5274581C13A1009C00C422FE /* io */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5274581D13A1009C00C422FE /* Dir.c */,
+                               5274581E13A1009C00C422FE /* Dir.h */,
+                               5274581F13A1009C00C422FE /* File.c */,
+                               5274582013A1009C00C422FE /* File.h */,
+                               5274582113A1009C00C422FE /* InputStream.c */,
+                               5274582213A1009C00C422FE /* InputStream.h */,
+                               5274582313A1009C00C422FE /* OutputStream.c */,
+                               5274582413A1009C00C422FE /* OutputStream.h */,
+                       );
+                       path = io;
+                       sourceTree = "<group>";
+               };
+               5274582513A1009C00C422FE /* system */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5274582613A1009C00C422FE /* Command.c */,
+                               5274582713A1009C00C422FE /* Command.h */,
+                               5274582813A1009C00C422FE /* Mem.c */,
+                               5274582913A1009C00C422FE /* Mem.h */,
+                               5274582A13A1009C00C422FE /* Net.c */,
+                               5274582B13A1009C00C422FE /* Net.h */,
+                               5274582C13A1009C00C422FE /* Process.h */,
+                               5274582D13A1009C00C422FE /* System.c */,
+                               5274582E13A1009C00C422FE /* System.h */,
+                       );
+                       path = system;
+                       sourceTree = "<group>";
+               };
+               5274582F13A1009C00C422FE /* thread */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5274583013A1009C00C422FE /* Atomic.h */,
+                               5274583113A1009C00C422FE /* Thread.c */,
+                               5274583213A1009C00C422FE /* Thread.h */,
+                       );
+                       path = thread;
+                       sourceTree = "<group>";
+               };
+               5274583313A1009C00C422FE /* util */ = {
+                       isa = PBXGroup;
+                       children = (
+                               5274583413A1009C00C422FE /* List.c */,
+                               5274583513A1009C00C422FE /* List.h */,
+                               5274583613A1009C00C422FE /* Str.c */,
+                               5274583713A1009C00C422FE /* Str.h */,
+                               5274583813A1009C00C422FE /* StringBuffer.c */,
+                               5274583913A1009C00C422FE /* StringBuffer.h */,
+                       );
+                       path = util;
+                       sourceTree = "<group>";
+               };
+               5274583A13A1009C00C422FE /* test */ = {
+                       isa = PBXGroup;
+                       children = (
+                       );
+                       path = test;
+                       sourceTree = "<group>";
+               };
+               52A12C2013A0FFAB00C6CEB7 = {
+                       isa = PBXGroup;
+                       children = (
+                               5274580B13A1009C00C422FE /* bootstrap */,
+                               5274580C13A1009C00C422FE /* configure.ac */,
+                               5274580D13A1009C00C422FE /* Makefile.am */,
+                               5274580E13A1009C00C422FE /* README */,
+                               5274580F13A1009C00C422FE /* src */,
+                               5274583A13A1009C00C422FE /* test */,
+                               52A12C2C13A0FFAB00C6CEB7 /* Products */,
+                       );
+                       sourceTree = "<group>";
+               };
+               52A12C2C13A0FFAB00C6CEB7 /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               52A12C2B13A0FFAB00C6CEB7 /* libmonit.a */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+               52A12C2913A0FFAB00C6CEB7 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               5274583C13A1009C00C422FE /* Bootstrap.h in 
Headers */,
+                               5274583D13A1009C00C422FE /* Config.h in Headers 
*/,
+                               5274583F13A1009C00C422FE /* assert.h in Headers 
*/,
+                               5274584013A1009C00C422FE /* AssertException.h 
in Headers */,
+                               5274584213A1009C00C422FE /* Exception.h in 
Headers */,
+                               5274584313A1009C00C422FE /* IOException.h in 
Headers */,
+                               5274584413A1009C00C422FE /* MemoryException.h 
in Headers */,
+                               5274584513A1009C00C422FE /* 
NumberFormatException.h in Headers */,
+                               5274584713A1009C00C422FE /* Dir.h in Headers */,
+                               5274584913A1009C00C422FE /* File.h in Headers 
*/,
+                               5274584B13A1009C00C422FE /* InputStream.h in 
Headers */,
+                               5274584D13A1009C00C422FE /* OutputStream.h in 
Headers */,
+                               5274584F13A1009C00C422FE /* Command.h in 
Headers */,
+                               5274585113A1009C00C422FE /* Mem.h in Headers */,
+                               5274585313A1009C00C422FE /* Net.h in Headers */,
+                               5274585413A1009C00C422FE /* Process.h in 
Headers */,
+                               5274585613A1009C00C422FE /* System.h in Headers 
*/,
+                               5274585713A1009C00C422FE /* Atomic.h in Headers 
*/,
+                               5274585913A1009C00C422FE /* Thread.h in Headers 
*/,
+                               5274585B13A1009C00C422FE /* List.h in Headers 
*/,
+                               5274585D13A1009C00C422FE /* Str.h in Headers */,
+                               5274585F13A1009C00C422FE /* StringBuffer.h in 
Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+               52A12C2A13A0FFAB00C6CEB7 /* libmonit */ = {
+                       isa = PBXNativeTarget;
+ buildConfigurationList = 52A12C2F13A0FFAB00C6CEB7 /* Build configuration list for PBXNativeTarget "libmonit" */;
+                       buildPhases = (
+                               52A12C2713A0FFAB00C6CEB7 /* Sources */,
+                               52A12C2813A0FFAB00C6CEB7 /* Frameworks */,
+                               52A12C2913A0FFAB00C6CEB7 /* Headers */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = libmonit;
+                       productName = monit;
+                       productReference = 52A12C2B13A0FFAB00C6CEB7 /* 
libmonit.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               52A12C2213A0FFAB00C6CEB7 /* Project object */ = {
+                       isa = PBXProject;
+                       attributes = {
+                               ORGANIZATIONNAME = "Tildeslash Ltd.";
+                       };
+ buildConfigurationList = 52A12C2513A0FFAB00C6CEB7 /* Build configuration list for PBXProject "libmonit" */;
+                       compatibilityVersion = "Xcode 3.2";
+                       developmentRegion = English;
+                       hasScannedForEncodings = 0;
+                       knownRegions = (
+                               en,
+                       );
+                       mainGroup = 52A12C2013A0FFAB00C6CEB7;
+                       productRefGroup = 52A12C2C13A0FFAB00C6CEB7 /* Products 
*/;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               52A12C2A13A0FFAB00C6CEB7 /* libmonit */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+               52A12C2713A0FFAB00C6CEB7 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               5274583B13A1009C00C422FE /* Bootstrap.c in 
Sources */,
+                               5274583E13A1009C00C422FE /* assert.c in Sources 
*/,
+                               5274584113A1009C00C422FE /* Exception.c in 
Sources */,
+                               5274584613A1009C00C422FE /* Dir.c in Sources */,
+                               5274584813A1009C00C422FE /* File.c in Sources 
*/,
+                               5274584A13A1009C00C422FE /* InputStream.c in 
Sources */,
+                               5274584C13A1009C00C422FE /* OutputStream.c in 
Sources */,
+                               5274584E13A1009C00C422FE /* Command.c in 
Sources */,
+                               5274585013A1009C00C422FE /* Mem.c in Sources */,
+                               5274585213A1009C00C422FE /* Net.c in Sources */,
+                               5274585513A1009C00C422FE /* System.c in Sources 
*/,
+                               5274585813A1009C00C422FE /* Thread.c in Sources 
*/,
+                               5274585A13A1009C00C422FE /* List.c in Sources 
*/,
+                               5274585C13A1009C00C422FE /* Str.c in Sources */,
+                               5274585E13A1009C00C422FE /* StringBuffer.c in 
Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+               52A12C2D13A0FFAB00C6CEB7 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               GCC_C_LANGUAGE_STANDARD = gnu99;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+                               GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+                               GCC_VERSION = 
com.apple.compilers.llvm.clang.1_0;
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.6;
+                               ONLY_ACTIVE_ARCH = YES;
+                               SDKROOT = macosx;
+                       };
+                       name = Debug;
+               };
+               52A12C2E13A0FFAB00C6CEB7 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               GCC_C_LANGUAGE_STANDARD = gnu99;
+                               GCC_VERSION = 
com.apple.compilers.llvm.clang.1_0;
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.6;
+                               SDKROOT = macosx;
+                       };
+                       name = Release;
+               };
+               52A12C3013A0FFAB00C6CEB7 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = NO;
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               HEADER_SEARCH_PATHS = (
+                                       $SRCROOT/src/,
+                                       $SRCROOT/src/exceptions,
+                                       $SRCROOT/src/thread,
+                                       $SRCROOT/src/io,
+                                       $SRCROOT/src/net,
+                                       $SRCROOT/src/util,
+                               );
+                               PRODUCT_NAME = monit;
+                       };
+                       name = Debug;
+               };
+               52A12C3113A0FFAB00C6CEB7 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               EXECUTABLE_PREFIX = lib;
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               HEADER_SEARCH_PATHS = (
+                                       $SRCROOT/src/,
+                                       $SRCROOT/src/exceptions,
+                                       $SRCROOT/src/thread,
+                                       $SRCROOT/src/io,
+                                       $SRCROOT/src/net,
+                                       $SRCROOT/src/util,
+                               );
+                               PRODUCT_NAME = monit;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 52A12C2513A0FFAB00C6CEB7 /* Build configuration list for PBXProject "libmonit" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               52A12C2D13A0FFAB00C6CEB7 /* Debug */,
+                               52A12C2E13A0FFAB00C6CEB7 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+ 52A12C2F13A0FFAB00C6CEB7 /* Build configuration list for PBXNativeTarget "libmonit" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               52A12C3013A0FFAB00C6CEB7 /* Debug */,
+                               52A12C3113A0FFAB00C6CEB7 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 52A12C2213A0FFAB00C6CEB7 /* Project object */;
+}
=======================================
--- /dev/null
+++ /trunk/libmonit/libmonit.xcodeproj/project.xcworkspace/contents.xcworkspacedata Sat Jun 11 17:19:40 2011
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:libmonit.xcodeproj">
+   </FileRef>
+</Workspace>
=======================================
***Additional files exist in this changeset.***

reply via email to

[Prev in Thread] Current Thread [Next in Thread]