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