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