1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

Merge branch 'autoconf-update'

Update GNU autoconf and automake infrastructure.
Tested on modern systems as well as Apple A/UX :-)

* autoconf-update:
  AUTOMAKE_OPTIONS: fix ansi2knr option, include path
  Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC
  Make our own targets "silent", if enabled
  configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE
  Updated config.{guess|sub} to version 2012-08-14
  Make autogen.sh more verbose when VERBOSE=1 is set
  configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
  configure.in: use AS_HELP_STRING macro
  configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
  configure.in: inttypes.h is an optional header file
  Use HAVE_SETSID #define when testing for setsid()
  Don't include <stdint.h>, it is included by "portab.h"
  Don't check type.h availability, it is required
  configure.in: Use AC_CONFIG_FILES macro
  configure.in: Don't use AC_C_PROTOTYPES
  configure.in: Update checks for required and optional features
  configure.in: require autoconf 2.67 and automake 1.11
  configure.in: sort some lists (templates, output, ...)
This commit is contained in:
Alexander Barton 2012-09-16 13:05:23 +02:00
commit 107bfdc821
13 changed files with 179 additions and 130 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# ngIRCd -- The Next Generation IRC Daemon # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -98,6 +98,12 @@ Notfound()
exit 1 exit 1
} }
Run()
{
[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
$@
}
# Reset locale settings to suppress warning messages of Perl # Reset locale settings to suppress warning messages of Perl
unset LC_ALL unset LC_ALL
unset LANG unset LANG
@ -125,13 +131,13 @@ fi
# specifies one: # specifies one:
echo "Searching tools ..." echo "Searching tools ..."
[ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1` [ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
[ "$VERBOSE" = "1" ] && echo "ACLOCAL=$ACLOCAL" [ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
[ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2` [ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
[ "$VERBOSE" = "1" ] && echo "AUTOHEADER=$AUTOHEADER" [ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
[ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1` [ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
[ "$VERBOSE" = "1" ] && echo "AUTOMAKE=$AUTOMAKE" [ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2` [ -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 # Call ./configure when parameters have been passed to this script and
# GO isn't already defined. # GO isn't already defined.
@ -147,10 +153,10 @@ export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
# Generate files # Generate files
echo "Generating files ..." echo "Generating files ..."
$ACLOCAL && \ Run $ACLOCAL && \
$AUTOHEADER && \ Run $AUTOCONF && \
$AUTOMAKE --add-missing && \ Run $AUTOHEADER && \
$AUTOCONF --force Run $AUTOMAKE --add-missing --no-force
if [ $? -eq 0 -a -x ./configure ]; then if [ $? -eq 0 -a -x ./configure ]; then
# Success: if we got some parameters we call ./configure and pass # Success: if we got some parameters we call ./configure and pass

17
config.guess vendored
View File

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc. # 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 # 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 # under the terms of the GNU General Public License as published by
@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}" echo "${machine}-${os}${release}"
exit ;; exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*) *:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@ -801,6 +805,9 @@ EOF
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
@ -1201,6 +1208,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku echo i586-pc-haiku
exit ;; exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*) SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE} echo sx4-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
@ -1256,7 +1266,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*) NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE} echo neo-tandem-nsk${UNAME_RELEASE}
exit ;; exit ;;
NSE-?:NONSTOP_KERNEL:*:*) NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE} echo nse-tandem-nsk${UNAME_RELEASE}
exit ;; exit ;;
NSR-?:NONSTOP_KERNEL:*:*) NSR-?:NONSTOP_KERNEL:*:*)
@ -1330,9 +1340,6 @@ EOF
exit ;; exit ;;
esac 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 eval $set_cc_for_build
cat >$dummy.c <<EOF cat >$dummy.c <<EOF
#ifdef _SEQUENT_ #ifdef _SEQUENT_

23
config.sub vendored
View File

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc. # 2011, 2012 Free Software Foundation, Inc.
timestamp='2012-02-10' timestamp='2012-08-18'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME 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/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 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* | \ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
@ -225,6 +225,12 @@ case $os in
-isc*) -isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;; ;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*) -lynx*)
os=-lynxos os=-lynxos
;; ;;
@ -785,6 +791,10 @@ case $basic_machine in
microblaze) microblaze)
basic_machine=microblaze-xilinx basic_machine=microblaze-xilinx
;; ;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32) mingw32)
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
@ -1346,15 +1356,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1537,6 +1547,9 @@ case $basic_machine in
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;; ;;
hexagon-*)
os=-elf
;;
tic54x-*) tic54x-*)
os=-coff os=-coff
;; ;;

View File

@ -13,39 +13,41 @@ define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d
# -- Initialisation -- # -- Initialisation --
AC_PREREQ(2.50) AC_PREREQ([2.67])
AC_INIT(ngircd, VERSION_ID) AC_INIT([ngIRCd], VERSION_ID,
AC_CONFIG_SRCDIR(src/ngircd/ngircd.c) [ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.6) AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
AC_CONFIG_HEADER(src/config.h) AC_CONFIG_HEADER([src/config.h])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.11])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# -- Templates for config.h -- # -- Templates for config.h --
AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled]) 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([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([SNIFFER], [Define if IRC sniffer should be enabled])
AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant]) 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([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([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([WANT_IPV6], [Define if IPV6 protocol should be enabled])
AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests]) AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
AH_TEMPLATE([PAM], [Define if PAM should be used])
AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
AH_TEMPLATE([TARGET_OS], [Target operating system name]) AH_TEMPLATE([HOST_OS], [Target operating system name])
AH_TEMPLATE([TARGET_VENDOR], [Target system vendor]) AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
AH_TEMPLATE([TARGET_CPU], [Target CPU name]) AH_TEMPLATE([HOST_CPU], [Target CPU name])
# -- C Compiler -- # -- C Compiler --
AC_PROG_CC AC_PROG_CC
AC_PROG_CC_STDC AC_PROG_CC_STDC
AC_C_PROTOTYPES
# -- Helper programs -- # -- Helper programs --
@ -57,9 +59,9 @@ AC_PROG_RANLIB
# -- Compiler Features -- # -- Compiler Features --
AM_C_PROTOTYPES
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
AM_C_PROTOTYPES
# -- Hard coded system and compiler dependencies/features/options ... -- # -- Hard coded system and compiler dependencies/features/options ... --
@ -85,7 +87,7 @@ if test "$GCC" = "yes"; then
GCC_STACK_PROTECT_CC GCC_STACK_PROTECT_CC
fi fi
case "$target_os" in case "$host_os" in
hpux*) hpux*)
# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
# (tested with HP/UX 11.11) # (tested with HP/UX 11.11)
@ -101,28 +103,20 @@ CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
# -- Headers -- # -- Headers --
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_HEADER_TIME
# Required header files
AC_CHECK_HEADERS([ \ AC_CHECK_HEADERS([ \
ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \ fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \
stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \ strings.h sys/socket.h sys/time.h unistd.h \
],,AC_MSG_ERROR([required C header missing!])) ],,AC_MSG_ERROR([required C header missing!]))
AC_CHECK_HEADERS([ \ # Optional header files
arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \ AC_CHECK_HEADERS_ONCE([ \
],[],[],[[ arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \
#ifdef HAVE_SYS_TYPES_H stdint.h varargs.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
]]
)
# -- Datatypes -- # -- Datatypes --
@ -139,33 +133,50 @@ AC_TRY_COMPILE([
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
]) ])
AC_TYPE_PID_T
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_TYPE_SIZE_T 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),, AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
[#include <arpa/inet.h>]) [#include <arpa/inet.h>])
# -- Libraries -- # -- Libraries --
# A/UX needs this. # memmove: A/UX libUTIL
AC_CHECK_LIB(UTIL,memmove) AC_SEARCH_LIBS([memmove], [UTIL], [], [
# needed on solaris. GNU libc also has a libnsl, but we do not need it. AC_MSG_ERROR([unable to find the memmove() function])
AC_SEARCH_LIBS(gethostbyname,nsl) ])
AC_CHECK_LIB(socket,bind) # 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 -- # -- Functions --
AC_FUNC_FORK AC_FUNC_FORK
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
# Required functions
AC_CHECK_FUNCS([ \ AC_CHECK_FUNCS([ \
bind gethostbyaddr gethostbyname gethostname inet_ntoa \ alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
setsid setsockopt socket strcasecmp waitpid],, gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
strchr strcspn strerror strncasecmp strrchr strspn strstr \
],,
AC_MSG_ERROR([required function missing!])) AC_MSG_ERROR([required function missing!]))
AC_CHECK_FUNCS([ \ # Optional functions
gai_strerror getaddrinfo getnameinfo inet_aton sigaction \ AC_CHECK_FUNCS_ONCE([ \
sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r]) gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
# -- Configuration options -- # -- Configuration options --
@ -173,22 +184,20 @@ AC_CHECK_FUNCS([ \
x_syslog_on=no x_syslog_on=no
AC_ARG_WITH(syslog, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
CPPFLAGS="-I$withval/include $CPPFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval/lib $LDFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS"
fi fi
AC_CHECK_LIB(be, syslog) AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
AC_MSG_ERROR([Can't enable syslog!]) AC_MSG_ERROR([Can't enable syslog!])
) ])
fi fi
], ],
[ [ AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
AC_CHECK_LIB(be, syslog)
AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
] ]
) )
if test "$x_syslog_on" = "yes"; then if test "$x_syslog_on" = "yes"; then
@ -200,7 +209,8 @@ fi
x_zlib_on=no x_zlib_on=no
AC_ARG_WITH(zlib, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -227,7 +237,8 @@ fi
x_io_backend=none x_io_backend=none
AC_ARG_WITH(select, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -245,7 +256,8 @@ AC_ARG_WITH(select,
) )
AC_ARG_WITH(poll, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -271,7 +283,8 @@ AC_ARG_WITH(poll,
) )
AC_ARG_WITH(devpoll, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -288,7 +301,8 @@ AC_ARG_WITH(devpoll,
) )
AC_ARG_WITH(epoll, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -306,7 +320,8 @@ AC_ARG_WITH(epoll,
) )
AC_ARG_WITH(kqueue, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -346,7 +361,8 @@ fi
# use SSL? # use SSL?
AC_ARG_WITH(openssl, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -363,7 +379,8 @@ AC_ARG_WITH(openssl,
) )
AC_ARG_WITH(gnutls, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -393,7 +410,8 @@ fi
x_tcpwrap_on=no x_tcpwrap_on=no
AC_ARG_WITH(tcp-wrappers, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -424,7 +442,8 @@ int deny_severity = 0;
x_identauth_on=no x_identauth_on=no
AC_ARG_WITH(ident, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -447,7 +466,8 @@ fi
x_pam_on=no x_pam_on=no
AC_ARG_WITH(pam, 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" != "no"; then
if test "$withval" != "yes"; then if test "$withval" != "yes"; then
CFLAGS="-I$withval/include $CFLAGS" CFLAGS="-I$withval/include $CFLAGS"
@ -474,7 +494,8 @@ fi
x_ircplus_on=yes x_ircplus_on=yes
AC_ARG_ENABLE(ircplus, 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 "$enableval" = "no"; then x_ircplus_on=no; fi
) )
if test "$x_ircplus_on" = "yes"; then if test "$x_ircplus_on" = "yes"; then
@ -484,7 +505,8 @@ fi
# enable support for IPv6? # enable support for IPv6?
x_ipv6_on=no x_ipv6_on=no
AC_ARG_ENABLE(ipv6, 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 "$enableval" = "yes"; then x_ipv6_on=yes; fi
) )
if test "$x_ipv6_on" = "yes"; then if test "$x_ipv6_on" = "yes"; then
@ -500,7 +522,8 @@ fi
x_sniffer_on=no; x_debug_on=no x_sniffer_on=no; x_debug_on=no
AC_ARG_ENABLE(sniffer, 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 if test "$enableval" = "yes"; then
AC_DEFINE(SNIFFER, 1) AC_DEFINE(SNIFFER, 1)
x_sniffer_on=yes; x_debug_on=yes x_sniffer_on=yes; x_debug_on=yes
@ -510,7 +533,8 @@ AC_ARG_ENABLE(sniffer,
# enable additional debugging code? # enable additional debugging code?
AC_ARG_ENABLE(debug, 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 "$enableval" = "yes"; then x_debug_on=yes; fi
) )
if test "$x_debug_on" = "yes"; then if test "$x_debug_on" = "yes"; then
@ -523,7 +547,8 @@ fi
x_strict_rfc_on=no x_strict_rfc_on=no
AC_ARG_ENABLE(strict-rfc, 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 if test "$enableval" = "yes"; then
AC_DEFINE(STRICT_RFC, 1) AC_DEFINE(STRICT_RFC, 1)
x_strict_rfc_on=yes x_strict_rfc_on=yes
@ -532,9 +557,9 @@ AC_ARG_ENABLE(strict-rfc,
# -- Definitions -- # -- Definitions --
AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" ) AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" ) AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" ) AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
# Add additional CFLAGS, eventually specified on the command line, but after # Add additional CFLAGS, eventually specified on the command line, but after
# running this configure script. Useful for "-Werror" for example. # running this configure script. Useful for "-Werror" for example.
@ -542,25 +567,27 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
# -- Generate files -- # -- Generate files --
AC_OUTPUT([ \ AC_CONFIG_FILES([ \
Makefile \ Makefile \
doc/Makefile \
doc/src/Makefile \
src/Makefile \
src/portab/Makefile \
src/ipaddr/Makefile \
src/tool/Makefile \
src/ngircd/Makefile \
src/testsuite/Makefile \
man/Makefile \
contrib/Makefile \
contrib/Anope/Makefile \ contrib/Anope/Makefile \
contrib/Debian/Makefile \ contrib/Debian/Makefile \
contrib/MacOSX/Makefile \ contrib/MacOSX/Makefile \
contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
contrib/MacOSX/ngIRCd.pmdoc/Makefile \ contrib/MacOSX/ngIRCd.pmdoc/Makefile \
contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
contrib/Makefile \
doc/Makefile \
doc/src/Makefile \
man/Makefile \
src/ipaddr/Makefile \
src/Makefile \
src/ngircd/Makefile \
src/portab/Makefile \
src/testsuite/Makefile \
src/tool/Makefile \
]) ])
AC_OUTPUT
type dpkg >/dev/null 2>&1 type dpkg >/dev/null 2>&1
if test $? -eq 0; then if test $? -eq 0; then
# Generate debian/ link if the dpkg command exists # 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}` M=`eval echo ${mandir}` ; M=`eval echo ${M}`
D=`eval echo ${docdir}` ; D=`eval echo ${D}` D=`eval echo ${docdir}` ; D=`eval echo ${D}`
echo " Target: ${target}" echo " Host: ${host}"
test "$target" != "$host" && echo " Host: ${host}"
echo " Compiler: ${CC}" echo " Compiler: ${CC}"
test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}" test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}"
test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}" test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}"

View File

@ -10,7 +10,7 @@
# #
.tmpl: .tmpl:
sed \ $(AM_V_GEN)sed \
-e s@:ETCDIR:@${sysconfdir}@ \ -e s@:ETCDIR:@${sysconfdir}@ \
<$< >$@ <$< >$@

View File

@ -17,7 +17,7 @@ TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
SUFFIXES = .tmpl . SUFFIXES = .tmpl .
.tmpl: .tmpl:
sed \ $(AM_V_GEN)sed \
-e s@:SBINDIR:@${sbindir}@ \ -e s@:SBINDIR:@${sbindir}@ \
-e s@:BINDIR:@${bindir}@ \ -e s@:BINDIR:@${bindir}@ \
-e s@:ETCDIR:@${sysconfdir}@ \ -e s@:ETCDIR:@${sysconfdir}@ \

View File

@ -1,4 +1,9 @@
AUTOMAKE_OPTIONS = ansi2knr #
# ipaddr/Makefile.am
# (c) 2008 Florian Westphal <fw@strlen.de>, public domain.
#
AUTOMAKE_OPTIONS = ../portab/ansi2knr
INCLUDES = -I$(srcdir)/../portab INCLUDES = -I$(srcdir)/../portab

View File

@ -18,6 +18,7 @@
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
#include <ctype.h>
#include <errno.h> #include <errno.h>
#ifdef PROTOTYPES #ifdef PROTOTYPES
# include <stdarg.h> # include <stdarg.h>
@ -34,9 +35,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#ifdef HAVE_CTYPE_H
# include <ctype.h>
#endif
#include "array.h" #include "array.h"
#include "ngircd.h" #include "ngircd.h"

View File

@ -47,10 +47,6 @@
# include <netinet/ip.h> # include <netinet/ip.h>
#endif #endif
#ifdef HAVE_STDINT_H
# include <stdint.h> /* e.g. for Mac OS X */
#endif
#ifdef TCPWRAP #ifdef TCPWRAP
# include <tcpd.h> /* for TCP Wrappers */ # include <tcpd.h> /* for TCP Wrappers */
#endif #endif

View File

@ -163,8 +163,8 @@ Login_User_PostAuth(CLIENT *Client)
return false; return false;
if (!IRC_WriteStrClient if (!IRC_WriteStrClient
(Client, RPL_YOURHOST_MSG, Client_ID(Client), (Client, RPL_YOURHOST_MSG, Client_ID(Client),
Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU, Client_ID(Client_ThisServer()), PACKAGE_VERSION, HOST_CPU,
TARGET_VENDOR, TARGET_OS)) HOST_VENDOR, HOST_OS))
return false; return false;
if (!IRC_WriteStrClient if (!IRC_WriteStrClient
(Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr)) (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr))

View File

@ -406,11 +406,11 @@ Fill_Version( void )
if( NGIRCd_VersionAddition[0] ) if( NGIRCd_VersionAddition[0] )
strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition )); 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, "/", 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, "/", 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", snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s",
PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition); PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition);
@ -716,7 +716,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
} }
/* New child process */ /* New child process */
#ifndef NeXT #ifdef HAVE_SETSID
(void)setsid(); (void)setsid();
#else #else
setpgrp(0, getpid()); setpgrp(0, getpid());

View File

@ -1,6 +1,6 @@
/* /*
* ngIRCd -- The Next Generation IRC Daemon * 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 * 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 * it under the terms of the GNU General Public License as published by
@ -120,16 +120,16 @@ typedef unsigned char bool;
/* target constants */ /* target constants */
#ifndef TARGET_OS #ifndef HOST_OS
#define TARGET_OS "unknown" #define HOST_OS "unknown"
#endif #endif
#ifndef TARGET_CPU #ifndef HOST_CPU
#define TARGET_CPU "unknown" #define HOST_CPU "unknown"
#endif #endif
#ifndef TARGET_VENDOR #ifndef HOST_VENDOR
#define TARGET_VENDOR "unknown" #define HOST_VENDOR "unknown"
#endif #endif

View File

@ -1,6 +1,6 @@
# #
# ngIRCd -- The Next Generation IRC Daemon # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -8,10 +8,8 @@
# (at your option) any later version. # (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information. # 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 INCLUDES = -I$(srcdir)/../portab