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