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