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