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