2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
5 # Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6 # der GNU General Public License (GPL), wie von der Free Software Foundation
7 # herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8 # der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10 # der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
12 # $Id: configure.in,v 1.56 2002/09/07 17:59:08 alex Exp $
15 # -- Initialisierung --
20 AC_CONFIG_SRCDIR(src/config.h.in)
21 AM_INIT_AUTOMAKE(ngircd,CurrentCVS)
22 AM_CONFIG_HEADER(src/config.h)
24 # -- Templates fuer config.h --
26 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
27 AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
28 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
29 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
30 AH_TEMPLATE([USE_SYSLOG], [Define if syslog should be used for logging])
31 AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
33 AH_TEMPLATE([TARGET_OS], [Target operating system name])
34 AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
35 AH_TEMPLATE([TARGET_CPU], [Target CPU name])
41 # -- Hilfsprogramme --
49 # -- Compiler Features --
65 ctype.h errno.h fcntl.h netdb.h netinet/in.h stdlib.h string.h \
66 strings.h sys/socket.h sys/time.h unistd.h \
67 ],,AC_MSG_ERROR([required C header missing!]))
69 AC_CHECK_HEADERS(arpa/inet.h malloc.h stdint.h varargs.h)
73 AC_MSG_CHECKING(whether socklen_t exists)
75 #include <sys/socket.h>
76 #include <sys/types.h>
81 AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
92 AC_CHECK_LIB(UTIL,memmove)
93 AC_CHECK_LIB(socket,bind)
94 AC_CHECK_LIB(nsl,gethostent)
105 bind gethostbyaddr gethostbyname gethostname inet_ntoa memmove \
106 memset select setsockopt socket strcasecmp strchr strerror \
108 ],,AC_MSG_ERROR([required function missing!]))
110 AC_CHECK_FUNCS(inet_aton sigaction snprintf vsnprintf)
112 # -- Konfigurationsoptionen --
115 AC_ARG_ENABLE(syslog,
116 [ --disable-syslog disable syslog (autodetected by default)],
117 [ if test "$enableval" = "yes"; then
118 AC_CHECK_HEADER(syslog.h, x_syslog_on=yes,
119 AC_MSG_ERROR([Can't enable syslog: syslog.h not found!])
123 [ AC_CHECK_HEADER(syslog.h, x_syslog_on=yes) ]
125 if test "$x_syslog_on" = "yes"; then
126 AC_DEFINE(USE_SYSLOG, 1)
127 AC_CHECK_LIB(be,syslog)
131 AC_ARG_ENABLE(ircplus,
132 [ --disable-ircplus disable IRC+ protocol],
133 if test "$enableval" = "no"; then x_ircplus_on=no; fi
135 if test "$x_ircplus_on" = "yes"; then
136 AC_DEFINE(IRCPLUS, 1)
139 AC_ARG_ENABLE(sniffer,
140 [ --enable-sniffer enable IRC traffic sniffer (enables debug mode)],
141 if test "$enableval" = "yes"; then
142 AC_DEFINE(SNIFFER, 1)
143 x_sniffer_on=yes; x_debug_on=yes
148 [ --enable-debug show additional debug output],
149 if test "$enableval" = "yes"; then x_debug_on=yes; fi
151 if test "$x_debug_on" = "yes"; then
155 AC_ARG_ENABLE(strict-rfc,
156 [ --enable-strict-rfc strict RFC conformance -- may break clients!],
157 if test "$enableval" = "yes"; then
158 AC_DEFINE(STRICT_RFC, 1)
166 AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
167 AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
168 AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
170 if test `uname` = "A/UX"; then
171 # unter A/UX sollte _POSIX_SOURCE definiert sein.
172 AC_MSG_RESULT([detected A/UX, defining _POSIX_SOURCE])
173 CFLAGS="$CFLAGS -D_POSIX_SOURCE"
178 if test "$GCC" = "yes"; then
179 CFLAGS="-Wall $CFLAGS"
182 CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
184 # -- Ausgabe der Dateien --
191 MacOSX/ngircd.pbproj/Makefile \
193 src/portab/Makefile \
194 src/ngircd/Makefile \
202 # Someone please show me a better way :) [borrowed by OpenSSH]
203 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
204 S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
205 C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
206 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
208 echo " host: ${host}"
209 echo " compiler: ${CC}"
210 echo " compiler flags: ${CFLAGS}"
211 echo " preprocessor flags: ${CPPFLAGS}"
212 echo " linker flags: ${LDFLAGS}"
213 echo " libraries: ${LIBS}"
216 echo " 'ngircd' binary: $S"
217 echo " configuration file: $C"
218 echo " manual pages: $M"
221 echo $ECHO_N " active options: $ECHO_C"
222 test "$x_syslog_on" = "yes" && echo $ECHO_N "Syslog $ECHO_C"
223 test "$x_debug_on" = "yes" && echo $ECHO_N "Debug $ECHO_C"
224 test "$x_sniffer_on" = "yes" && echo $ECHO_N "Sniffer $ECHO_C"
225 test "$x_strict_rfc_on" = "yes" && echo $ECHO_N "Strict-RFC $ECHO_C"
226 test "$x_ircplus_on" = "yes" && echo $ECHO_N "IRC+ $ECHO_C"