2001-12-11 22:53:04 +01:00
|
|
|
#
|
|
|
|
# ngIRCd -- The Next Generation IRC Daemon
|
2014-01-02 15:33:39 +01:00
|
|
|
# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
|
2001-12-11 22:53:04 +01:00
|
|
|
#
|
2003-01-13 13:20:16 +01:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
# Please read the file COPYING, README and AUTHORS for more information.
|
2001-12-11 22:53:04 +01:00
|
|
|
#
|
|
|
|
|
2012-09-24 18:00:36 +02:00
|
|
|
define(VERSION_ID,esyscmd([
|
|
|
|
V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`;
|
|
|
|
[ -z "$V" -a -r configure ] \
|
|
|
|
&& V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2`
|
|
|
|
( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n';
|
|
|
|
]))
|
2010-10-21 00:20:08 +02:00
|
|
|
|
2012-09-24 17:43:02 +02:00
|
|
|
m4_ifdef([AM_SILENT_RULES],
|
|
|
|
[m4_define([ng_color_tests], [color-tests])],
|
|
|
|
[m4_define([ng_color_tests], [])])
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Initialisation --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2014-01-04 23:12:56 +01:00
|
|
|
AC_PREREQ([2.61])
|
2014-01-02 15:33:39 +01:00
|
|
|
AC_INIT([ngIRCd],[VERSION_ID],[ngircd-ml@ngircd.barton.de],[ngircd],[http://ngircd.barton.de/])
|
2012-09-11 14:30:49 +02:00
|
|
|
|
|
|
|
AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
|
|
|
|
AC_CONFIG_HEADER([src/config.h])
|
2012-09-13 00:06:08 +02:00
|
|
|
AC_CANONICAL_HOST
|
2012-09-11 14:30:49 +02:00
|
|
|
|
2012-09-24 17:43:02 +02:00
|
|
|
AM_INIT_AUTOMAKE([-Wall 1.10 ]ng_color_tests)
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2009-08-16 16:08:21 +02:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Templates for config.h --
|
2002-03-10 16:40:26 +01:00
|
|
|
|
|
|
|
AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
|
2012-09-11 14:13:17 +02:00
|
|
|
AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
|
2002-03-10 16:40:26 +01:00
|
|
|
AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
|
2011-03-24 17:09:44 +01:00
|
|
|
AH_TEMPLATE([ICONV], [Define if libiconv can be used, e.g. for CHARCONV])
|
2012-09-11 14:13:17 +02:00
|
|
|
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])
|
2002-03-10 16:40:26 +01:00
|
|
|
AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
|
|
|
|
AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
|
2003-12-26 16:55:07 +01:00
|
|
|
AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
|
|
|
|
AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
|
2008-02-26 23:50:35 +01:00
|
|
|
AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
|
2012-09-11 14:13:17 +02:00
|
|
|
AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
|
2002-03-10 16:40:26 +01:00
|
|
|
|
2012-09-13 00:06:08 +02:00
|
|
|
AH_TEMPLATE([HOST_OS], [Target operating system name])
|
|
|
|
AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
|
|
|
|
AH_TEMPLATE([HOST_CPU], [Target CPU name])
|
2002-03-12 16:19:12 +01:00
|
|
|
|
2001-12-11 22:53:04 +01:00
|
|
|
# -- C Compiler --
|
|
|
|
|
|
|
|
AC_PROG_CC
|
2010-10-24 14:14:30 +02:00
|
|
|
AC_PROG_CC_STDC
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Helper programs --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2012-09-24 20:56:24 +02:00
|
|
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
|
|
|
|
2001-12-27 02:44:49 +01:00
|
|
|
AC_PROG_AWK
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
2001-12-11 22:53:04 +01:00
|
|
|
AC_PROG_MAKE_SET
|
2014-01-17 21:04:10 +01:00
|
|
|
AC_PROG_MKDIR_P
|
2001-12-11 22:53:04 +01:00
|
|
|
AC_PROG_RANLIB
|
|
|
|
|
2002-05-22 11:34:17 +02:00
|
|
|
# -- Compiler Features --
|
|
|
|
|
|
|
|
AC_C_CONST
|
2006-08-05 10:58:16 +02:00
|
|
|
AC_C_INLINE
|
2012-09-23 17:55:48 +02:00
|
|
|
__ng_PROTOTYPES__
|
2002-05-22 11:34:17 +02:00
|
|
|
|
2013-11-12 00:25:28 +01:00
|
|
|
# -- Function Definitions --
|
2003-04-21 12:51:44 +02:00
|
|
|
|
2005-08-30 22:59:30 +02:00
|
|
|
AC_DEFUN([GCC_STACK_PROTECT_CC],[
|
2013-11-12 00:25:28 +01:00
|
|
|
ssp_cc=yes
|
|
|
|
# Use -fstack-protector-all for the test to enfoce the use of the
|
|
|
|
# guard variable
|
|
|
|
AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
|
|
|
|
ssp_old_cflags="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fstack-protector-all"
|
2014-01-02 15:33:39 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[ssp_cc=no])
|
2013-11-12 00:25:28 +01:00
|
|
|
echo $ssp_cc
|
|
|
|
CFLAGS="$ssp_old_cflags"
|
|
|
|
if test "X$ssp_cc" = "Xyes"; then
|
|
|
|
CFLAGS="$CFLAGS -fstack-protector"
|
|
|
|
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
|
|
|
|
fi
|
2005-08-30 22:59:30 +02:00
|
|
|
])
|
|
|
|
|
2013-11-12 00:28:50 +01:00
|
|
|
AC_DEFUN([WORKING_GETADDRINFO],[
|
|
|
|
AC_CHECK_FUNCS([getaddrinfo],[
|
|
|
|
AC_MSG_CHECKING([whether getaddrinfo() works])
|
2014-01-02 15:33:39 +01:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2013-11-12 00:28:50 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
struct addrinfo hints, *ai;
|
|
|
|
memset(&hints, 0, sizeof(hints));
|
|
|
|
hints.ai_flags = AI_PASSIVE;
|
|
|
|
hints.ai_socktype = SOCK_STREAM;
|
|
|
|
hints.ai_family = PF_UNSPEC;
|
|
|
|
if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
|
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
2014-01-02 15:33:39 +01:00
|
|
|
]])],[
|
2013-11-12 00:28:50 +01:00
|
|
|
AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
2014-01-02 15:33:39 +01:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
2013-11-12 00:28:50 +01:00
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2013-11-12 00:25:28 +01:00
|
|
|
# -- Hard coded system and compiler dependencies/features/options ... --
|
|
|
|
|
2006-09-09 19:07:39 +02:00
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
# We are using the GNU C compiler. Good!
|
|
|
|
CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
|
|
|
|
|
|
|
|
GCC_STACK_PROTECT_CC
|
|
|
|
fi
|
2005-08-30 22:59:30 +02:00
|
|
|
|
2012-09-13 00:06:08 +02:00
|
|
|
case "$host_os" in
|
2004-04-11 15:20:24 +02:00
|
|
|
hpux*)
|
|
|
|
# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
|
|
|
|
# (tested with HP/UX 11.11)
|
|
|
|
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# Add additional CFLAGS, eventually specified on the command line:
|
|
|
|
test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
|
2002-11-15 23:08:19 +01:00
|
|
|
|
2013-01-01 19:25:06 +01:00
|
|
|
CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'"
|
2003-04-22 20:44:03 +02:00
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Headers --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
|
|
|
AC_HEADER_STDC
|
2002-05-22 11:34:17 +02:00
|
|
|
AC_HEADER_SYS_WAIT
|
2012-09-11 14:13:17 +02:00
|
|
|
AC_HEADER_TIME
|
2002-05-22 11:34:17 +02:00
|
|
|
|
2012-09-11 14:32:17 +02:00
|
|
|
# Required header files
|
2001-12-27 02:44:49 +01:00
|
|
|
AC_CHECK_HEADERS([ \
|
2013-01-24 22:45:00 +01:00
|
|
|
fcntl.h netdb.h netinet/in.h stdlib.h string.h \
|
2014-03-17 00:47:45 +01:00
|
|
|
strings.h sys/socket.h sys/time.h sys/types.h unistd.h \
|
2001-12-27 03:08:38 +01:00
|
|
|
],,AC_MSG_ERROR([required C header missing!]))
|
2001-12-11 23:04:21 +01:00
|
|
|
|
2012-09-11 14:32:17 +02:00
|
|
|
# Optional header files
|
2012-09-13 18:48:25 +02:00
|
|
|
AC_CHECK_HEADERS_ONCE([ \
|
2013-01-24 22:45:00 +01:00
|
|
|
arpa/inet.h inttypes.h malloc.h netinet/in_systm.h netinet/ip.h \
|
|
|
|
stdbool.h stddef.h stdint.h varargs.h \
|
2012-09-11 14:32:17 +02:00
|
|
|
])
|
2002-04-24 15:33:56 +02:00
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Datatypes --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2001-12-12 02:58:52 +01:00
|
|
|
AC_MSG_CHECKING(whether socklen_t exists)
|
2014-01-02 15:33:39 +01:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
2005-03-19 15:09:32 +01:00
|
|
|
#include <sys/types.h>
|
2005-06-26 15:42:11 +02:00
|
|
|
#include <sys/socket.h>
|
2014-01-02 15:33:39 +01:00
|
|
|
]],[[
|
2001-12-12 02:58:52 +01:00
|
|
|
socklen_t a, b;
|
|
|
|
a = 2; b = 4; a += b;
|
2014-01-02 15:33:39 +01:00
|
|
|
]])],[
|
2001-12-12 02:58:52 +01:00
|
|
|
AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
|
2012-09-11 14:32:17 +02:00
|
|
|
AC_TYPE_PID_T
|
2002-05-22 11:34:17 +02:00
|
|
|
AC_TYPE_SIZE_T
|
2012-09-11 14:32:17 +02:00
|
|
|
AC_TYPE_SSIZE_T
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT8_T
|
2002-05-22 11:34:17 +02:00
|
|
|
|
2009-09-14 01:23:19 +02:00
|
|
|
AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
|
|
|
|
[#include <arpa/inet.h>])
|
|
|
|
|
2002-02-25 12:41:43 +01:00
|
|
|
# -- Libraries --
|
2008-07-09 18:36:40 +02:00
|
|
|
|
2012-09-13 16:40:04 +02:00
|
|
|
# memmove: A/UX libUTIL
|
|
|
|
AC_SEARCH_LIBS([memmove], [UTIL], [], [
|
|
|
|
AC_MSG_ERROR([unable to find the memmove() function])
|
|
|
|
])
|
|
|
|
# gethostbyname: Solaris libnsl
|
2012-10-11 16:50:45 +02:00
|
|
|
AC_SEARCH_LIBS([gethostbyname], [bind nsl network], [], [
|
2012-09-13 16:40:04 +02:00
|
|
|
AC_MSG_ERROR([unable to find the gethostbyname() function])
|
|
|
|
])
|
|
|
|
# bind: SVR4 libsocket
|
2012-10-11 16:50:45 +02:00
|
|
|
AC_SEARCH_LIBS([bind], [socket network], [], [
|
2012-09-13 16:40:04 +02:00
|
|
|
AC_MSG_ERROR([unable to find the bind() function])
|
|
|
|
])
|
2002-02-25 12:41:43 +01:00
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Functions --
|
2001-12-27 02:44:49 +01:00
|
|
|
|
2002-05-22 11:34:17 +02:00
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_FUNC_STRFTIME
|
|
|
|
|
2012-09-11 14:32:17 +02:00
|
|
|
# Required functions
|
2001-12-27 02:44:49 +01:00
|
|
|
AC_CHECK_FUNCS([ \
|
2012-09-11 14:32:17 +02:00
|
|
|
alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
|
|
|
|
gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
|
|
|
|
strchr strcspn strerror strncasecmp strrchr strspn strstr \
|
|
|
|
],,
|
2011-11-06 14:16:59 +01:00
|
|
|
AC_MSG_ERROR([required function missing!]))
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2012-09-11 14:32:17 +02:00
|
|
|
# Optional functions
|
2013-11-12 00:28:50 +01:00
|
|
|
AC_CHECK_FUNCS_ONCE([
|
|
|
|
arc4random arc4random_stir gai_strerror getnameinfo inet_aton \
|
2015-06-06 22:19:47 +02:00
|
|
|
setgroups sigaction sigprocmask snprintf strdup strlcat strlcpy \
|
|
|
|
strndup strtok_r unsetenv vsnprintf waitpid])
|
2002-12-28 16:17:46 +01:00
|
|
|
|
2013-11-12 00:28:50 +01:00
|
|
|
WORKING_GETADDRINFO
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Configuration options --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# use syslog?
|
|
|
|
|
2002-09-07 19:59:08 +02:00
|
|
|
x_syslog_on=no
|
2003-03-07 15:37:30 +01:00
|
|
|
AC_ARG_WITH(syslog,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-syslog],
|
|
|
|
[disable syslog (autodetected by default)]),
|
2005-03-20 18:23:36 +01:00
|
|
|
[ 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
|
2012-09-13 16:40:04 +02:00
|
|
|
AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
|
2003-03-07 15:37:30 +01:00
|
|
|
AC_MSG_ERROR([Can't enable syslog!])
|
2012-09-13 16:40:04 +02:00
|
|
|
])
|
2001-12-27 02:44:49 +01:00
|
|
|
fi
|
|
|
|
],
|
2012-09-13 16:40:04 +02:00
|
|
|
[ AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
|
2003-03-07 15:37:30 +01:00
|
|
|
]
|
2001-12-27 02:44:49 +01:00
|
|
|
)
|
2002-09-07 19:59:08 +02:00
|
|
|
if test "$x_syslog_on" = "yes"; then
|
2003-12-26 16:55:07 +01:00
|
|
|
AC_DEFINE(SYSLOG, 1)
|
2004-05-15 14:24:30 +02:00
|
|
|
AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
|
2002-09-07 19:59:08 +02:00
|
|
|
fi
|
2001-12-27 02:44:49 +01:00
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# use zlib compression?
|
|
|
|
|
2002-11-27 00:05:06 +01:00
|
|
|
x_zlib_on=no
|
2003-03-07 15:37:30 +01:00
|
|
|
AC_ARG_WITH(zlib,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-zlib],
|
|
|
|
[disable zlib compression (autodetected by default)]),
|
2005-03-20 18:23:36 +01:00
|
|
|
[ 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
|
2003-03-07 15:37:30 +01:00
|
|
|
AC_CHECK_LIB(z, deflate)
|
|
|
|
AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
|
|
|
|
AC_MSG_ERROR([Can't enable zlib!])
|
2002-11-27 00:05:06 +01:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
],
|
2003-03-07 15:37:30 +01:00
|
|
|
[ AC_CHECK_LIB(z, deflate)
|
|
|
|
AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
|
|
|
|
]
|
2002-11-27 00:05:06 +01:00
|
|
|
)
|
|
|
|
if test "$x_zlib_on" = "yes"; then
|
2003-12-26 16:55:07 +01:00
|
|
|
AC_DEFINE(ZLIB, 1)
|
2004-05-15 14:24:30 +02:00
|
|
|
AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
|
2002-11-27 00:05:06 +01:00
|
|
|
fi
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# detect which IO API to use:
|
|
|
|
|
|
|
|
x_io_backend=none
|
|
|
|
|
|
|
|
AC_ARG_WITH(select,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-select],
|
|
|
|
[disable select IO support (autodetected by default)]),
|
2006-12-26 17:00:45 +01:00
|
|
|
[ 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_FUNCS(select, x_io_select=yes,
|
|
|
|
AC_MSG_ERROR([Can't enable select IO support!])
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_CHECK_FUNCS(select, x_io_select=yes)
|
|
|
|
]
|
|
|
|
)
|
2005-07-07 20:49:58 +02:00
|
|
|
|
2006-09-16 17:00:09 +02:00
|
|
|
AC_ARG_WITH(poll,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-poll],
|
|
|
|
[disable poll support (autodetected by default)]),
|
2006-09-16 17:00:09 +02:00
|
|
|
[ 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
|
2011-12-05 00:19:32 +01:00
|
|
|
AC_CHECK_FUNCS(poll, [
|
2011-11-25 21:56:33 +01:00
|
|
|
AC_CHECK_HEADERS(poll.h,
|
|
|
|
x_io_backend=poll\(\),
|
|
|
|
AC_MSG_ERROR(
|
2011-12-05 00:19:32 +01:00
|
|
|
[Can't enable poll IO support!])
|
2011-11-25 21:56:33 +01:00
|
|
|
)
|
2011-12-05 00:19:32 +01:00
|
|
|
], [
|
|
|
|
AC_MSG_ERROR([Can't enable poll IO support!])
|
|
|
|
])
|
2006-09-16 17:00:09 +02:00
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
2011-12-05 00:19:32 +01:00
|
|
|
AC_CHECK_FUNCS(poll, [
|
2011-11-25 21:56:33 +01:00
|
|
|
AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
|
2011-12-05 00:19:32 +01:00
|
|
|
])
|
2006-09-16 17:00:09 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2006-09-17 12:41:06 +02:00
|
|
|
AC_ARG_WITH(devpoll,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-devpoll],
|
|
|
|
[disable /dev/poll IO support (autodetected by default)]),
|
2006-09-17 12:41:06 +02:00
|
|
|
[ 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_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
2006-12-26 17:00:45 +01:00
|
|
|
AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
|
2006-09-17 12:41:06 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2005-07-07 20:49:58 +02:00
|
|
|
AC_ARG_WITH(epoll,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-epoll],
|
|
|
|
[disable epoll IO support (autodetected by default)]),
|
2005-07-07 20:49:58 +02:00
|
|
|
[ 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
|
2006-12-26 17:00:45 +01:00
|
|
|
AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes,
|
|
|
|
AC_MSG_ERROR([Can't enable epoll IO support!])
|
2005-07-07 20:49:58 +02:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
2006-12-26 17:00:45 +01:00
|
|
|
AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
|
2005-07-07 20:49:58 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(kqueue,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--without-kqueue],
|
|
|
|
[disable kqueue IO support (autodetected by default)]),
|
2005-07-07 20:49:58 +02:00
|
|
|
[ 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
|
2006-09-17 12:41:06 +02:00
|
|
|
AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\),
|
2006-12-26 17:00:45 +01:00
|
|
|
AC_MSG_ERROR([Can't enable kqueue IO support!])
|
2005-07-07 20:49:58 +02:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[
|
2006-09-17 12:41:06 +02:00
|
|
|
AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
|
2005-07-07 20:49:58 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
|
|
|
|
# when epoll() and select() are available, we'll use both!
|
|
|
|
x_io_backend="epoll(), select()"
|
|
|
|
else
|
|
|
|
if test "$x_io_epoll" = "yes"; then
|
|
|
|
# we prefere epoll() if it is available
|
|
|
|
x_io_backend="epoll()"
|
|
|
|
else
|
|
|
|
if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
|
|
|
|
# we'll use select, when available and no "better"
|
|
|
|
# interface has been detected ...
|
|
|
|
x_io_backend="select()"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$x_io_backend" = "none"; then
|
2011-12-30 00:50:27 +01:00
|
|
|
AC_MSG_ERROR([No useable IO API activated/found!?])
|
2006-12-26 17:00:45 +01:00
|
|
|
fi
|
|
|
|
|
2008-09-13 15:10:32 +02:00
|
|
|
# use SSL?
|
|
|
|
|
|
|
|
AC_ARG_WITH(openssl,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--with-openssl],
|
|
|
|
[enable SSL support using OpenSSL]),
|
2009-09-02 14:28:09 +02:00
|
|
|
[ if test "$withval" != "no"; then
|
2008-09-13 15:10:32 +02:00
|
|
|
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,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--with-gnutls],
|
|
|
|
[enable SSL support using gnutls]),
|
2009-09-02 14:28:09 +02:00
|
|
|
[ if test "$withval" != "no"; then
|
2008-09-13 15:10:32 +02:00
|
|
|
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
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# use TCP wrappers?
|
2005-07-07 20:49:58 +02:00
|
|
|
|
2003-03-07 15:37:30 +01:00
|
|
|
x_tcpwrap_on=no
|
|
|
|
AC_ARG_WITH(tcp-wrappers,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--with-tcp-wrappers],
|
|
|
|
[enable TCP wrappers support]),
|
2005-03-20 18:23:36 +01:00
|
|
|
[ 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
|
2003-03-19 18:27:05 +01:00
|
|
|
AC_MSG_CHECKING(for hosts_access)
|
2014-01-17 16:10:34 +01:00
|
|
|
saved_LIBS="$LIBS"
|
2005-03-21 23:15:15 +01:00
|
|
|
LIBS="-lwrap $LIBS"
|
2014-01-17 16:10:34 +01:00
|
|
|
LIBS_END="-lwrap $LIBS_END"
|
2014-01-02 15:33:39 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
2014-01-17 16:18:55 +01:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2005-03-21 23:15:15 +01:00
|
|
|
#include <tcpd.h>
|
|
|
|
int allow_severity = 0;
|
|
|
|
int deny_severity = 0;
|
2014-01-02 15:33:39 +01:00
|
|
|
]],[[
|
2005-03-21 23:15:15 +01:00
|
|
|
tcpd_warn("link test");
|
2014-01-02 15:33:39 +01:00
|
|
|
]])],[
|
2003-03-07 15:37:30 +01:00
|
|
|
AC_MSG_RESULT(yes)
|
2003-12-26 16:55:07 +01:00
|
|
|
AC_DEFINE(TCPWRAP, 1)
|
2003-03-07 15:37:30 +01:00
|
|
|
x_tcpwrap_on=yes
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR([Can't enable TCP wrappers!])
|
|
|
|
])
|
2014-01-17 16:10:34 +01:00
|
|
|
LIBS="$saved_LIBS"
|
2003-03-07 15:37:30 +01:00
|
|
|
fi
|
|
|
|
]
|
2001-12-29 04:04:06 +01:00
|
|
|
)
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# do IDENT requests using libident?
|
|
|
|
|
2003-12-27 14:01:12 +01:00
|
|
|
x_identauth_on=no
|
|
|
|
AC_ARG_WITH(ident,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--with-ident],
|
|
|
|
[enable "IDENT" ("AUTH") protocol support]),
|
2005-03-20 18:23:36 +01:00
|
|
|
[ 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
|
2003-12-27 14:01:12 +01:00
|
|
|
AC_CHECK_LIB(ident, ident_id)
|
|
|
|
AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
|
|
|
|
AC_MSG_ERROR([Can't enable IDENT support!])
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
if test "$x_identauth_on" = "yes"; then
|
|
|
|
AC_DEFINE(IDENTAUTH, 1)
|
2004-05-15 14:24:30 +02:00
|
|
|
AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
|
2003-12-27 14:01:12 +01:00
|
|
|
fi
|
|
|
|
|
2010-07-11 17:01:45 +02:00
|
|
|
# compile in PAM support?
|
|
|
|
|
|
|
|
x_pam_on=no
|
|
|
|
AC_ARG_WITH(pam,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--with-pam],
|
|
|
|
[enable user authentication using PAM]),
|
2010-07-11 17:01:45 +02:00
|
|
|
[ 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(pam, pam_authenticate)
|
|
|
|
AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
|
|
|
|
AC_MSG_ERROR([Can't enable PAM support!])
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
]
|
|
|
|
)
|
|
|
|
if test "$x_pam_on" = "yes"; then
|
|
|
|
AC_DEFINE(PAM, 1)
|
|
|
|
AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
|
|
|
|
if test "$pam_ok" != "yes"; then
|
|
|
|
AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
|
|
|
|
AC_MSG_ERROR([required C header missing!]))
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# compile in IRC+ protocol support?
|
|
|
|
|
2003-03-07 15:37:30 +01:00
|
|
|
x_ircplus_on=yes
|
|
|
|
AC_ARG_ENABLE(ircplus,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--disable-ircplus],
|
|
|
|
[disable IRC+ protocol]),
|
2003-03-07 15:37:30 +01:00
|
|
|
if test "$enableval" = "no"; then x_ircplus_on=no; fi
|
|
|
|
)
|
|
|
|
if test "$x_ircplus_on" = "yes"; then
|
|
|
|
AC_DEFINE(IRCPLUS, 1)
|
2011-03-24 17:09:44 +01:00
|
|
|
|
|
|
|
# Compile in iconv support?
|
|
|
|
# We only check for it when IRC+ is enabled, because the IRC+ command
|
|
|
|
# CHARCONV is the only function depending on it.
|
|
|
|
x_iconv_on=no
|
|
|
|
AC_ARG_WITH(iconv,
|
2013-01-06 17:46:06 +01:00
|
|
|
AS_HELP_STRING([--with-iconv],
|
2013-02-15 21:26:47 +01:00
|
|
|
[enable character conversion using libiconv]),
|
2011-03-24 17:09:44 +01:00
|
|
|
[ 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(iconv, iconv_open)
|
2013-03-18 12:45:32 +01:00
|
|
|
AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes)
|
|
|
|
if test "$x_iconv_on" != "yes"; then
|
2013-02-15 21:32:08 +01:00
|
|
|
AC_CHECK_LIB(iconv, libiconv_open)
|
2013-03-18 12:45:32 +01:00
|
|
|
AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes)
|
|
|
|
fi
|
|
|
|
if test "$x_iconv_on" != "yes"; then
|
|
|
|
AC_MSG_ERROR([Can't enable libiconv support!])
|
|
|
|
fi
|
|
|
|
fi ]
|
2011-03-24 17:09:44 +01:00
|
|
|
)
|
|
|
|
if test "$x_iconv_on" = "yes"; then
|
|
|
|
AC_DEFINE(ICONV, 1)
|
|
|
|
fi
|
2003-03-07 15:37:30 +01:00
|
|
|
fi
|
|
|
|
|
2008-02-26 23:50:35 +01:00
|
|
|
# enable support for IPv6?
|
|
|
|
x_ipv6_on=no
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--enable-ipv6],
|
|
|
|
[enable IPv6 protocol support]),
|
2008-02-26 23:50:35 +01:00
|
|
|
if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
|
|
|
|
)
|
|
|
|
if test "$x_ipv6_on" = "yes"; then
|
2009-09-14 00:25:48 +02:00
|
|
|
# getaddrinfo() and getnameinfo() are optional when not compiling
|
|
|
|
# with IPv6 support, but are required for IPv6 to work!
|
2008-02-26 23:50:35 +01:00
|
|
|
AC_CHECK_FUNCS([ \
|
|
|
|
getaddrinfo getnameinfo \
|
|
|
|
],,AC_MSG_ERROR([required function missing for IPv6 support!]))
|
|
|
|
AC_DEFINE(WANT_IPV6, 1)
|
|
|
|
fi
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# compile in IRC "sniffer"?
|
|
|
|
|
2003-02-23 13:03:10 +01:00
|
|
|
x_sniffer_on=no; x_debug_on=no
|
2001-12-25 23:01:47 +01:00
|
|
|
AC_ARG_ENABLE(sniffer,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--enable-sniffer],
|
|
|
|
[enable IRC traffic sniffer (enables debug mode)]),
|
2001-12-22 00:54:15 +01:00
|
|
|
if test "$enableval" = "yes"; then
|
2001-12-25 23:01:47 +01:00
|
|
|
AC_DEFINE(SNIFFER, 1)
|
2002-09-07 19:59:08 +02:00
|
|
|
x_sniffer_on=yes; x_debug_on=yes
|
2001-12-22 00:54:15 +01:00
|
|
|
fi
|
|
|
|
)
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# enable additional debugging code?
|
|
|
|
|
2002-01-02 14:41:36 +01:00
|
|
|
AC_ARG_ENABLE(debug,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--enable-debug],
|
|
|
|
[show additional debug output]),
|
2002-01-02 14:41:36 +01:00
|
|
|
if test "$enableval" = "yes"; then x_debug_on=yes; fi
|
|
|
|
)
|
|
|
|
if test "$x_debug_on" = "yes"; then
|
|
|
|
AC_DEFINE(DEBUG, 1)
|
2004-03-11 23:21:20 +01:00
|
|
|
test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
|
2008-08-13 16:00:57 +02:00
|
|
|
AC_CHECK_FUNCS(mtrace)
|
2002-01-02 14:41:36 +01:00
|
|
|
fi
|
|
|
|
|
2006-12-26 17:00:45 +01:00
|
|
|
# enable "strict RFC rules"?
|
|
|
|
|
2003-02-23 13:03:10 +01:00
|
|
|
x_strict_rfc_on=no
|
2002-09-07 19:59:08 +02:00
|
|
|
AC_ARG_ENABLE(strict-rfc,
|
2012-09-13 00:25:09 +02:00
|
|
|
AS_HELP_STRING([--enable-strict-rfc],
|
|
|
|
[strict RFC conformance -- may break clients!]),
|
2002-09-07 19:59:08 +02:00
|
|
|
if test "$enableval" = "yes"; then
|
|
|
|
AC_DEFINE(STRICT_RFC, 1)
|
|
|
|
x_strict_rfc_on=yes
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
# -- Definitions --
|
2002-03-12 16:19:12 +01:00
|
|
|
|
2012-09-13 00:06:08 +02:00
|
|
|
AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
|
|
|
|
AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
|
|
|
|
AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
|
2002-03-12 16:19:12 +01:00
|
|
|
|
2014-01-17 16:10:34 +01:00
|
|
|
# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command
|
|
|
|
# line or by some tests from above, but after running this script. Useful for
|
|
|
|
# adding "-Werror", for example:
|
2004-03-11 23:21:20 +01:00
|
|
|
test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
|
2014-01-17 16:10:34 +01:00
|
|
|
test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END"
|
|
|
|
test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
|
2002-03-10 18:03:18 +01:00
|
|
|
|
2004-02-29 18:19:43 +01:00
|
|
|
# -- Generate files --
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2012-09-11 14:36:02 +02:00
|
|
|
AC_CONFIG_FILES([ \
|
2001-12-31 17:02:30 +01:00
|
|
|
Makefile \
|
2012-09-11 14:13:17 +02:00
|
|
|
contrib/Debian/Makefile \
|
|
|
|
contrib/MacOSX/Makefile \
|
|
|
|
contrib/MacOSX/ngIRCd.pmdoc/Makefile \
|
|
|
|
contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
|
|
|
|
contrib/Makefile \
|
2001-12-31 17:02:30 +01:00
|
|
|
doc/Makefile \
|
2005-07-22 23:02:22 +02:00
|
|
|
doc/src/Makefile \
|
2012-09-11 14:13:17 +02:00
|
|
|
man/Makefile \
|
2008-02-26 23:50:35 +01:00
|
|
|
src/ipaddr/Makefile \
|
2012-09-11 14:13:17 +02:00
|
|
|
src/Makefile \
|
2001-12-31 17:02:30 +01:00
|
|
|
src/ngircd/Makefile \
|
2012-09-11 14:13:17 +02:00
|
|
|
src/portab/Makefile \
|
2002-09-09 12:00:15 +02:00
|
|
|
src/testsuite/Makefile \
|
2012-09-11 14:13:17 +02:00
|
|
|
src/tool/Makefile \
|
2001-12-31 17:02:30 +01:00
|
|
|
])
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2012-09-11 14:36:02 +02:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2004-03-11 23:21:20 +01:00
|
|
|
type dpkg >/dev/null 2>&1
|
|
|
|
if test $? -eq 0; then
|
|
|
|
# Generate debian/ link if the dpkg command exists
|
|
|
|
# (read: if we are running on a debian compatible system)
|
|
|
|
echo "creating Debian-specific links ..."
|
2014-01-26 23:40:58 +01:00
|
|
|
if test ! -f debian/rules -a -f contrib/Debian/rules; then
|
|
|
|
ln -s contrib/Debian debian
|
|
|
|
fi
|
2004-03-11 23:21:20 +01:00
|
|
|
fi
|
|
|
|
|
2003-03-07 15:37:30 +01:00
|
|
|
# -- Result --
|
2002-09-07 19:59:08 +02:00
|
|
|
|
2003-03-07 15:37:30 +01:00
|
|
|
echo
|
2005-05-21 23:34:47 +02:00
|
|
|
echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
|
2002-09-07 19:59:08 +02:00
|
|
|
echo
|
|
|
|
|
|
|
|
# Someone please show me a better way :) [borrowed by OpenSSH]
|
|
|
|
B=`eval echo ${bindir}` ; B=`eval echo ${B}`
|
|
|
|
S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
|
|
|
|
C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
|
|
|
|
M=`eval echo ${mandir}` ; M=`eval echo ${M}`
|
2010-08-17 15:59:54 +02:00
|
|
|
D=`eval echo ${docdir}` ; D=`eval echo ${D}`
|
2002-09-07 19:59:08 +02:00
|
|
|
|
2012-09-13 00:06:08 +02:00
|
|
|
echo " Host: ${host}"
|
2003-03-07 15:37:30 +01:00
|
|
|
echo " Compiler: ${CC}"
|
2004-03-11 23:21:20 +01:00
|
|
|
test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}"
|
2003-04-21 12:51:44 +02:00
|
|
|
test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}"
|
|
|
|
test -n "$LDFLAGS" && echo " Linker flags: ${LDFLAGS}"
|
|
|
|
test -n "$LIBS" && echo " Libraries: ${LIBS}"
|
2002-09-07 19:59:08 +02:00
|
|
|
echo
|
2003-03-07 15:37:30 +01:00
|
|
|
echo " 'ngircd' binary: $S"
|
|
|
|
echo " Configuration file: $C"
|
|
|
|
echo " Manual pages: $M"
|
2003-03-30 15:46:00 +02:00
|
|
|
echo " Documentation: $D"
|
2002-09-07 19:59:08 +02:00
|
|
|
echo
|
|
|
|
|
2003-03-07 15:37:30 +01:00
|
|
|
echo $ECHO_N " Syslog support: $ECHO_C"
|
2003-04-21 12:51:44 +02:00
|
|
|
test "$x_syslog_on" = "yes" \
|
2005-07-08 18:18:38 +02:00
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2003-03-07 15:37:30 +01:00
|
|
|
echo $ECHO_N " Enable debug code: $ECHO_C"
|
2003-04-21 12:51:44 +02:00
|
|
|
test "$x_debug_on" = "yes" \
|
|
|
|
&& echo "yes" \
|
|
|
|
|| echo "no"
|
|
|
|
|
|
|
|
echo $ECHO_N " zlib compression: $ECHO_C"
|
|
|
|
test "$x_zlib_on" = "yes" \
|
2005-07-08 18:18:38 +02:00
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2003-03-07 15:37:30 +01:00
|
|
|
echo $ECHO_N " IRC sniffer: $ECHO_C"
|
2003-04-21 12:51:44 +02:00
|
|
|
test "$x_sniffer_on" = "yes" \
|
|
|
|
&& echo "yes" \
|
|
|
|
|| echo "no"
|
|
|
|
|
|
|
|
echo $ECHO_N " Use TCP Wrappers: $ECHO_C"
|
|
|
|
test "$x_tcpwrap_on" = "yes" \
|
2005-07-08 18:18:38 +02:00
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2003-03-07 15:37:30 +01:00
|
|
|
echo $ECHO_N " Strict RFC mode: $ECHO_C"
|
2003-04-21 12:51:44 +02:00
|
|
|
test "$x_strict_rfc_on" = "yes" \
|
|
|
|
&& echo "yes" \
|
|
|
|
|| echo "no"
|
|
|
|
|
2011-01-09 23:51:30 +01:00
|
|
|
echo $ECHO_N " IDENT support: $ECHO_C"
|
|
|
|
test "$x_identauth_on" = "yes" \
|
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2003-03-07 15:37:30 +01:00
|
|
|
echo $ECHO_N " IRC+ protocol: $ECHO_C"
|
2003-04-21 12:51:44 +02:00
|
|
|
test "$x_ircplus_on" = "yes" \
|
|
|
|
&& echo "yes" \
|
|
|
|
|| echo "no"
|
2003-12-27 14:01:12 +01:00
|
|
|
|
2011-01-09 23:51:30 +01:00
|
|
|
echo $ECHO_N " IPv6 protocol: $ECHO_C"
|
|
|
|
test "$x_ipv6_on" = "yes" \
|
2005-07-08 18:18:38 +02:00
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2005-07-07 20:49:58 +02:00
|
|
|
echo $ECHO_N " I/O backend: $ECHO_C"
|
2013-08-11 11:38:10 +02:00
|
|
|
echo "$x_io_backend"
|
2003-12-27 14:01:12 +01:00
|
|
|
|
2011-01-09 23:51:30 +01:00
|
|
|
echo $ECHO_N " PAM support: $ECHO_C"
|
|
|
|
test "$x_pam_on" = "yes" \
|
2010-08-25 00:02:06 +02:00
|
|
|
&& echo $ECHO_N "yes $ECHO_C" \
|
|
|
|
|| echo $ECHO_N "no $ECHO_C"
|
2008-09-13 15:10:32 +02:00
|
|
|
echo $ECHO_N " SSL support: $ECHO_C"
|
|
|
|
echo "$x_ssl_lib"
|
|
|
|
|
2011-03-24 17:09:44 +01:00
|
|
|
echo $ECHO_N " libiconv support: $ECHO_C"
|
|
|
|
echo "$x_iconv_on"
|
|
|
|
|
2005-07-08 18:18:38 +02:00
|
|
|
echo
|
2002-09-07 19:59:08 +02:00
|
|
|
|
2013-01-05 03:05:56 +01:00
|
|
|
define(_automake_regex_,[[^AUTOMAKE_OPTIONS = [a-z .\-]*/portab/ansi2knr]])
|
|
|
|
if ! grep "_automake_regex_" src/ngircd/Makefile.am >/dev/null 2>&1; then
|
2012-09-23 17:55:48 +02:00
|
|
|
echo "WARNING:"
|
|
|
|
echo "This GNU automake generated build system does not support \"de-ANSI-fication\","
|
|
|
|
echo "therefore don't use it to generate \"official\" distribution archives!"
|
|
|
|
echo "(Most probably you want to use GNU automake 1.11.x for this purpose ...)"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2001-12-11 22:53:04 +01:00
|
|
|
# -eof-
|