Browse Source

Import upstream version 15

Alexander Barton 12 years ago
parent
commit
b9db8b1777
100 changed files with 10359 additions and 5566 deletions
  1. BIN
      ._INSTALL
  2. BIN
      ._README
  3. 13 7
      AUTHORS
  4. 107 12
      ChangeLog
  5. 36 3
      Makefile.am
  6. 107 54
      Makefile.in
  7. 55 4
      NEWS
  8. 99 86
      aclocal.m4
  9. 23 13
      config.guess
  10. 44 8
      config.sub
  11. 5057 4054
      configure
  12. 66 8
      configure.in
  13. BIN
      contrib/._ngindent
  14. BIN
      contrib/._ngircd-bsd.sh
  15. BIN
      contrib/._ngircd-redhat.init
  16. 6 5
      contrib/Debian/Makefile.am
  17. 55 36
      contrib/Debian/Makefile.in
  18. 64 0
      contrib/Debian/changelog
  19. 35 6
      contrib/Debian/control
  20. 12 0
      contrib/Debian/ngircd.default
  21. 127 38
      contrib/Debian/ngircd.init
  22. 71 18
      contrib/Debian/rules
  23. BIN
      contrib/MacOSX/._Makefile.am
  24. 6 5
      contrib/MacOSX/Makefile.am
  25. 74 53
      contrib/MacOSX/Makefile.in
  26. 18 4
      contrib/MacOSX/config.h
  27. 0 0
      contrib/MacOSX/cvs-version.h
  28. 4 0
      contrib/MacOSX/de.barton.ngircd.plist.tmpl
  29. 1 0
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd-contents.xml
  30. 1 0
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd.xml
  31. 1 0
      contrib/MacOSX/ngIRCd.pmdoc/02de-contents.xml
  32. 1 0
      contrib/MacOSX/ngIRCd.pmdoc/02de.xml
  33. 18 0
      contrib/MacOSX/ngIRCd.pmdoc/Makefile.am
  34. 328 0
      contrib/MacOSX/ngIRCd.pmdoc/Makefile.in
  35. 190 0
      contrib/MacOSX/ngIRCd.pmdoc/index.xml
  36. 49 31
      contrib/MacOSX/ngIRCd.xcodeproj/Makefile.in
  37. 109 9
      contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
  38. 42 0
      contrib/MacOSX/postinstall.sh
  39. 25 0
      contrib/MacOSX/preinstall.sh
  40. 8 10
      contrib/Makefile.am
  41. 73 54
      contrib/Makefile.in
  42. 8 6
      contrib/README
  43. 16 0
      contrib/ngindent
  44. 51 0
      contrib/ngircd-bsd.sh
  45. 119 0
      contrib/ngircd-redhat.init
  46. 16 11
      contrib/ngircd.spec
  47. 143 0
      contrib/platformtest.sh
  48. 63 8
      depcomp
  49. 12 1
      doc/FAQ.txt
  50. 3 2
      doc/Makefile.am
  51. 68 48
      doc/Makefile.in
  52. 22 9
      doc/Platforms.txt
  53. 3 3
      doc/Protocol.txt
  54. 2 2
      doc/README-AUX.txt
  55. 1 1
      doc/README-BeOS.txt
  56. 65 12
      doc/SSL.txt
  57. 70 0
      doc/Services.txt
  58. 1 1
      doc/Zeroconf.txt
  59. 55 14
      doc/sample-ngircd.conf
  60. 153 0
      doc/src/Doxyfile
  61. 3 3
      doc/src/Makefile.am
  62. 51 35
      doc/src/Makefile.in
  63. 11 0
      doc/src/footer.inc.html
  64. 10 0
      doc/src/header.inc.html
  65. 77 0
      doc/src/ngircd-doc.css
  66. 266 82
      install-sh
  67. 53 35
      man/Makefile.in
  68. 5 4
      man/ngircd.8.tmpl
  69. 126 32
      man/ngircd.conf.5.tmpl
  70. 39 29
      missing
  71. BIN
      src/._Makefile.am
  72. 65 45
      src/Makefile.in
  73. 23 23
      src/config.h.in
  74. 55 39
      src/ipaddr/Makefile.in
  75. 9 2
      src/ipaddr/ng_ipaddr.c
  76. 2 2
      src/ipaddr/ng_ipaddr.h
  77. BIN
      src/ngircd/._client.h
  78. BIN
      src/ngircd/._conn-func.c
  79. BIN
      src/ngircd/._irc-channel.c
  80. BIN
      src/ngircd/._irc-op.c
  81. BIN
      src/ngircd/._irc-op.h
  82. BIN
      src/ngircd/._irc.c
  83. BIN
      src/ngircd/._irc.h
  84. BIN
      src/ngircd/._log.h
  85. BIN
      src/ngircd/._parse.h
  86. 7 7
      src/ngircd/Makefile.am
  87. 90 66
      src/ngircd/Makefile.in
  88. 8 0
      src/ngircd/array.c
  89. 306 153
      src/ngircd/channel.c
  90. 24 13
      src/ngircd/channel.h
  91. 152 130
      src/ngircd/client.c
  92. 16 19
      src/ngircd/client.h
  93. 47 0
      src/ngircd/conf-ssl.h
  94. 288 155
      src/ngircd/conf.c
  95. 45 18
      src/ngircd/conf.h
  96. 38 30
      src/ngircd/conn-func.c
  97. 7 8
      src/ngircd/conn-func.h
  98. 712 0
      src/ngircd/conn-ssl.c
  99. 28 0
      src/ngircd/conn-ssl.h
  100. 0 0
      src/ngircd/conn-zip.c

BIN
._INSTALL


BIN
._README


+ 13 - 7
AUTHORS

@@ -1,7 +1,7 @@
 
                      ngIRCd - Next Generation IRC Server
 
-                        (c)2001-2007 Alexander Barton,
+                        (c)2001-2009 Alexander Barton,
                     alex@barton.de, http://www.barton.de/
 
                ngIRCd is free software and published under the
@@ -19,14 +19,23 @@ directly, if possible!
 Main Authors
 ~~~~~~~~~~~~
 Alexander Barton, <alex@barton.de> (alex)
-Florian Westphal, <westphal@foo.fh-furtwangen.de> (fw)
+Florian Westphal, <fw@strlen.de>
 
 
 Contributors
 ~~~~~~~~~~~~
-Goetz Hoffart, <goetz@hoffart.de> (goetz)
-Ilja Osthoff, <i.osthoff@gmx.net> (ilja)
+Ali Shemiran, <ashemira@ucsd.edu>
+Ask Bjørn Hansen, <ask@develooper.com>
 Benjamin Pineau, <ben@zouh.org>
+Brandon Beresini, <beresini@google.com>
+Bryan Caldwell, <bcaldwel@ucsd.edu>
+Dana Dahlstrom, <dana+ngIRCd@cs.ucsd.edu>
+Eric Grunow, <egrunow@ucsd.edu>
+Goetz Hoffart, <goetz@hoffart.de>
+Ilja Osthoff, <i.osthoff@gmx.net>
+Jari Aalto, <jari.aalto@cante.net>
+Rolf Eike Beer, <eike@sf-mail.de>
+Scott Perry, <scperry@ucsd.edu>
 Sean Reifschneider, <jafo-rpms@tummy.com>
 
 
@@ -35,7 +44,3 @@ Code snippets
 J. Kercheval: pattern matching functions
 Patrick Powell, <papowell@astart.com>: snprintf()-function
 Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
-
-
-$Id: AUTHORS,v 1.13 2007/10/04 15:18:48 alex Exp $

+ 107 - 12
ChangeLog

@@ -1,7 +1,7 @@
 
                      ngIRCd - Next Generation IRC Server
 
-                        (c)2001-2008 Alexander Barton,
+                        (c)2001-2009 Alexander Barton,
                     alex@barton.de, http://www.barton.de/
 
                ngIRCd is free software and published under the
@@ -10,6 +10,100 @@
                                -- ChangeLog --
 
 
+ngIRCd Release 15 (2009-11-07)
+
+  - "ngircd --configtest": print SSL configuration options even when unset.
+
+  ngIRCd 15~rc1 (2009-10-15)
+  - Do not add default listening port (6667) if SSL ports were specified, so
+    ngIRCd can be configured to only accept SSL-encrypted connections now.
+  - Enable IRC operators to use the IRC command SQUIT (insted of the already
+    implemented but non-standard DISCONNECT command).
+  - New configuration option "AllowRemoteOper" (disabled by default) that
+    enables remote IRC operators to use the IRC commands SQUIT and CONNECT
+    on the local server.
+  - Mac OS X: fix test for packagemaker(1) tool in Makefile and use gcc 4.0
+    for Mac OS X 10.4 compatibility in the Xcode project file.
+  - Fix --with-{openssl|gnutls} to accept path names.
+  - Fix LSB header of Debian init script.
+  - Updated doc/Platforms.txt and include new script contrib/platformtest.sh
+    to ease generating platform reports.
+  - Fix connection information for already registered connections.
+  - Enforce upper limit on maximum number of handled commands. This implements
+    a throttling scheme: an IRC client can send up to 3 commands or 256 bytes
+    per second before a one second pause is enforced.
+  - Fix connection counter.
+  - Fix a few error handling glitches for SSL/TLS connections.
+  - Minor fixes to manual pages and documentation.
+
+ngIRCd Release 14.1 (2009-05-05)
+
+  - Security: fix remotely triggerable crash in SSL/TLS code.
+  - BSD start script contrib/ngircd.sh has been renamed to ngircd-bsd.sh.
+  - New start/stop script for RedHat-based distributions:
+    contrib/ngircd-redhat.init, thanks to Naoya Nakazawa <naoya@sanow.net>.
+  - Doxygen: update source code repository link to GIT.
+  - Debian: build ngircd-full-dbg package.
+  - Allow ping timeout quit messages to show the timeout value.
+  - Fix error handling on compressed links.
+  - Fix server list announcement.
+  - Do not remove hostnames from info text.
+
+ngIRCd Release 14 (2009-04-20)
+
+  - Display IPv6 addresses as "[<addr>]" when accepting connections.
+
+  ngIRCd 14~rc1 (2009-03-29)
+  - Updated Debian/Linux init script (see contrib/Debian/ngircd.init).
+  - Allow creation of persistent modeless channels.
+  - The INFO command reports the compile time now (if available).
+  - Spell check and enhance ngIRCd manual pages.
+  - Channel mode changes: break on syntax errors in MODE command.
+  - Support individual channel keys for pre-defined channels: introduce
+    new configuration variable "KeyFile" in [Channel] sections in ngircd.conf,
+    here a file can be configured for each pre-defined channel which contains
+    individual channel keys for different users.
+  - Remove limit on maximum number of predefined channels in ngircd.conf.
+  - Updated ngircd.spec file for building RPM packages.
+  - Add new and missing files to Mac OS X Xcode project, and update project.
+  - Reject masks with wildcard after last dot.
+  - TLS/SSL: remove useless error message when ssl connection is closed.
+  - Fix memory leak when a encrypted and compressed server link goes down.
+    (closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net)
+  - Fix handling of channels containing dots.
+    (closes ug #93, reported by Gonosz Csiga)
+
+ngIRCd Release 13 (2008-12-25)
+
+  - Updated documentation, especially doc/Services.txt and doc/SSL.txt.
+  - Make the test suite work on OpenSolaris.
+
+  ngIRCd 13~rc1 (2008-11-21):
+  - New version number scheme :-)
+  - Initial support for IRC services, using a RFC1459 style interface,
+    tested with IRCServices (http://www.ircservices.za.net/) version 5.1.13.
+    For this to work, ngIRCd now supports server-server links conforming
+    to RFC 1459. New ngircd.conf(5) option: ServiceMask.
+  - Support for SSL-encrypted server-server and client-server links using
+    OpenSSL (configure: --with-openssl) or GNUTLS (configure: --with-gnutls).
+    New ngircd.conf(5) options: SSLPorts, SSLKeyFile, SSLKeyFilePassword,
+    SSLCertFile, SSLDHFile, and SSLConnect.
+  - Server local channels have been implemented, prefix "&", that are only
+    visible to users of the same server and are not visible in the network.
+    In addition ngIRCd creates a "special" channel &SERVER on startup and logs
+    all the messages to it that a user with mode +s receives.
+  - New make target "osxpkg" to build a Mac OS X installer package.
+  - Debug mode: enable support for GNU libc memory tracing (see mtrace(3)).
+  - SysV init script: use LSB logging functions, if available.
+  - Added some more FAQ entries (regarding logging and IRC operators).
+  - Allow IRC operators to overwrite channel limits.
+  - Support for enhanced PRIVMSG and NOTICE message targets.
+  - More tests have been added to the test-suite ("make check"), and two
+    servers are started for testing server-server linking.
+  - Added a timestamp to log messages to the console.
+  - New configuration option "NoIdent" to disable IDENT lookups even if the
+    daemon is compiled with IDENT support.
+
 ngIRCd 0.12.1 (2008-07-09)
 
   - Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode
@@ -18,7 +112,7 @@ ngIRCd 0.12.1 (2008-07-09)
   - Update ngIRCd manual pages
   - Add option aliases -V (for --version) and -h (for --help).
   - Fix 'no-ipv6' compile error.
-  - Make Listen parameter a comma-seperated list of addresses. This also
+  - Make Listen parameter a comma-separated list of addresses. This also
     obsoletes ListenIPv4 and ListenIPv6 options. If Listen is unset, it
     is treated as Listen="::,0.0.0.0".
     Note: ListenIPv4 and ListenIPv6 options are still recognized,
@@ -28,11 +122,11 @@ ngIRCd 0.12.0 (2008-05-13)
 
   - Fix Bug: 85: "WHO #SecretChannel" that user is not a member of now returns
     proper RPL_ENDOFWHO_MSG instead of nothing. (Ali Shemiran)
-  - Fix complie on FreeBSD 5.4 and AIX.
-  - If bind() fails, also print ip address and not just the port number.
+  - Fix compile on FreeBSD 5.4 and AIX.
+  - If bind() fails, also print IP address and not just the port number.
 
   ngIRCd 0.12.0-pre2 (2008-04-29)
-  - IPv6: Add config options to disabe ipv4/ipv6 support.
+  - IPv6: Add config options to disable ipv4/ipv6 support.
   - Don't include doc/CVS.txt in distribution archive, use doc/GIT.txt now!
   - Documentation: get rid of some more references to CVS, switch to GIT.
   - Get rid of cvs-version.* and CVSDATE definition.
@@ -69,17 +163,17 @@ ngIRCd 0.11.0 (2008-01-15)
 
   ngIRCd 0.11.0-pre2 (2008-01-07)
   - SECURITY: IRC_PART could reference invalid memory, causing
-    ngircd to crash [from HEAD].
+    ngircd to crash [from HEAD]. (CVE-2008-0285)
   
   ngIRCd 0.11.0-pre1 (2008-01-02)
   - Use dotted-decimal IP address if hostname is >= 64.
   - Add support for /STAT u (server uptime) command.
   - New [Server] configuration Option "Bind" allows to specify
-    the source ip adress to use when connecting to remote server.
+    the source IP address to use when connecting to remote server.
   - New configuration option "MaxNickLength" to specify the allowed maximum
     length of user nick names. Note: must be unique in an IRC network!
   - Enhanced the IRC+ protocol to support an enhanced "server handshake" and
-    enable server to recognice numeric 005 (ISUPPORT) and 376 (ENDOFMOTD).
+    enable server to recognize numeric 005 (ISUPPORT) and 376 (ENDOFMOTD).
     See doc/Protocol.txt for details.
   - Re-added doc/SSL.txt to distribution -- got lost somewhere!?
   - Fixes the wrong logging output when nested servers are introduced
@@ -103,12 +197,13 @@ ngIRCd 0.11.0 (2008-01-15)
 ngIRCd 0.10.4 (2008-01-07)
 
   - SECURITY: IRC_PART could reference invalid memory, causing
-    ngircd to crash [from HEAD].
+    ngircd to crash [from HEAD]. (CVE-2008-0285)
   
 ngIRCd 0.10.3 (2007-08-01)
 
   - SECURITY: Fixed a severe bug in handling JOIN commands, which could
     cause the server to crash. Thanks to Sebastian Vesper, <net@veoson.net>.
+    (CVE-2007-6062)
 
 ngIRCd 0.10.2 (2007-06-08)
 
@@ -243,13 +338,13 @@ ngIRCd 0.8.3 (2005-02-03)
   - Fixed a bug that could case a root exploit when the daemon is compiled
     to do IDENT lookups and is logging to syslog. Bug discovered by CoKi,
     <coki@nosystem.com.ar>, thanks a lot!
-    (http://www.nosystem.com.ar/advisories/advisory-11.txt)
+    (CVE-2005-0226; http://www.nosystem.com.ar/advisories/advisory-11.txt)
 
 ngIRCd 0.8.2 (2005-01-26)
 
   - Added doc/SSL.txt to distribution.
   - Fixed a buffer overflow that could cause the daemon to crash. Bug found
-    by Florian Westphal, <westphal@foo.fh-furtwangen.de>.
+    by Florian Westphal, <westphal@foo.fh-furtwangen.de>. (CVE-2005-0199)
   - Fixed a possible buffer underrun when reading the MOTD file. Thanks
     to Florian Westphal, <westphal@foo.fh-furtwangen.de>.
   - Fixed detection of IRC lines which are too long to send. Detected by
@@ -407,7 +502,7 @@ ngIRCd 0.7.0 (2003-05-01)
   - Better error reporting to clients on connect.
   - Enhanced manual pages ngircd(8) and ngircd.conf(5).
   - Documentation is now installed in $(datadir)/doc/ngircd.
-  - Enhanced hanling of NJOIN in case of nick collisions.
+  - Enhanced handling of NJOIN in case of nick collisions.
 
 ngIRCd 0.6.1, 2003-01-21
 

+ 36 - 3
Makefile.am

@@ -15,6 +15,7 @@ SUBDIRS = doc src man contrib
 
 clean-local:
 	rm -f build-stamp*
+	rm -rf ngircd.dest
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
@@ -31,18 +32,50 @@ lint:
 srcdoc:
 	make -C doc srcdoc
 
-xcode:
+have-xcodebuild:
 	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
 	 >/dev/null 2>&1 \
 	 || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
+
+xcode: have-xcodebuild
+	rel=`grep AC_INIT configure.in | cut -d' ' -f2 | cut -d')' -f1`; \
+	 def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
+	 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
+	 -configuration Default $$def build
+
+xcode-clean: have-xcodebuild
 	xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -buildstyle Development
+	 -configuration Default clean
+	rm -fr contrib/MacOSX/build
 
 rpm: distcheck
 	rpm -ta ngircd-*.tar.gz
 
 deb:
 	[ -f debian/rules ] || ln -s contrib/Debian debian
-	dpkg-buildpackage -rfakeroot
+	dpkg-buildpackage -rfakeroot -i
+
+osxpkg: have-xcodebuild
+	@packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
+	 || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
+	make clean
+	./configure --prefix=/opt/ngircd
+	make xcode
+	make -C contrib/MacOSX de.barton.ngircd.plist
+	mkdir -p ngircd.dest/opt/ngircd/sbin
+	DESTDIR="$$PWD/ngircd.dest" make -C doc install
+	DESTDIR="$$PWD/ngircd.dest" make -C contrib install
+	DESTDIR="$$PWD/ngircd.dest" make -C man install
+	cp contrib/MacOSX/build/Default/ngIRCd \
+	 ngircd.dest/opt/ngircd/sbin/ngircd
+	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
+	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
+	chmod -R a-s,og-w,a+rX ngircd.dest
+	cd contrib/MacOSX && packagemaker \
+	 --doc ngIRCd.pmdoc \
+	 --out ../../$(distdir).mpkg
+	rm -f $(distdir).mpkg.zip
+	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
+	rm -rf ngircd.dest $(distdir).mpkg
 
 # -eof-

+ 107 - 54
Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -24,15 +24,11 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -47,17 +43,17 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
 	ChangeLog INSTALL NEWS config.guess config.sub depcomp \
 	install-sh missing
-subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -65,10 +61,13 @@ SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -84,8 +83,6 @@ GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -104,6 +101,8 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -114,6 +113,7 @@ LIBS = @LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -128,11 +128,11 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 U = @U@
 VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -144,32 +144,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = gnu
 SUBDIRS = doc src man contrib
 all: all-recursive
@@ -208,7 +219,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -241,8 +251,7 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -344,23 +353,22 @@ distclean-tags:
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
-	mkdir $(distdir)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	test -d $(distdir) || mkdir $(distdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -374,7 +382,7 @@ distdir: $(DISTFILES)
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -382,6 +390,8 @@ distdir: $(DISTFILES)
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -389,7 +399,7 @@ distdir: $(DISTFILES)
 	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r $(distdir)
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -464,7 +474,7 @@ distcheck: dist
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
 	@cd $(distuninstallcheck_dir) \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -533,12 +543,20 @@ info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -560,27 +578,30 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-	check-am clean clean-generic clean-local clean-recursive ctags \
-	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
-	dist-tarZ dist-zip distcheck distclean distclean-generic \
-	distclean-recursive distclean-tags distcleancheck distdir \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-local ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-tags distcleancheck distdir \
 	distuninstallcheck dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	installdirs-am maintainer-clean maintainer-clean-generic \
-	maintainer-clean-local maintainer-clean-recursive mostlyclean \
-	mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
-	tags tags-recursive uninstall uninstall-am uninstall-info-am
+	maintainer-clean-local mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
 
 
 clean-local:
 	rm -f build-stamp*
+	rm -rf ngircd.dest
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
@@ -597,19 +618,51 @@ lint:
 srcdoc:
 	make -C doc srcdoc
 
-xcode:
+have-xcodebuild:
 	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
 	 >/dev/null 2>&1 \
 	 || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
+
+xcode: have-xcodebuild
+	rel=`grep AC_INIT configure.in | cut -d' ' -f2 | cut -d')' -f1`; \
+	 def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
+	 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
+	 -configuration Default $$def build
+
+xcode-clean: have-xcodebuild
 	xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
-	 -buildstyle Development
+	 -configuration Default clean
+	rm -fr contrib/MacOSX/build
 
 rpm: distcheck
 	rpm -ta ngircd-*.tar.gz
 
 deb:
 	[ -f debian/rules ] || ln -s contrib/Debian debian
-	dpkg-buildpackage -rfakeroot
+	dpkg-buildpackage -rfakeroot -i
+
+osxpkg: have-xcodebuild
+	@packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
+	 || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
+	make clean
+	./configure --prefix=/opt/ngircd
+	make xcode
+	make -C contrib/MacOSX de.barton.ngircd.plist
+	mkdir -p ngircd.dest/opt/ngircd/sbin
+	DESTDIR="$$PWD/ngircd.dest" make -C doc install
+	DESTDIR="$$PWD/ngircd.dest" make -C contrib install
+	DESTDIR="$$PWD/ngircd.dest" make -C man install
+	cp contrib/MacOSX/build/Default/ngIRCd \
+	 ngircd.dest/opt/ngircd/sbin/ngircd
+	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
+	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
+	chmod -R a-s,og-w,a+rX ngircd.dest
+	cd contrib/MacOSX && packagemaker \
+	 --doc ngIRCd.pmdoc \
+	 --out ../../$(distdir).mpkg
+	rm -f $(distdir).mpkg.zip
+	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
+	rm -rf ngircd.dest $(distdir).mpkg
 
 # -eof-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.

+ 55 - 4
NEWS

@@ -1,7 +1,7 @@
 
                      ngIRCd - Next Generation IRC Server
 
-                        (c)2001-2008 Alexander Barton,
+                        (c)2001-2009 Alexander Barton,
                     alex@barton.de, http://www.barton.de/
 
                ngIRCd is free software and published under the
@@ -10,10 +10,61 @@
                                   -- NEWS --
 
 
+ngIRCd Release 15 (2009-11-07)
+
+  ngIRCd 15~rc1 (2009-10-15)
+  - Do not add default listening port (6667) if SSL ports were specified, so
+    ngIRCd can be configured to only accept SSL-encrypted connections now.
+  - Enable IRC operators to use the IRC command SQUIT (insted of the already
+    implemented but non-standard DISCONNECT command).
+  - New configuration option "AllowRemoteOper" (disabled by default) that
+    enables remote IRC operators to use the IRC commands SQUIT and CONNECT
+    on the local server.
+  - Enforce upper limit on maximum number of handled commands. This implements
+    a throttling scheme: an IRC client can send up to 3 commands or 256 bytes
+    per second before a one second pause is enforced.
+
+ngIRCd Release 14.1 (2009-05-05)
+
+  - Security: fix remotely triggerable crash in SSL/TLS code.
+  - Debian: build ngircd-full-dbg package.
+  - Allow ping timeout quit messages to show the timeout value.
+
+ngIRCd Release 14 (2009-04-20)
+
+  ngIRCd 14~rc1 (2009-03-29)
+  - Allow creation of persistent modeless channels.
+  - The INFO command reports the compile time now (if available).
+  - Support individual channel keys for pre-defined channels: introduce
+    new configuration variable "KeyFile" in [Channel] sections in ngircd.conf,
+    here a file can be configured for each pre-defined channel which contains
+    individual channel keys for different users.
+  - Remove limit on maximum number of predefined channels in ngircd.conf.
+
+ngIRCd Release 13 (2008-12-25)
+
+  ngIRCd 13~rc1 (2008-11-21):
+  - New version number scheme :-)
+  - Initial support for IRC services, using a RFC1459 style interface,
+    tested with IRCServices (http://www.ircservices.za.net/) version 5.1.13.
+    For this to work, ngIRCd now supports server-server links conforming
+    to RFC 1459. New ngircd.conf(5) option: ServiceMask.
+  - Support for SSL-encrypted server-server and client-server links using
+    OpenSSL (configure: --with-openssl) or GNUTLS (configure: --with-gnutls).
+    New ngircd.conf(5) options: SSLPorts, SSLKeyFile, SSLKeyFilePassword,
+    SSLCertFile, SSLDHFile, and SSLConnect.
+  - Server local channels have been implemented, prefix "&", that are only
+    visible to users of the same server and are not visible in the network.
+    In addition ngIRCd creates a "special" channel &SERVER on startup and logs
+    all the messages to it that a user with mode +s receives.
+  - New make target "osxpkg" to build a Mac OS X installer package.
+  - New configuration option "NoIdent" to disable IDENT lookups even if the
+    daemon is compiled with IDENT support.
+
 ngIRCd 0.12.1 (2008-07-09)
 
   - Add option aliases -V (for --version) and -h (for --help).
-  - Make Listen parameter a comma-seperated list of addresses. This also
+  - Make Listen parameter a comma-separated list of addresses. This also
     obsoletes ListenIPv4 and ListenIPv6 options. If Listen is unset, it
     is treated as Listen="::,0.0.0.0".
     Note: ListenIPv4 and ListenIPv6 options are still recognized,
@@ -22,7 +73,7 @@ ngIRCd 0.12.1 (2008-07-09)
 ngIRCd 0.12.0 (2008-05-13)
 
   ngIRCd 0.12.0-pre2 (2008-04-29)
-  - IPv6: Add config options to disabe ipv4/ipv6 support.
+  - IPv6: Add config options to disable ipv4/ipv6 support.
 
   ngIRCd 0.12.0-pre1 (2008-04-20)
   - Add IPv6 support.
@@ -41,7 +92,7 @@ ngIRCd 0.11.0 (2008-01-15)
 
   - Add support for /STAT u (server uptime) command.
   - New [Server] configuration Option "Bind" allows to specify
-    the source ip adress to use when connecting to remote server.
+    the source IP address to use when connecting to remote server.
   - New configuration option "MaxNickLength" to specify the allowed maximum
     length of user nick names. Note: must be unique in an IRC network!
   - Numeric 317: implemented "signon time" (displayed in WHOIS result).

+ 99 - 86
aclocal.m4

@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,12 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf.  If you want to use that,
+you should regenerate the build system entirely.], [63])])
+
+# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -21,14 +26,29 @@
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.9.5])])
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -85,14 +105,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 8
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -101,8 +121,10 @@ AC_DEFUN([AM_CONDITIONAL],
 [AC_PREREQ(2.52)dnl
  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -116,15 +138,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -152,6 +173,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
@@ -217,6 +239,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -269,7 +292,8 @@ if test "x$enable_dependency_tracking" != xno; then
   AMDEPBACKSLASH='\'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -294,8 +318,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # some people rename them; so instead we look at the file content.
   # Grep'ing the first line is not enough: some people post-process
   # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     continue
@@ -354,8 +379,8 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -378,16 +403,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.60])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -407,6 +436,9 @@ m4_ifval([$2],
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
@@ -442,6 +474,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
                   [_AM_DEPENDENCIES(CXX)],
                   [define([AC_PROG_CXX],
                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 ])
 
@@ -477,7 +513,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -555,14 +591,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -578,6 +614,7 @@ AC_SUBST($1)])
 # If it does, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
@@ -588,7 +625,7 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -596,60 +633,23 @@ fi
 
 # AM_PROG_MKDIR_P
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
@@ -684,14 +684,14 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 AC_DEFUN([AM_C_PROTOTYPES],
 [AC_REQUIRE([AC_C_PROTOTYPES])
@@ -702,9 +702,10 @@ else
 fi
 # Ensure some checks needed by ansi2knr itself.
 AC_REQUIRE([AC_HEADER_STDC])
-AC_CHECK_HEADERS(string.h)
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
+AC_CHECK_HEADERS([string.h])
+AC_SUBST([U])dnl
+AC_SUBST([ANSI2KNR])dnl
+_AM_SUBST_NOTMAKE([ANSI2KNR])dnl
 ])
 
 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
@@ -786,9 +787,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.

+ 23 - 13
config.guess

@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2007-03-06'
+timestamp='2008-01-23'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -56,8 +56,8 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -330,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
-    i86pc:SunOS:5.*:*)
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:6*:*)
@@ -532,7 +532,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[456])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -793,12 +793,15 @@ EOF
 	exit ;;
     *:Interix*:[3456]*)
     	case ${UNAME_MACHINE} in
-	    x86) 
+	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
 	    EM64T | authenticamd)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
 	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
@@ -833,7 +836,14 @@ EOF
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
     arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
 	exit ;;
     avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -954,8 +964,8 @@ EOF
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
 	exit ;;
-    xtensa:Linux:*:*)
-    	echo xtensa-unknown-linux-gnu
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so
@@ -1474,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be

+ 44 - 8
config.sub

@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2007-01-18'
+timestamp='2008-01-16'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -369,10 +369,14 @@ case $basic_machine in
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-*)
 		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
@@ -443,6 +447,14 @@ case $basic_machine in
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
@@ -475,8 +487,8 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16c)
-		basic_machine=cr16c-unknown
+	cr16)
+		basic_machine=cr16-unknown
 		os=-elf
 		;;
 	crds | unos)
@@ -668,6 +680,14 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -683,6 +703,10 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -809,6 +833,14 @@ case $basic_machine in
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -1017,6 +1049,10 @@ case $basic_machine in
 		basic_machine=tic6x-unknown
 		os=-coff
 		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;

File diff suppressed because it is too large
+ 5057 - 4054
configure


+ 66 - 8
configure.in

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
+# Copyright (c)2001-2009 Alexander Barton <alex@barton.de>
 #
 # 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
@@ -12,12 +12,14 @@
 # -- Initialisation --
 
 AC_PREREQ(2.50)
-AC_INIT(ngircd, 0.12.1)
+AC_INIT(ngircd, 15)
 AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE(1.6)
 AM_CONFIG_HEADER(src/config.h)
 
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
 # -- Templates for config.h --
 
 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
@@ -31,6 +33,7 @@ AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
 AH_TEMPLATE([ZEROCONF], [Define if support for Zeroconf should be included])
 AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
+AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
 
 AH_TEMPLATE([TARGET_OS], [Target operating system name])
 AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
@@ -71,7 +74,6 @@ AC_DEFUN([GCC_STACK_PROTECT_CC],[
   fi
 ])
 
-
 if test "$GCC" = "yes"; then
 	# We are using the GNU C compiler. Good!
 	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
@@ -123,6 +125,8 @@ AC_TRY_COMPILE([
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
 
+AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
+ [#include <arpa/inet.h>])
 
 # -- Libraries --
 
@@ -136,11 +140,11 @@ AC_FUNC_FORK
 AC_FUNC_STRFTIME
 
 AC_CHECK_FUNCS([ \
-	bind gethostbyaddr gethostbyname gethostname inet_ntoa malloc memmove \
-	memset realloc setsid setsockopt socket strcasecmp strchr strcspn strerror \
-	strstr waitpid],,AC_MSG_ERROR([required function missing!]))
+	bind gethostbyaddr gethostbyname gethostname inet_ntoa \
+	setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS(inet_aton isdigit sigaction snprintf vsnprintf strdup strlcpy strlcat)
+AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton isdigit sigaction snprintf \
+ vsnprintf strdup strlcpy strlcat strtok_r)
 
 # -- Configuration options --
 
@@ -310,6 +314,52 @@ if test "$x_io_backend" = "none"; then
 	AC_MSG_ERROR([No useabe IO API activated/found!?])
 fi
 
+# use SSL?
+
+AC_ARG_WITH(openssl,
+	[  --with-openssl          enable SSL support using OpenSSL],
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(crypto, BIO_s_mem)
+			AC_CHECK_LIB(ssl, SSL_library_init)
+			AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
+				AC_MSG_ERROR([Can't enable openssl])
+			)
+		fi
+	]
+)
+
+AC_ARG_WITH(gnutls,
+	[  --with-gnutls           enable SSL support using gnutls],
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(gnutls, gnutls_global_init)
+			AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
+				AC_MSG_ERROR([Can't enable gnutls])
+			)
+		fi
+	]
+)
+
+x_ssl_lib="no"
+if test "$x_ssl_gnutls" = "yes"; then
+	if test "$x_ssl_openssl" = "yes";then
+		AC_MSG_ERROR([Cannot enable both gnutls and openssl])
+	fi
+	x_ssl_lib=gnutls
+fi
+if test "$x_ssl_openssl" = "yes"; then
+	x_ssl_lib=openssl
+fi
+
 # use TCP wrappers?
 
 x_tcpwrap_on=no
@@ -432,6 +482,8 @@ AC_ARG_ENABLE(ipv6,
 	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
 )
 if test "$x_ipv6_on" = "yes"; then
+	# getaddrinfo() and getnameinfo() are optional when not compiling
+	# with IPv6 support, but are required for IPv6 to work!
 	AC_CHECK_FUNCS([ \
 		getaddrinfo getnameinfo \
 		],,AC_MSG_ERROR([required function missing for IPv6 support!]))
@@ -458,6 +510,7 @@ AC_ARG_ENABLE(debug,
 if test "$x_debug_on" = "yes"; then
 	AC_DEFINE(DEBUG, 1)
 	test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
+	AC_CHECK_FUNCS(mtrace)
 fi
 
 # enable "strict RFC rules"?
@@ -498,6 +551,7 @@ AC_OUTPUT([ \
 	contrib/Debian/Makefile \
 	contrib/MacOSX/Makefile \
 	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
+	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
 ])
 
 type dpkg >/dev/null 2>&1
@@ -587,7 +641,11 @@ echo $ECHO_N "        I/O backend: $ECHO_C"
 	echo "\"$x_io_backend\""
 
 echo $ECHO_N "      IPv6 protocol: $ECHO_C"
-echo "$x_ipv6_on"
+echo $ECHO_N "$x_ipv6_on    $ECHO_C"
+
+echo $ECHO_N "        SSL support: $ECHO_C"
+echo "$x_ssl_lib"
+
 echo
 
 # -eof-

BIN
contrib/._ngindent


BIN
contrib/._ngircd-bsd.sh


BIN
contrib/._ngircd-redhat.init


+ 6 - 5
contrib/Debian/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
 #
 # 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
@@ -8,11 +8,9 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.4 2004/05/11 00:32:31 alex Exp $
-#
 
 EXTRA_DIST = rules changelog compat control copyright \
-	ngircd.init ngircd.postinst
+	ngircd.init ngircd.default ngircd.postinst
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in
@@ -22,7 +20,10 @@ clean-local:
 	 ngircd.prerm.debhelper ngircd.substvars
 	rm -f ngircd-full.postinst.debhelper ngircd-full.postrm.debhelper \
 	 ngircd-full.prerm.debhelper ngircd-full.substvars
-	rm -rf ngircd ngircd-full
+	rm -f ngircd-full-dbg.postinst.debhelper \
+	 ngircd-full-dbg.postrm.debhelper ngircd-full-dbg.prerm.debhelper \
+	 ngircd-full-dbg.substvars
+	rm -rf ngircd ngircd-full ngircd-full-dbg
 	rm -f files
 
 # -eof-

+ 55 - 36
contrib/Debian/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
 #
 # 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
@@ -24,17 +24,11 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.4 2004/05/11 00:32:31 alex Exp $
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -62,8 +56,6 @@ SOURCES =
 DIST_SOURCES =
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -82,6 +74,8 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -92,6 +86,7 @@ LIBS = @LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -106,11 +101,11 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 U = @U@
 VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -122,34 +117,45 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = rules changelog compat control copyright \
-	ngircd.init ngircd.postinst
+	ngircd.init ngircd.default ngircd.postinst
 
 all: all-am
 
@@ -183,7 +189,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -192,22 +197,21 @@ CTAGS:
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -266,12 +270,20 @@ info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -291,16 +303,20 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-local \
 	distclean distclean-generic distdir dvi dvi-am html html-am \
 	info info-am install install-am install-data install-data-am \
-	install-exec install-exec-am install-info install-info-am \
-	install-man install-strip installcheck installcheck-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
 	installdirs maintainer-clean maintainer-clean-generic \
 	maintainer-clean-local mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
+	pdf-am ps ps-am uninstall uninstall-am
 
 
 maintainer-clean-local:
@@ -311,7 +327,10 @@ clean-local:
 	 ngircd.prerm.debhelper ngircd.substvars
 	rm -f ngircd-full.postinst.debhelper ngircd-full.postrm.debhelper \
 	 ngircd-full.prerm.debhelper ngircd-full.substvars
-	rm -rf ngircd ngircd-full
+	rm -f ngircd-full-dbg.postinst.debhelper \
+	 ngircd-full-dbg.postrm.debhelper ngircd-full-dbg.prerm.debhelper \
+	 ngircd-full-dbg.substvars
+	rm -rf ngircd ngircd-full ngircd-full-dbg
 	rm -f files
 
 # -eof-

+ 64 - 0
contrib/Debian/changelog

@@ -1,3 +1,67 @@
+ngircd (15-0ab1) unstable; urgency=low
+
+  * New "upstream" release: ngIRCd 15.
+
+ -- Alexander Barton <alex@barton.de>  Thu,  7 Nov 2009 12:07:08 +0200
+
+ngircd (15~rc1-0ab1) unstable; urgency=low
+
+  * New "upstream" release candidate 1 for ngIRCd Release 15.
+
+ -- Alexander Barton <alex@barton.de>  Thu, 15 Oct 2009 10:01:08 +0200
+
+ngircd (14.1-0ab1) unstable; urgency=high
+
+  * New "upstream" release ngIRCd 14.1, fixing a security-related bug.
+
+ -- Alexander Barton <alex@barton.de>  Tue,  5 May 2009 13:13:38 +0200
+
+ngircd (14-0ab3) unstable; urgency=low
+
+  * Fixed "Conflicts:" line in debian/control: missing comma.
+
+ -- Alexander Barton <alex@barton.de>  Mon,  4 May 2009 11:21:55 +0200
+
+ngircd (14-0ab2) unstable; urgency=low
+
+  * Add new "ngircd-full-dbg" package including degug code and both
+    the --debug and --sniffer options, and containing debug symbols.
+
+ -- Alexander Barton <alex@barton.de>  Wed, 29 Apr 2009 01:13:03 +0200
+
+ngircd (14-0ab1) unstable; urgency=low
+
+  * New "upstream" release: ngIRCd 14.
+
+ -- Alexander Barton <alex@barton.de>  Mon, 20 Apr 2009 11:09:12 +0200
+
+ngircd (14~rc1-0ab1) unstable; urgency=low
+
+  * New "upstream" release candidate 1 for ngIRCd Release 14.
+
+ -- Alexander Barton <alex@barton.de>  Sun, 29 Mar 2009 17:09:17 +0200
+
+ngircd (13-0ab1) unstable; urgency=low
+
+  * New "upstream" release: ngIRCd 13.
+
+ -- Alexander Barton <alex@barton.de>  Thu, 25 Dec 2008 23:09:58 +0100
+
+ngircd (13~rc1-0ab1) unstable; urgency=low
+
+  * New "upstream" release candidate 1 for ngIRCd Release 13.
+
+ -- Alexander Barton <alex@barton.de>  Fri, 21 Nov 2008 22:04:41 +0100
+
+ngircd (0.12.1-0ab1+dev) unstable; urgency=low
+
+  * Update package for testing the new "upstream" features:
+     - Support for IRC services (see http://www.ircservices.za.net),
+     - Encrypted connections using GNU TLS (ngircd-full),
+     - Support for the IPv6 protocol (ngircd-full).
+
+ -- Alexander Barton <alex@barton.de>  Fri, 03 Oct 2008 16:22:55 +0200
+
 ngircd (0.12.1-0ab1) unstable; urgency=low
 
   * New "upstream" release ngIRCd 0.12.1.

+ 35 - 6
contrib/Debian/control

@@ -2,8 +2,8 @@ Source: ngircd
 Section: net
 Priority: optional
 Maintainer: Alexander Barton <alex@barton.de>
-Build-Depends: debhelper (>> 4.0.0), libz-dev, libwrap-dev, libident-dev
-Standards-Version: 3.7.2.1
+Build-Depends: debhelper (>> 4.0.0), libz-dev, libwrap0-dev, libident-dev, libgnutls-dev
+Standards-Version: 3.8.0
 
 Package: ngircd
 Architecture: any
@@ -15,7 +15,9 @@ Description: A lightweight daemon for the Internet Relay Chat (IRC)
  IRCd like many others.
  .
  This package contains the "standard distribution", including support for
- syslog logging and compressed server-links using zlib.
+ syslog logging and compressed server-links using zlib. Please have a look
+ at the "ngircd-full" package if you need advanced functionality like support
+ for IPv6 or SSL.
  .
  Advantages of ngIRCd:
   - no problems with servers using changing/non-static IP addresses.
@@ -30,14 +32,41 @@ Package: ngircd-full
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: ircd
-Conflicts: ngircd
+Conflicts: ngircd, ngircd-dbg
 Description: A lightweight daemon for the Internet Relay Chat (IRC)
  ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
  network. It is written from scratch and is not based upon the original
  IRCd like many others.
  .
- This package includes support for TCP wrappers and IDENT requests in
- addition to the features of the "standard package".
+ In addition to the features of the "standard package", this package
+ includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
+ SSL encrypted client and server links.
+ .
+ Advantages of ngIRCd:
+  - no problems with servers using changing/non-static IP addresses.
+  - small and lean configuration file.
+  - free, modern and open source C code.
+  - still under active development.
+ .
+ ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
+ mixed networks.
+
+Package: ngircd-full-dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Provides: ircd
+Conflicts: ngircd, ngircd-full
+Description: A lightweight daemon for the Internet Relay Chat (IRC)
+ ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
+ network. It is written from scratch and is not based upon the original
+ IRCd like many others.
+ .
+ In addition to the features of the "standard package", this package
+ includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
+ SSL encrypted client and server links.
+ .
+ And in addition to the "full" variant, the binaries contained in this
+ package are build with debug code and contain debug symbols.
  .
  Advantages of ngIRCd:
   - no problems with servers using changing/non-static IP addresses.

+ 12 - 0
contrib/Debian/ngircd.default

@@ -0,0 +1,12 @@
+#
+# Defaults for ngIRCd start and stop script
+#
+# $Id: ngircd.default,v 1.1 2003/12/31 17:20:11 alex Exp $
+#
+
+# Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
+# possible options (default: empty).
+
+PARAMS=""
+
+# -eof-

+ 127 - 38
contrib/Debian/ngircd.init

@@ -1,19 +1,19 @@
 #!/bin/sh
 #
 # ngIRCd start and stop script for Debian-based systems
-#
-# $Id: ngircd.init,v 1.7 2006/12/26 14:43:46 alex Exp $
+# Copyright 2008,2009 Alexander Barton <alex@barton.de>
 #
 
 ### BEGIN INIT INFO
-# Provides:		ircd
-# Required-Start:	$local_fs
-# Required-Stop:	$local_fs
-# Should-Start:		$syslog $network
-# Should-Stop:		$syslog $network
+# Provides:		ngircd
+# Required-Start:	$network $remote_fs
+# Required-Stop:
+# Should-Start:		$syslog $named
+# Should-Stop:		$syslog
 # Default-Start:	2 3 4 5
 # Default-Stop:		0 1 6
 # Short-Description:	Next Generation IRC Server
+# Description:		IRC daemon written from scratch
 ### END INIT INFO
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@@ -21,66 +21,155 @@ DAEMON=/usr/sbin/ngircd
 NAME=ngIRCd
 DESC="IRC daemon"
 PARAMS=""
+STARTTIME=1
+DIETIME=10
+
+test -x $DAEMON || exit 5
 
 test -h "$0" && me=`readlink $0` || me="$0"
 BASENAME=`basename $me`
 
-test -f /etc/default/$BASENAME && . /etc/default/$BASENAME
+test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
+
+# LSB compatibility functions that become used if there is no local
+# include file available.
+log_daemon_msg() {
+	echo -n "$*"
+}
+log_end_msg() {
+	[ "$1" == "0" ] && echo "." || echo " failed!"
+}
+log_failure_msg() {
+	echo "$*"
+}
+log_warning_msg() {
+	log_failure_msg "$*"
+}
+
+# Include LSB functions, if available:
+test -r /lib/lsb/init-functions && . /lib/lsb/init-functions
+
+PIDFILE=`$DAEMON $PARAMS -t | tr -d ' ' | grep "^PidFile=" | cut -d'=' -f2`
+[ -n "$PIDFILE" ] || PIDFILE="/var/run/ircd/ngircd.pid"
 
-test -x $DAEMON || exit 0
+r=3
 
 Check_Config()
 {
-	$DAEMON --configtest >/dev/null 2>&1
-	if [ $? -ne 0 ]; then
-		echo "Configuration of $NAME is not valide, won't (re)start!"
-		echo "Please run \"$DAEMON --configtest\" manually and fix it up ..."
-		exit 1
+	# Make sure that the configuration of ngIRCd is valid:
+	$DAEMON $PARAMS --configtest >/dev/null 2>&1
+	[ $? -eq 0 ] && return 0
+	log_end_msg 1
+	log_failure_msg "Configuration of $NAME is not valid, won't (re)start!"
+	log_failure_msg "Run \"$DAEMON --configtest\" and fix it up ..."
+	exit 6
+}
+
+Prepare() {
+	# Make sure the PID file directory exists and is writable:
+	user=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerUID="|cut -d'=' -f2`
+	group=`$DAEMON $PARAMS -t|tr -d ' '|grep "^ServerGID="|cut -d'=' -f2`
+	piddir=`dirname "$PIDFILE"`
+	[ -d "$piddir" ] || mkdir -p "$piddir" 2>/dev/null
+	chown "$user:$group" "$piddir" 2>/dev/null
+	[ $? -eq 0 ] && return 0
+	log_end_msg 1
+	log_failure_msg "Failed to prepare '$piddir' for user '$user'!"
+	exit 1
+}
+
+Do_Start() {
+	if Do_Status; then
+		log_end_msg 0
+		log_warning_msg "$NAME seems to be already running, nothing to do."
+		exit 0
 	fi
+	start-stop-daemon --start \
+		--quiet --exec $DAEMON -- $PARAMS
+	sleep $STARTTIME
+	Do_Status || return 7
+	return 0
 }
 
-Try_Start()
-{
-	[ ! -d /var/run/ircd ] || chown irc:irc /var/run/ircd
-	start-stop-daemon --start --quiet --exec $DAEMON -- $PARAMS
-	if [ $? -ne 0 ]; then
-		echo "$NAME failed!"
-		exit 1
+Do_Stop() {
+	if ! Do_Status; then
+		log_end_msg 0
+		log_warning_msg "$NAME seems not to be running, nothing to do."
+		exit 0
 	fi
-	echo "$NAME."
+	Do_ForceStop
+	return $?
+}
+
+Do_ForceStop() {
+	[ -e $PIDFILE ] \
+		&& pidfile="--pidfile $PIDFILE" \
+		|| pidfile=""
+	start-stop-daemon --stop \
+		--quiet --oknodo --exec $DAEMON $pidfile
+	for i in `seq 1 $DIETIME`; do
+		Do_Status || return 0
+		sleep 1
+	done
+	return 1
+}
+
+Do_Reload() {
+	start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+	return $?
+}
+
+Do_Status() {
+	[ -e $PIDFILE ] \
+		&& pidfile="--pidfile $PIDFILE" \
+		|| pidfile=""
+	start-stop-daemon --stop \
+		--quiet --signal 0 --exec $DAEMON $pidfile >/dev/null
+	return $?
 }
 
 case "$1" in
   start)
+	log_daemon_msg "Starting $DESC" "$NAME"
 	Check_Config
-	echo -n "Starting $DESC: "
-	Try_Start
+	Prepare
+	Do_Start; r=$?
+	log_end_msg $r
 	;;
   stop)
-	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ngircd.pid --exec $DAEMON \
-	  && echo "$NAME." \
-	  || echo "(none running)"
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	Do_Stop; r=$?
+	log_end_msg $r
 	;;
   reload|force-reload)
+	log_daemon_msg "Reloading $DESC" "$NAME"
 	Check_Config
-	echo "Reloading $DESC configuration files."
-	start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+	Do_Reload; r=$?
+	log_end_msg $r
 	;;
   restart)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	Check_Config
+	Prepare
+	Do_ForceStop
+	Do_Start; r=$?
+	log_end_msg $r
+	;;
+  status)
+	log_daemon_msg "Checking for $DESC" "$NAME"
+	Do_Status; r=$?
+	log_end_msg $r
+	;;
+  test)
 	Check_Config
-	echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
-	sleep 1
-	Try_Start
+	echo "Configuration of $DAEMON seems to be ok."; r=0
 	;;
   *)
-	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	exit 1
+	N=/etc/init.d/$NAME; r=2
+	echo "Usage: $N {start|stop|restart|reload|force-reload|status|test}" >&2
 	;;
 esac
 
-exit 0
+exit $r
 
 # -eof-

+ 71 - 18
contrib/Debian/rules

@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2009 Alexander Barton <alex@barton.de>
 #
 # 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
@@ -11,8 +11,6 @@
 #
 # debian/rules for ngIRCd
 #
-# $Id: rules,v 1.3 2005/02/07 23:09:31 alex Exp $
-#
 # Based on the sample debian/rules that uses debhelper,
 # GNU copyright 1997 to 1999 by Joey Hess.
 #
@@ -38,7 +36,7 @@ endif
 
 configure-ngircd: configure
 	dh_testdir
-	
+
 	# configure "standard" variant:
 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 	  --prefix=/usr \
@@ -48,13 +46,28 @@ configure-ngircd: configure
 
 configure-ngircd-full: configure
 	dh_testdir
-	
+
 	# configure "full" variant:
 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 	  --prefix=/usr \
 	  --sysconfdir=/etc/ngircd \
 	  --mandir=\$${prefix}/share/man \
-	  --with-syslog --with-zlib --with-tcp-wrappers --with-ident
+	  --with-syslog --with-zlib \
+	  --with-gnutls --with-ident --with-tcp-wrappers \
+	  --enable-ipv6
+
+configure-ngircd-full-dbg: configure
+	dh_testdir
+
+	# configure "full debug" variant:
+	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+	  --prefix=/usr \
+	  --sysconfdir=/etc/ngircd \
+	  --mandir=\$${prefix}/share/man \
+	  --enable-debug --enable-sniffer \
+	  --with-syslog --with-zlib \
+	  --with-gnutls --with-ident --with-tcp-wrappers \
+	  --enable-ipv6
 
 build:
 	dh_clean -k
@@ -63,20 +76,30 @@ build-ngircd: build-stamp-ngircd
 build-stamp-ngircd: configure-ngircd
 	dh_testdir
 	rm -f build-stamp-*
-	
+
 	# Add here commands to compile the "standard" package:
 	$(MAKE)
-	
+
 	touch build-stamp-ngircd
 
 build-ngircd-full: build-stamp-ngircd-full
 build-stamp-ngircd-full: configure-ngircd-full
 	dh_testdir
 	rm -f build-stamp-*
-	
+
 	# Add here commands to compile the "full" package:
 	$(MAKE)
-	
+
+	touch build-stamp-ngircd-full
+
+build-ngircd-full-dbg: build-stamp-ngircd-full-dbg
+build-stamp-ngircd-full-dbg: configure-ngircd-full-dbg
+	dh_testdir
+	rm -f build-stamp-*
+
+	# Add here commands to compile the "full debug" package:
+	$(MAKE)
+
 	touch build-stamp-ngircd-full
 
 clean:
@@ -86,10 +109,13 @@ clean:
 	rm -f $(CURDIR)/debian/ngircd-full.default
 	rm -f $(CURDIR)/debian/ngircd-full.init
 	rm -f $(CURDIR)/debian/ngircd-full.postinst
-	
+	rm -f $(CURDIR)/debian/ngircd-full-dbg.default
+	rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
+	rm -f $(CURDIR)/debian/ngircd-full-dbg.init
+
 	# Add here commands to clean up after the build process:
-	-$(MAKE) clean
-	
+	[ ! -f Makefile ] || $(MAKE) distclean
+
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 	cp -f /usr/share/misc/config.sub config.sub
 endif
@@ -98,13 +124,13 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 endif
 	dh_clean
 
-install: install-ngircd install-ngircd-full
+install: install-ngircd install-ngircd-full install-ngircd-full-dbg
 
 install-ngircd: build-ngircd
 	dh_testdir
 	dh_testroot
 	dh_installdirs
-	
+
 	# Add here commands to install the "standard" package into debian/ngircd:
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
 	rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
@@ -122,7 +148,7 @@ install-ngircd-full: build-ngircd-full
 	dh_testdir
 	dh_testroot
 	dh_installdirs
-	
+
 	# Add here commands to install the "full" package into debian/ngircd-full:
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
 	rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/INSTALL*
@@ -138,6 +164,26 @@ install-ngircd-full: build-ngircd-full
 	 >$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
 	touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
 
+install-ngircd-full-dbg: build-ngircd-full-dbg
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+
+	# Add here commands to install the "full" package into debian/ngircd-full:
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
+	rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/INSTALL*
+	rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/COPYING*
+	mv $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd \
+	 $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg
+	mkdir -p $(CURDIR)/debian/ngircd-full-dbg/var/run/ircd
+	cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
+	 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
+	 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
+	 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
+	 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
+	 >$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf
+	touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd
+
 # Build architecture-independent files here.
 binary-indep:
 	# We have nothing to do by default.
@@ -150,13 +196,20 @@ binary-arch: build install
 	 $(CURDIR)/debian/ngircd-full.init
 	ln -s $(CURDIR)/debian/ngircd.postinst \
 	 $(CURDIR)/debian/ngircd-full.postinst
-	
+
+	ln -s $(CURDIR)/debian/ngircd.default \
+	 $(CURDIR)/debian/ngircd-full-dbg.default
+	ln -s $(CURDIR)/debian/ngircd.init \
+	 $(CURDIR)/debian/ngircd-full-dbg.init
+	ln -s $(CURDIR)/debian/ngircd.postinst \
+	 $(CURDIR)/debian/ngircd-full-dbg.postinst
+
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs -a -A ChangeLog
 	dh_installdocs -a
 	dh_installinit -a
-	dh_strip -a
+	dh_strip -a --no-package=ngircd-full-dbg
 	dh_compress -a
 	dh_fixperms -a
 	dh_installdeb -a

BIN
contrib/MacOSX/._Makefile.am


+ 6 - 5
contrib/MacOSX/Makefile.am

@@ -8,12 +8,10 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.3 2008/02/17 15:31:15 alex Exp $
-#
 
-SUBDIRS = ngIRCd.xcodeproj
+SUBDIRS = ngIRCd.xcodeproj ngIRCd.pmdoc
 
-EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h cvs-version.h
+EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h preinstall.sh postinstall.sh
 
 SUFFIXES = .tmpl .
 
@@ -36,7 +34,9 @@ install-sys-darwin:
 	fi
 
 install-sys-darwin-root: de.barton.ngircd.plist
-	install -c -m 644 -b -o root -g wheel de.barton.ngircd.plist /Library/LaunchDaemons/de.barton.ngircd.plist
+	install -d -m 755 -o root -g wheel $(DESTDIR)/Library/LaunchDaemons
+	install -c -m 644 -b -o root -g wheel de.barton.ngircd.plist \
+	 $(DESTDIR)/Library/LaunchDaemons/de.barton.ngircd.plist
 	@echo
 	@echo " ** \"/Library/LaunchDaemons/de.barton.ngircd.plist\" has been installed,"
 	@echo " ** but is disabled. Use launchctl(8) to enable/run ngIRCd on Darwin/Mac OS X."
@@ -44,6 +44,7 @@ install-sys-darwin-root: de.barton.ngircd.plist
 
 clean-local:
 	rm -rf build
+	rm -f de.barton.ngircd.plist
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in

+ 74 - 53
contrib/MacOSX/Makefile.in

@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -24,17 +24,11 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.3 2008/02/17 15:31:15 alex Exp $
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -62,17 +56,18 @@ SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -91,6 +86,8 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -101,6 +98,7 @@ LIBS = @LIBS@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -115,11 +113,11 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 U = @U@
 VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -131,34 +129,45 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-SUBDIRS = ngIRCd.xcodeproj
-EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h cvs-version.h
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = ngIRCd.xcodeproj ngIRCd.pmdoc
+EXTRA_DIST = de.barton.ngircd.plist.tmpl config.h preinstall.sh postinstall.sh
 SUFFIXES = .tmpl .
 all: all-recursive
 
@@ -193,7 +202,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -226,8 +234,7 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
 	@failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
@@ -328,22 +335,21 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -357,7 +363,7 @@ distdir: $(DISTFILES)
 	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    distdir=`$(am__cd) $(distdir) && pwd`; \
 	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -365,6 +371,8 @@ distdir: $(DISTFILES)
 	      $(MAKE) $(AM_MAKEFLAGS) \
 	        top_distdir="$$top_distdir" \
 	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -418,12 +426,20 @@ info-am:
 
 install-data-am: install-data-local
 
+install-dvi: install-dvi-recursive
+
 install-exec-am:
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -443,22 +459,24 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \