]> arthur.barton.de Git - ngircd-alex.git/blob - configure.in
Add new 'delayed' signal handlers.
[ngircd-alex.git] / configure.in
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2010 Alexander Barton <alex@barton.de>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
10 #
11
12 # -- Initialisation --
13
14 AC_PREREQ(2.50)
15 AC_INIT(ngircd, 16)
16 AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
17 AC_CANONICAL_TARGET
18 AM_INIT_AUTOMAKE(1.6)
19 AM_CONFIG_HEADER(src/config.h)
20
21 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
22
23 # -- Templates for config.h --
24
25 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
26 AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
27 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
28 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
29 AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
30 AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
31 AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
32 AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
33 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
34 AH_TEMPLATE([ZEROCONF], [Define if support for Zeroconf should be included])
35 AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
36 AH_TEMPLATE([PAM], [Define if PAM should be used])
37 AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
38
39 AH_TEMPLATE([TARGET_OS], [Target operating system name])
40 AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
41 AH_TEMPLATE([TARGET_CPU], [Target CPU name])
42
43 # -- C Compiler --
44
45 AC_PROG_CC
46
47 # -- Helper programs --
48
49 AC_PROG_AWK
50 AC_PROG_INSTALL
51 AC_PROG_LN_S
52 AC_PROG_MAKE_SET
53 AC_PROG_RANLIB
54
55 # -- Compiler Features --
56
57 AM_C_PROTOTYPES
58 AC_C_CONST
59 AC_C_INLINE
60
61 # -- Hard coded system and compiler dependencies/features/options ... --
62
63 AC_DEFUN([GCC_STACK_PROTECT_CC],[
64   ssp_cc=yes
65   # we use -fstack-protector-all for the test to enfoce the use of the guard variable 
66   AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
67   ssp_old_cflags="$CFLAGS"
68   CFLAGS="$CFLAGS -fstack-protector-all"
69   AC_TRY_LINK(,,, ssp_cc=no)
70   echo $ssp_cc
71   CFLAGS="$ssp_old_cflags"
72   if test "X$ssp_cc" = "Xyes"; then
73       CFLAGS="$CFLAGS -fstack-protector"
74       AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
75   fi
76 ])
77
78 if test "$GCC" = "yes"; then
79         # We are using the GNU C compiler. Good!
80         CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
81
82         GCC_STACK_PROTECT_CC
83 fi
84
85 case "$target_os" in
86         hpux*)
87                 # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
88                 # (tested with HP/UX 11.11)
89                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
90                 ;;
91 esac
92
93 # Add additional CFLAGS, eventually specified on the command line:
94 test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
95
96 CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
97
98 # -- Headers --
99
100 AC_HEADER_STDC
101 AC_HEADER_TIME
102 AC_HEADER_SYS_WAIT
103
104 AC_CHECK_HEADERS([ \
105         ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
106         stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
107         ],,AC_MSG_ERROR([required C header missing!]))
108
109 AC_CHECK_HEADERS([ \
110         arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
111         ],[],[],[[
112         #ifdef HAVE_SYS_TYPES_H
113                 #include <sys/types.h>
114         #endif
115         #ifdef HAVE_SYS_SOCKET_H
116                 #include <sys/socket.h>
117         #endif
118         #ifdef HAVE_NETINET_IN_H
119                 #include <netinet/in.h>
120         #endif
121         ]]
122 )
123
124 # -- Datatypes --
125
126 AC_MSG_CHECKING(whether socklen_t exists)
127 AC_TRY_COMPILE([
128 #include <sys/types.h>
129 #include <sys/socket.h>
130         ],[
131         socklen_t a, b;
132         a = 2; b = 4; a += b;
133         ],[
134         AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
135         ],[
136         AC_MSG_RESULT(no)
137 ])
138
139 AC_TYPE_SIGNAL
140 AC_TYPE_SIZE_T
141
142 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
143  [#include <arpa/inet.h>])
144
145 # -- Libraries --
146
147 # A/UX needs this.
148 AC_CHECK_LIB(UTIL,memmove)
149 # needed on solaris. GNU libc also has a libnsl, but we do not need it.
150 AC_SEARCH_LIBS(gethostbyname,nsl)
151 AC_CHECK_LIB(socket,bind)
152
153 # -- Functions --
154
155 AC_FUNC_FORK
156 AC_FUNC_STRFTIME
157
158 AC_CHECK_FUNCS([ \
159         bind gethostbyaddr gethostbyname gethostname inet_ntoa \
160         setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
161
162 AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton isdigit sigaction sigprocmask snprintf \
163  vsnprintf strdup strlcpy strlcat strtok_r)
164
165 # -- Configuration options --
166
167 # use syslog?
168
169 x_syslog_on=no
170 AC_ARG_WITH(syslog,
171         [  --without-syslog        disable syslog (autodetected by default)],
172         [       if test "$withval" != "no"; then
173                         if test "$withval" != "yes"; then
174                                 CFLAGS="-I$withval/include $CFLAGS"
175                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
176                                 LDFLAGS="-L$withval/lib $LDFLAGS"
177                         fi
178                         AC_CHECK_LIB(be, syslog)
179                         AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
180                                 AC_MSG_ERROR([Can't enable syslog!])
181                         )
182                 fi
183         ],
184         [
185                 AC_CHECK_LIB(be, syslog)
186                 AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
187         ]
188 )
189 if test "$x_syslog_on" = "yes"; then
190         AC_DEFINE(SYSLOG, 1)
191         AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
192 fi
193
194 # use zlib compression?
195
196 x_zlib_on=no
197 AC_ARG_WITH(zlib,
198         [  --without-zlib          disable zlib compression (autodetected by default)],
199         [       if test "$withval" != "no"; then
200                         if test "$withval" != "yes"; then
201                                 CFLAGS="-I$withval/include $CFLAGS"
202                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
203                                 LDFLAGS="-L$withval/lib $LDFLAGS"
204                         fi
205                         AC_CHECK_LIB(z, deflate)
206                         AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
207                                 AC_MSG_ERROR([Can't enable zlib!])
208                         )
209                 fi
210         ],
211         [       AC_CHECK_LIB(z, deflate)
212                 AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
213         ]
214 )
215 if test "$x_zlib_on" = "yes"; then
216         AC_DEFINE(ZLIB, 1)
217         AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
218 fi
219
220 # detect which IO API to use:
221
222 x_io_backend=none
223
224 AC_ARG_WITH(select,
225         [  --without-select        disable select IO support (autodetected by default)],
226         [       if test "$withval" != "no"; then
227                         if test "$withval" != "yes"; then
228                                 CFLAGS="-I$withval/include $CFLAGS"
229                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
230                                 LDFLAGS="-L$withval/lib $LDFLAGS"
231                         fi
232                         AC_CHECK_FUNCS(select, x_io_select=yes,
233                                 AC_MSG_ERROR([Can't enable select IO support!])
234                         )
235                 fi
236         ],
237         [
238                 AC_CHECK_FUNCS(select, x_io_select=yes)
239         ]
240 )
241
242 AC_ARG_WITH(poll,
243         [  --without-poll          disable poll support (autodetected by default)],
244         [       if test "$withval" != "no"; then
245                         if test "$withval" != "yes"; then
246                                 CFLAGS="-I$withval/include $CFLAGS"
247                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
248                                 LDFLAGS="-L$withval/lib $LDFLAGS"
249                         fi
250                         AC_CHECK_FUNCS(poll, x_io_backend=poll\(\),
251                                 AC_MSG_ERROR([Can't enable poll IO support!])
252                         )
253                 fi
254         ],
255         [
256                 AC_CHECK_FUNCS(poll, x_io_backend=poll\(\))
257         ]
258 )
259
260 AC_ARG_WITH(devpoll,
261         [  --without-devpoll       disable /dev/poll IO support (autodetected by default)],
262         [       if test "$withval" != "no"; then
263                         if test "$withval" != "yes"; then
264                                 CFLAGS="-I$withval/include $CFLAGS"
265                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
266                                 LDFLAGS="-L$withval/lib $LDFLAGS"
267                         fi
268
269                                 AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
270                 fi
271         ],
272         [
273                 AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
274         ]
275 )
276
277 AC_ARG_WITH(epoll,
278         [  --without-epoll         disable epoll IO support (autodetected by default)],
279         [       if test "$withval" != "no"; then
280                         if test "$withval" != "yes"; then
281                                 CFLAGS="-I$withval/include $CFLAGS"
282                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
283                                 LDFLAGS="-L$withval/lib $LDFLAGS"
284                         fi
285                         AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes,
286                                 AC_MSG_ERROR([Can't enable epoll IO support!])
287                         )
288                 fi
289         ],
290         [
291                 AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
292         ]
293 )
294
295 AC_ARG_WITH(kqueue,
296         [  --without-kqueue        disable kqueue IO support (autodetected by default)],
297         [       if test "$withval" != "no"; then
298                         if test "$withval" != "yes"; then
299                                 CFLAGS="-I$withval/include $CFLAGS"
300                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
301                                 LDFLAGS="-L$withval/lib $LDFLAGS"
302                         fi
303                         AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\),
304                                 AC_MSG_ERROR([Can't enable kqueue IO support!])
305                         )
306                 fi
307         ],
308         [
309                 AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
310         ]
311 )
312
313 if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
314         # when epoll() and select() are available, we'll use both!
315         x_io_backend="epoll(), select()"
316 else
317         if test "$x_io_epoll" = "yes"; then
318                 # we prefere epoll() if it is available
319                 x_io_backend="epoll()"
320         else
321                 if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
322                         # we'll use select, when available and no "better"
323                         # interface has been detected ...
324                         x_io_backend="select()"
325                 fi
326         fi
327 fi
328
329 if test "$x_io_backend" = "none"; then
330         AC_MSG_ERROR([No useabe IO API activated/found!?])
331 fi
332
333 # use SSL?
334
335 AC_ARG_WITH(openssl,
336         [  --with-openssl          enable SSL support using OpenSSL],
337         [       if test "$withval" != "no"; then
338                         if test "$withval" != "yes"; then
339                                 CFLAGS="-I$withval/include $CFLAGS"
340                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
341                                 LDFLAGS="-L$withval/lib $LDFLAGS"
342                         fi
343                         AC_CHECK_LIB(crypto, BIO_s_mem)
344                         AC_CHECK_LIB(ssl, SSL_library_init)
345                         AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
346                                 AC_MSG_ERROR([Can't enable openssl])
347                         )
348                 fi
349         ]
350 )
351
352 AC_ARG_WITH(gnutls,
353         [  --with-gnutls           enable SSL support using gnutls],
354         [       if test "$withval" != "no"; then
355                         if test "$withval" != "yes"; then
356                                 CFLAGS="-I$withval/include $CFLAGS"
357                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
358                                 LDFLAGS="-L$withval/lib $LDFLAGS"
359                         fi
360                         AC_CHECK_LIB(gnutls, gnutls_global_init)
361                         AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
362                                 AC_MSG_ERROR([Can't enable gnutls])
363                         )
364                 fi
365         ]
366 )
367
368 x_ssl_lib="no"
369 if test "$x_ssl_gnutls" = "yes"; then
370         if test "$x_ssl_openssl" = "yes";then
371                 AC_MSG_ERROR([Cannot enable both gnutls and openssl])
372         fi
373         x_ssl_lib=gnutls
374 fi
375 if test "$x_ssl_openssl" = "yes"; then
376         x_ssl_lib=openssl
377 fi
378
379 # use TCP wrappers?
380
381 x_tcpwrap_on=no
382 AC_ARG_WITH(tcp-wrappers,
383         [  --with-tcp-wrappers     enable TCP wrappers support],
384         [       if test "$withval" != "no"; then
385                         if test "$withval" != "yes"; then
386                                 CFLAGS="-I$withval/include $CFLAGS"
387                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
388                                 LDFLAGS="-L$withval/lib $LDFLAGS"
389                         fi
390                         AC_MSG_CHECKING(for hosts_access)
391                         LIBS="-lwrap $LIBS"
392                         AC_TRY_LINK([
393 #include <tcpd.h>
394 int allow_severity = 0;
395 int deny_severity = 0;
396                                 ],[
397                                 tcpd_warn("link test");
398                                 ],[
399                                 AC_MSG_RESULT(yes)
400                                 AC_DEFINE(TCPWRAP, 1)
401                                 x_tcpwrap_on=yes
402                                 ],[
403                                 AC_MSG_RESULT(no)
404                                 AC_MSG_ERROR([Can't enable TCP wrappers!])
405                         ])
406                 fi
407         ]
408 )
409
410 # include support for "zeroconf"?
411
412 x_zeroconf_on=no
413 AC_ARG_WITH(zeroconf,
414         [  --with-zeroconf         enable support for "Zeroconf"],
415         [       if test "$withval" != "no"; then
416                         if test "$withval" != "yes"; then
417                                 CFLAGS="-I$withval/include $CFLAGS"
418                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
419                                 LDFLAGS="-L$withval/lib $LDFLAGS"
420                         fi
421                         AC_CHECK_FUNCS(DNSServiceRegistrationCreate, x_zeroconf_on=osx,
422                         [
423                                 AC_CHECK_LIB(pthread, pthread_mutexattr_init)
424                                 AC_CHECK_LIB(howl, sw_discovery_init)
425                                 AC_CHECK_FUNCS(sw_discovery_init, \
426                                  x_zeroconf_on=howl, \
427                                  AC_MSG_ERROR([Can't enable Zeroconf!]))
428                         ])
429                 fi
430         ]
431 )
432 if test "$x_zeroconf_on" = "osx"; then
433         AC_CHECK_HEADERS([DNSServiceDiscovery/DNSServiceDiscovery.h \
434          mach/port.h],,AC_MSG_ERROR([required C header missing!]))
435         AC_DEFINE(ZEROCONF, 1)
436 fi
437 if test "$x_zeroconf_on" = "howl"; then
438         for dir in /usr/local/include /usr/local/include/howl* \
439          /usr/include /usr/include/howl* \
440          /usr/local/include/avahi* /usr/include/avahi*; do
441                 test -d "$dir" || continue
442                 AC_MSG_CHECKING([for Howl headers in $dir])
443                 if test -f "$dir/rendezvous/rendezvous.h"; then
444                         if test "$dir" != "/usr/local/include" -a \
445                          "$dir" != "/usr/include"; then
446                                 CFLAGS="-I$dir $CFLAGS"
447                                 CPPFLAGS="-I$dir $CPPFLAGS"
448                         fi
449                         AC_MSG_RESULT(yes)
450                         break
451                 else
452                         AC_MSG_RESULT(no)
453                 fi
454         done
455         AC_CHECK_HEADERS([rendezvous/rendezvous.h],, \
456          AC_MSG_ERROR([required C header missing!]))
457         AC_DEFINE(ZEROCONF, 1)
458 fi
459
460 # do IDENT requests using libident?
461
462 x_identauth_on=no
463 AC_ARG_WITH(ident,
464         [  --with-ident            enable "IDENT" ("AUTH") protocol support],
465         [       if test "$withval" != "no"; then
466                         if test "$withval" != "yes"; then
467                                 CFLAGS="-I$withval/include $CFLAGS"
468                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
469                                 LDFLAGS="-L$withval/lib $LDFLAGS"
470                         fi
471                         AC_CHECK_LIB(ident, ident_id)
472                         AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
473                                 AC_MSG_ERROR([Can't enable IDENT support!])
474                         )
475                 fi
476         ]
477 )
478 if test "$x_identauth_on" = "yes"; then
479         AC_DEFINE(IDENTAUTH, 1)
480         AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
481 fi
482
483 # compile in PAM support?
484
485 x_pam_on=no
486 AC_ARG_WITH(pam,
487         [  --with-pam              enable user authentication using PAM],
488         [       if test "$withval" != "no"; then
489                         if test "$withval" != "yes"; then
490                                 CFLAGS="-I$withval/include $CFLAGS"
491                                 CPPFLAGS="-I$withval/include $CPPFLAGS"
492                                 LDFLAGS="-L$withval/lib $LDFLAGS"
493                         fi
494                         AC_CHECK_LIB(pam, pam_authenticate)
495                         AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
496                                 AC_MSG_ERROR([Can't enable PAM support!])
497                         )
498                 fi
499         ]
500 )
501 if test "$x_pam_on" = "yes"; then
502         AC_DEFINE(PAM, 1)
503         AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
504         if test "$pam_ok" != "yes"; then
505                 AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
506                         AC_MSG_ERROR([required C header missing!]))
507         fi
508 fi
509
510 # compile in IRC+ protocol support?
511
512 x_ircplus_on=yes
513 AC_ARG_ENABLE(ircplus,
514         [  --disable-ircplus       disable IRC+ protocol],
515         if test "$enableval" = "no"; then x_ircplus_on=no; fi
516 )
517 if test "$x_ircplus_on" = "yes"; then
518         AC_DEFINE(IRCPLUS, 1)
519 fi
520
521 # enable support for IPv6?
522 x_ipv6_on=no
523 AC_ARG_ENABLE(ipv6,
524         [  --enable-ipv6           enable IPv6 protocol support],
525         if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
526 )
527 if test "$x_ipv6_on" = "yes"; then
528         # getaddrinfo() and getnameinfo() are optional when not compiling
529         # with IPv6 support, but are required for IPv6 to work!
530         AC_CHECK_FUNCS([ \
531                 getaddrinfo getnameinfo \
532                 ],,AC_MSG_ERROR([required function missing for IPv6 support!]))
533         AC_DEFINE(WANT_IPV6, 1)
534 fi
535
536 # compile in IRC "sniffer"?
537
538 x_sniffer_on=no; x_debug_on=no
539 AC_ARG_ENABLE(sniffer,
540         [  --enable-sniffer        enable IRC traffic sniffer (enables debug mode)],
541         if test "$enableval" = "yes"; then
542                 AC_DEFINE(SNIFFER, 1)
543                 x_sniffer_on=yes; x_debug_on=yes
544         fi
545 )
546
547 # enable additional debugging code?
548
549 AC_ARG_ENABLE(debug,
550         [  --enable-debug          show additional debug output],
551         if test "$enableval" = "yes"; then x_debug_on=yes; fi
552 )
553 if test "$x_debug_on" = "yes"; then
554         AC_DEFINE(DEBUG, 1)
555         test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
556         AC_CHECK_FUNCS(mtrace)
557 fi
558
559 # enable "strict RFC rules"?
560
561 x_strict_rfc_on=no
562 AC_ARG_ENABLE(strict-rfc,
563         [  --enable-strict-rfc     strict RFC conformance -- may break clients!],
564         if test "$enableval" = "yes"; then
565                 AC_DEFINE(STRICT_RFC, 1)
566                 x_strict_rfc_on=yes
567         fi
568 )
569
570 # -- Definitions --
571
572 AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
573 AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
574 AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
575
576 # Add additional CFLAGS, eventually specified on the command line, but after
577 # running this configure script. Useful for "-Werror" for example.
578 test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
579
580 # -- Generate files --
581
582 AC_OUTPUT([ \
583         Makefile \
584         doc/Makefile \
585         doc/src/Makefile \
586         src/Makefile \
587         src/portab/Makefile \
588         src/ipaddr/Makefile \
589         src/tool/Makefile \
590         src/ngircd/Makefile \
591         src/testsuite/Makefile \
592         man/Makefile \
593         contrib/Makefile \
594         contrib/Debian/Makefile \
595         contrib/MacOSX/Makefile \
596         contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
597         contrib/MacOSX/ngIRCd.pmdoc/Makefile \
598 ])
599
600 type dpkg >/dev/null 2>&1
601 if test $? -eq 0; then
602         # Generate debian/ link if the dpkg command exists
603         # (read: if we are running on a debian compatible system)
604         echo "creating Debian-specific links ..."
605         test -f debian/rules || ln -s contrib/Debian debian
606 fi
607
608 # -- Result --
609
610 echo
611 echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
612 echo
613
614 # Someone please show me a better way :)  [borrowed by OpenSSH]
615 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
616 S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
617 C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
618 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
619 D=`eval echo ${docdir}` ; D=`eval echo ${D}`
620
621 echo "             Target: ${target}"
622 test "$target" != "$host" && echo "               Host: ${host}"
623 echo "           Compiler: ${CC}"
624 test -n "$CFLAGS"       && echo "     Compiler flags: ${CFLAGS}"
625 test -n "$CPPFLAGS"     && echo " Preprocessor flags: ${CPPFLAGS}"
626 test -n "$LDFLAGS"      && echo "       Linker flags: ${LDFLAGS}"
627 test -n "$LIBS"         && echo "          Libraries: ${LIBS}"
628 echo
629 echo "    'ngircd' binary: $S"
630 echo " Configuration file: $C"
631 echo "       Manual pages: $M"
632 echo "      Documentation: $D"
633 echo
634
635 echo $ECHO_N "     Syslog support: $ECHO_C"
636 test "$x_syslog_on" = "yes" \
637         && echo $ECHO_N "yes   $ECHO_C" \
638         || echo $ECHO_N "no    $ECHO_C"
639 echo $ECHO_N "  Enable debug code: $ECHO_C"
640 test "$x_debug_on" = "yes" \
641         && echo "yes" \
642         || echo "no"
643
644 echo $ECHO_N "   zlib compression: $ECHO_C"
645 test "$x_zlib_on" = "yes" \
646         && echo $ECHO_N "yes   $ECHO_C" \
647         || echo $ECHO_N "no    $ECHO_C"
648 echo $ECHO_N "        IRC sniffer: $ECHO_C"
649 test "$x_sniffer_on" = "yes" \
650         && echo "yes" \
651         || echo "no"
652
653 echo $ECHO_N "   Use TCP Wrappers: $ECHO_C"
654 test "$x_tcpwrap_on" = "yes" \
655         && echo $ECHO_N "yes   $ECHO_C" \
656         || echo $ECHO_N "no    $ECHO_C"
657 echo $ECHO_N "    Strict RFC mode: $ECHO_C"
658 test "$x_strict_rfc_on" = "yes" \
659         && echo "yes" \
660         || echo "no"
661
662 echo $ECHO_N "   Zeroconf support: $ECHO_C"
663 case "$x_zeroconf_on" in
664         osx)
665                 echo $ECHO_N "Apple $ECHO_C"
666                 ;;
667         howl)
668                 echo $ECHO_N "Howl  $ECHO_C"
669                 ;;
670         *)
671                 echo $ECHO_N "no    $ECHO_C"
672                 ;;
673 esac
674 echo $ECHO_N "      IRC+ protocol: $ECHO_C"
675 test "$x_ircplus_on" = "yes" \
676         && echo "yes" \
677         || echo "no"
678
679 echo $ECHO_N "      IDENT support: $ECHO_C"
680 test "$x_identauth_on" = "yes" \
681         && echo $ECHO_N "yes   $ECHO_C" \
682         || echo $ECHO_N "no    $ECHO_C"
683 echo $ECHO_N "        I/O backend: $ECHO_C"
684         echo "\"$x_io_backend\""
685
686 echo $ECHO_N "      IPv6 protocol: $ECHO_C"
687 test "$x_ipv6_on" = "yes" \
688         && echo $ECHO_N "yes   $ECHO_C" \
689         || echo $ECHO_N "no    $ECHO_C"
690 echo $ECHO_N "        SSL support: $ECHO_C"
691 echo "$x_ssl_lib"
692
693 echo $ECHO_N "        PAM support: $ECHO_C"
694 test "$x_pam_on" = "yes" \
695         && echo "yes" \
696         || echo "no"
697
698 echo
699
700 # -eof-