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