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