Commit Diff


commit - 85abfd84beee0a5fc6725624b0bd0260c7b2d856
commit + 107bfdc821cfb179996e1186cff0ec4970ef4fbd
blob - c87085ac5cf030356cdba9b1846bf984b78795fd
blob + cca200b2a452d02478224566f135fdf0b8ca4eed
--- autogen.sh
+++ autogen.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 # 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
@@ -98,6 +98,12 @@ Notfound()
 	exit 1
 }
 
+Run()
+{
+	[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
+	$@
+}
+
 # Reset locale settings to suppress warning messages of Perl
 unset LC_ALL
 unset LANG
@@ -125,13 +131,13 @@ fi
 # specifies one:
 echo "Searching tools ..."
 [ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
-[ "$VERBOSE" = "1" ] && echo "ACLOCAL=$ACLOCAL"
+[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
 [ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
-[ "$VERBOSE" = "1" ] && echo "AUTOHEADER=$AUTOHEADER"
+[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
 [ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
-[ "$VERBOSE" = "1" ] && echo "AUTOMAKE=$AUTOMAKE"
+[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
 [ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
-[ "$VERBOSE" = "1" ] && echo "AUTOCONF=$AUTOCONF"
+[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
 
 # Call ./configure when parameters have been passed to this script and
 # GO isn't already defined.
@@ -147,10 +153,10 @@ export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
 
 # Generate files
 echo "Generating files ..."
-$ACLOCAL && \
-	$AUTOHEADER && \
-	$AUTOMAKE --add-missing && \
-	$AUTOCONF --force
+Run $ACLOCAL && \
+	Run $AUTOCONF && \
+	Run $AUTOHEADER && \
+	Run $AUTOMAKE --add-missing --no-force
 
 if [ $? -eq 0 -a -x ./configure ]; then
 	# Success: if we got some parameters we call ./configure and pass
blob - d622a44e551f209d5e8c5462b3fe53a162f7b330
blob + 137bedf2e28b0e831b7b92b3a433d3fca5854a9b
--- config.guess
+++ config.guess
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-14'
 
 # 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
@@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -800,6 +804,9 @@ EOF
 	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
 	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
@@ -1201,6 +1208,9 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1256,7 +1266,7 @@ EOF
     NEO-?:NONSTOP_KERNEL:*:*)
 	echo neo-tandem-nsk${UNAME_RELEASE}
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1340,6 @@ EOF
 	exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
blob - c894da45500c4af1bf5688e713a8895622d18182
blob + bdda9e4a32c1811dfad72224cc32bca0fe3cba74
--- config.sub
+++ config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -123,7 +123,7 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
@@ -225,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -785,6 +791,10 @@ case $basic_machine in
 	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -1346,15 +1356,15 @@ case $os in
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1537,6 +1547,9 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	hexagon-*)
+		os=-elf
+		;;
 	tic54x-*)
 		os=-coff
 		;;
blob - 52435fd4df7b419f98de0b0305447ee75a1b9867
blob + 949a383a5089104c0f283fffa9cb050dd1746b8a
--- configure.in
+++ configure.in
@@ -13,39 +13,41 @@ define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-/
 
 # -- Initialisation --
 
-AC_PREREQ(2.50)
-AC_INIT(ngircd, VERSION_ID)
-AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
-AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(1.6)
-AC_CONFIG_HEADER(src/config.h)
+AC_PREREQ([2.67])
+AC_INIT([ngIRCd], VERSION_ID,
+	[ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
 
+AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
+AC_CONFIG_HEADER([src/config.h])
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE([1.11])
+
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # -- Templates for config.h --
 
 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
+AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
 AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
+AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
+AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
+AH_TEMPLATE([PAM], [Define if PAM should be used])
 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
 AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
-AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
-AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
-AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
-AH_TEMPLATE([PAM], [Define if PAM should be used])
-AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
+AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 
-AH_TEMPLATE([TARGET_OS], [Target operating system name])
-AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
-AH_TEMPLATE([TARGET_CPU], [Target CPU name])
+AH_TEMPLATE([HOST_OS], [Target operating system name])
+AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
+AH_TEMPLATE([HOST_CPU], [Target CPU name])
 
 # -- C Compiler --
 
 AC_PROG_CC
 AC_PROG_CC_STDC
-AC_C_PROTOTYPES
 
 # -- Helper programs --
 
@@ -57,9 +59,9 @@ AC_PROG_RANLIB
 
 # -- Compiler Features --
 
-AM_C_PROTOTYPES
 AC_C_CONST
 AC_C_INLINE
+AM_C_PROTOTYPES
 
 # -- Hard coded system and compiler dependencies/features/options ... --
 
@@ -85,7 +87,7 @@ if test "$GCC" = "yes"; then
 	GCC_STACK_PROTECT_CC
 fi
 
-case "$target_os" in
+case "$host_os" in
 	hpux*)
 		# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
 		# (tested with HP/UX 11.11)
@@ -101,28 +103,20 @@ CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
 # -- Headers --
 
 AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
 
+# Required header files
 AC_CHECK_HEADERS([ \
-	ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
-	stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
+	fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \
+	strings.h sys/socket.h sys/time.h unistd.h \
 	],,AC_MSG_ERROR([required C header missing!]))
 
-AC_CHECK_HEADERS([ \
-	arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
-	],[],[],[[
-	#ifdef HAVE_SYS_TYPES_H
-		#include <sys/types.h>
-	#endif
-	#ifdef HAVE_SYS_SOCKET_H
-		#include <sys/socket.h>
-	#endif
-	#ifdef HAVE_NETINET_IN_H
-		#include <netinet/in.h>
-	#endif
-	]]
-)
+# Optional header files
+AC_CHECK_HEADERS_ONCE([ \
+	arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \
+	stdint.h varargs.h \
+	])
 
 # -- Datatypes --
 
@@ -139,33 +133,50 @@ AC_TRY_COMPILE([
 	AC_MSG_RESULT(no)
 ])
 
+AC_TYPE_PID_T
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
 
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
  [#include <arpa/inet.h>])
 
 # -- Libraries --
 
-# A/UX needs this.
-AC_CHECK_LIB(UTIL,memmove)
-# needed on solaris. GNU libc also has a libnsl, but we do not need it.
-AC_SEARCH_LIBS(gethostbyname,nsl)
-AC_CHECK_LIB(socket,bind)
+# memmove: A/UX libUTIL
+AC_SEARCH_LIBS([memmove], [UTIL], [], [
+	AC_MSG_ERROR([unable to find the memmove() function])
+])
+# gethostbyname: Solaris libnsl
+AC_SEARCH_LIBS([gethostbyname], [nsl], [], [
+	AC_MSG_ERROR([unable to find the gethostbyname() function])
+])
+# bind: SVR4 libsocket
+AC_SEARCH_LIBS([bind], [socket], [], [
+	AC_MSG_ERROR([unable to find the bind() function])
+])
 
 # -- Functions --
 
 AC_FUNC_FORK
 AC_FUNC_STRFTIME
 
+# Required functions
 AC_CHECK_FUNCS([ \
-	bind gethostbyaddr gethostbyname gethostname inet_ntoa \
-	setsid setsockopt socket strcasecmp waitpid],,
+	alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
+	gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
+	strchr strcspn strerror strncasecmp strrchr strspn strstr \
+	],,
 	AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS([ \
-	gai_strerror getaddrinfo getnameinfo inet_aton sigaction \
-	sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r])
+# Optional functions
+AC_CHECK_FUNCS_ONCE([ \
+	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
+	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
 
 # -- Configuration options --
 
@@ -173,22 +184,20 @@ AC_CHECK_FUNCS([ \
 
 x_syslog_on=no
 AC_ARG_WITH(syslog,
-	[  --without-syslog        disable syslog (autodetected by default)],
+	AS_HELP_STRING([--without-syslog],
+		       [disable syslog (autodetected by default)]),
 	[	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(be, syslog)
-			AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
+			AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
 				AC_MSG_ERROR([Can't enable syslog!])
-			)
+			])
 		fi
 	],
-	[
-		AC_CHECK_LIB(be, syslog)
-		AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
+	[	AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
 	]
 )
 if test "$x_syslog_on" = "yes"; then
@@ -200,7 +209,8 @@ fi
 
 x_zlib_on=no
 AC_ARG_WITH(zlib,
-	[  --without-zlib          disable zlib compression (autodetected by default)],
+	AS_HELP_STRING([--without-zlib],
+		       [disable zlib compression (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -227,7 +237,8 @@ fi
 x_io_backend=none
 
 AC_ARG_WITH(select,
-	[  --without-select        disable select IO support (autodetected by default)],
+	AS_HELP_STRING([--without-select],
+		       [disable select IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -245,7 +256,8 @@ AC_ARG_WITH(select,
 )
 
 AC_ARG_WITH(poll,
-	[  --without-poll          disable poll support (autodetected by default)],
+	AS_HELP_STRING([--without-poll],
+		       [disable poll support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -271,7 +283,8 @@ AC_ARG_WITH(poll,
 )
 
 AC_ARG_WITH(devpoll,
-	[  --without-devpoll       disable /dev/poll IO support (autodetected by default)],
+	AS_HELP_STRING([--without-devpoll],
+		       [disable /dev/poll IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -288,7 +301,8 @@ AC_ARG_WITH(devpoll,
 )
 
 AC_ARG_WITH(epoll,
-	[  --without-epoll         disable epoll IO support (autodetected by default)],
+	AS_HELP_STRING([--without-epoll],
+		       [disable epoll IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -306,7 +320,8 @@ AC_ARG_WITH(epoll,
 )
 
 AC_ARG_WITH(kqueue,
-	[  --without-kqueue        disable kqueue IO support (autodetected by default)],
+	AS_HELP_STRING([--without-kqueue],
+		       [disable kqueue IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -346,7 +361,8 @@ fi
 # use SSL?
 
 AC_ARG_WITH(openssl,
-	[  --with-openssl          enable SSL support using OpenSSL],
+	AS_HELP_STRING([--with-openssl],
+		       [enable SSL support using OpenSSL]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -363,7 +379,8 @@ AC_ARG_WITH(openssl,
 )
 
 AC_ARG_WITH(gnutls,
-	[  --with-gnutls           enable SSL support using gnutls],
+	AS_HELP_STRING([--with-gnutls],
+		       [enable SSL support using gnutls]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -393,7 +410,8 @@ fi
 
 x_tcpwrap_on=no
 AC_ARG_WITH(tcp-wrappers,
-	[  --with-tcp-wrappers     enable TCP wrappers support],
+	AS_HELP_STRING([--with-tcp-wrappers],
+		       [enable TCP wrappers support]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -424,7 +442,8 @@ int deny_severity = 0;
 
 x_identauth_on=no
 AC_ARG_WITH(ident,
-	[  --with-ident            enable "IDENT" ("AUTH") protocol support],
+	AS_HELP_STRING([--with-ident],
+		       [enable "IDENT" ("AUTH") protocol support]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -447,7 +466,8 @@ fi
 
 x_pam_on=no
 AC_ARG_WITH(pam,
-	[  --with-pam              enable user authentication using PAM],
+	AS_HELP_STRING([--with-pam],
+		       [enable user authentication using PAM]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -474,7 +494,8 @@ fi
 
 x_ircplus_on=yes
 AC_ARG_ENABLE(ircplus,
-	[  --disable-ircplus       disable IRC+ protocol],
+	AS_HELP_STRING([--disable-ircplus],
+		       [disable IRC+ protocol]),
 	if test "$enableval" = "no"; then x_ircplus_on=no; fi
 )
 if test "$x_ircplus_on" = "yes"; then
@@ -484,7 +505,8 @@ fi
 # enable support for IPv6?
 x_ipv6_on=no
 AC_ARG_ENABLE(ipv6,
-	[  --enable-ipv6           enable IPv6 protocol support],
+	AS_HELP_STRING([--enable-ipv6],
+		       [enable IPv6 protocol support]),
 	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
 )
 if test "$x_ipv6_on" = "yes"; then
@@ -500,7 +522,8 @@ fi
 
 x_sniffer_on=no; x_debug_on=no
 AC_ARG_ENABLE(sniffer,
-	[  --enable-sniffer        enable IRC traffic sniffer (enables debug mode)],
+	AS_HELP_STRING([--enable-sniffer],
+		       [enable IRC traffic sniffer (enables debug mode)]),
 	if test "$enableval" = "yes"; then
 		AC_DEFINE(SNIFFER, 1)
 		x_sniffer_on=yes; x_debug_on=yes
@@ -510,7 +533,8 @@ AC_ARG_ENABLE(sniffer,
 # enable additional debugging code?
 
 AC_ARG_ENABLE(debug,
-	[  --enable-debug          show additional debug output],
+	AS_HELP_STRING([--enable-debug],
+		       [show additional debug output]),
 	if test "$enableval" = "yes"; then x_debug_on=yes; fi
 )
 if test "$x_debug_on" = "yes"; then
@@ -523,7 +547,8 @@ fi
 
 x_strict_rfc_on=no
 AC_ARG_ENABLE(strict-rfc,
-	[  --enable-strict-rfc     strict RFC conformance -- may break clients!],
+	AS_HELP_STRING([--enable-strict-rfc],
+		       [strict RFC conformance -- may break clients!]),
 	if test "$enableval" = "yes"; then
 		AC_DEFINE(STRICT_RFC, 1)
 		x_strict_rfc_on=yes
@@ -532,9 +557,9 @@ AC_ARG_ENABLE(strict-rfc,
 
 # -- Definitions --
 
-AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
-AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
-AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
+AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
+AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
 
 # Add additional CFLAGS, eventually specified on the command line, but after
 # running this configure script. Useful for "-Werror" for example.
@@ -542,25 +567,27 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
 
 # -- Generate files --
 
-AC_OUTPUT([ \
+AC_CONFIG_FILES([ \
 	Makefile \
+	contrib/Anope/Makefile \
+	contrib/Debian/Makefile \
+	contrib/MacOSX/Makefile \
+	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
+	contrib/Makefile \
 	doc/Makefile \
 	doc/src/Makefile \
-	src/Makefile \
-	src/portab/Makefile \
+	man/Makefile \
 	src/ipaddr/Makefile \
-	src/tool/Makefile \
+	src/Makefile \
 	src/ngircd/Makefile \
+	src/portab/Makefile \
 	src/testsuite/Makefile \
-	man/Makefile \
-	contrib/Makefile \
-	contrib/Anope/Makefile \
-	contrib/Debian/Makefile \
-	contrib/MacOSX/Makefile \
-	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
-	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+	src/tool/Makefile \
 ])
 
+AC_OUTPUT
+
 type dpkg >/dev/null 2>&1
 if test $? -eq 0; then
 	# Generate debian/ link if the dpkg command exists
@@ -582,8 +609,7 @@ C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
 D=`eval echo ${docdir}` ; D=`eval echo ${D}`
 
-echo "             Target: ${target}"
-test "$target" != "$host" && echo "               Host: ${host}"
+echo "               Host: ${host}"
 echo "           Compiler: ${CC}"
 test -n "$CFLAGS"	&& echo "     Compiler flags: ${CFLAGS}"
 test -n "$CPPFLAGS"	&& echo " Preprocessor flags: ${CPPFLAGS}"
blob - 3bf68fb4a22991bfde217b124b956d80d4f4907b
blob + 00f2530ce32e716fb2d186ea9b5f5a6457d4c724
--- doc/Makefile.am
+++ doc/Makefile.am
@@ -10,7 +10,7 @@
 #
 
 .tmpl:
-	sed \
+	$(AM_V_GEN)sed \
 	    -e s@:ETCDIR:@${sysconfdir}@ \
 	    <$< >$@
 
blob - ebe9fcef41f1c6cbe74b143a924ae3743df9095f
blob + 5624e2a1839efa75487975261f36dbb94a7ad98f
--- man/Makefile.am
+++ man/Makefile.am
@@ -17,7 +17,7 @@ TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
 SUFFIXES = .tmpl .
 
 .tmpl:
-	sed \
+	$(AM_V_GEN)sed \
 	    -e s@:SBINDIR:@${sbindir}@ \
 	    -e s@:BINDIR:@${bindir}@ \
 	    -e s@:ETCDIR:@${sysconfdir}@ \
blob - fcbb7cfd77f5e2feaf050935f456f4bc964124cd
blob + 6ce299f2c9afc0b65edfcafd4b27cfc807b317ed
--- src/ipaddr/Makefile.am
+++ src/ipaddr/Makefile.am
@@ -1,5 +1,10 @@
-AUTOMAKE_OPTIONS = ansi2knr
+#
+# ipaddr/Makefile.am
+# (c) 2008 Florian Westphal <fw@strlen.de>, public domain.
+#
 
+AUTOMAKE_OPTIONS = ../portab/ansi2knr
+
 INCLUDES = -I$(srcdir)/../portab
 
 noinst_LIBRARIES = libngipaddr.a
blob - 627e6d3fbf22557d695478ffe2a507b5fafe2a4d
blob + 5853926e4df98dfc02a4c6e80e16f39135b7dca4
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
@@ -18,6 +18,7 @@
 
 #include "imp.h"
 #include <assert.h>
+#include <ctype.h>
 #include <errno.h>
 #ifdef PROTOTYPES
 #	include <stdarg.h>
@@ -34,9 +35,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#ifdef HAVE_CTYPE_H
-# include <ctype.h>
-#endif
 
 #include "array.h"
 #include "ngircd.h"
blob - 6091ebe26a34a8096d2d62cf48e06b06c5dd321d
blob + f4511642c7c7b309c0e302de58cd7e184c172166
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
@@ -45,10 +45,6 @@
 #  include <netinet/in_systm.h>
 # endif
 # include <netinet/ip.h>
-#endif
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h>			/* e.g. for Mac OS X */
 #endif
 
 #ifdef TCPWRAP
blob - 460fcd1e4c1954e80d946d6ac1a08a0ba9e7722e
blob + d79344b5941bcfa59ab61ff4a0acd49131fb4b48
--- src/ngircd/login.c
+++ src/ngircd/login.c
@@ -163,8 +163,8 @@ Login_User_PostAuth(CLIENT *Client)
 		return false;
 	if (!IRC_WriteStrClient
 	    (Client, RPL_YOURHOST_MSG, Client_ID(Client),
-	     Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU,
-	     TARGET_VENDOR, TARGET_OS))
+	     Client_ID(Client_ThisServer()), PACKAGE_VERSION, HOST_CPU,
+	     HOST_VENDOR, HOST_OS))
 		return false;
 	if (!IRC_WriteStrClient
 	    (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr))
blob - e24cefa86d63402c61dc6d81c7adba8e4c4e0d7d
blob + 7397ee024a61b3c4814bf50ceca60472214d7006
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
@@ -406,11 +406,11 @@ Fill_Version( void )
 	if( NGIRCd_VersionAddition[0] )
 		strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition ));
 
-	strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition ));
+	strlcat( NGIRCd_VersionAddition, HOST_CPU, sizeof( NGIRCd_VersionAddition ));
 	strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-	strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition ));
+	strlcat( NGIRCd_VersionAddition, HOST_VENDOR, sizeof( NGIRCd_VersionAddition ));
 	strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-	strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition ));
+	strlcat( NGIRCd_VersionAddition, HOST_OS, sizeof( NGIRCd_VersionAddition ));
 
 	snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s",
 		 PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition);
@@ -716,7 +716,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
 		}
 
 		/* New child process */
-#ifndef NeXT
+#ifdef HAVE_SETSID
 		(void)setsid();
 #else
 		setpgrp(0, getpid());
blob - 90f36a0ea0e586e3b64f6aeb762f73ba7a5f4098
blob + 1c6e3f852aaa02c5b4cbb398803ba9c114ec35b4
--- src/portab/portab.h
+++ src/portab/portab.h
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
  *
  * 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
@@ -120,16 +120,16 @@ typedef unsigned char bool;
 
 /* target constants  */
 
-#ifndef TARGET_OS
-#define TARGET_OS "unknown"
+#ifndef HOST_OS
+#define HOST_OS "unknown"
 #endif
 
-#ifndef TARGET_CPU
-#define TARGET_CPU "unknown"
+#ifndef HOST_CPU
+#define HOST_CPU "unknown"
 #endif
 
-#ifndef TARGET_VENDOR
-#define TARGET_VENDOR "unknown"
+#ifndef HOST_VENDOR
+#define HOST_VENDOR "unknown"
 #endif
 
 
blob - 5f1e97ad056bbebcd0bea8026961e5de500aace7
blob + 8d6cda46656b5d67a6bc8244e6fadd8544b876e9
--- src/tool/Makefile.am
+++ src/tool/Makefile.am
@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 # 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,10 +8,8 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.1 2003/01/13 12:20:16 alex Exp $
-#
 
-AUTOMAKE_OPTIONS = ansi2knr
+AUTOMAKE_OPTIONS = ../portab/ansi2knr
 
 INCLUDES = -I$(srcdir)/../portab