configure.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2011 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. define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \\n))
  12. # -- Initialisation --
  13. AC_PREREQ(2.50)
  14. AC_INIT(ngircd, VERSION_ID)
  15. AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
  16. AC_CANONICAL_TARGET
  17. AM_INIT_AUTOMAKE(1.6)
  18. AM_CONFIG_HEADER(src/config.h)
  19. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  20. # -- Templates for config.h --
  21. AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
  22. AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
  23. AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
  24. AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
  25. AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
  26. AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
  27. AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
  28. AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
  29. AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
  30. AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
  31. AH_TEMPLATE([PAM], [Define if PAM should be used])
  32. AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
  33. AH_TEMPLATE([TARGET_OS], [Target operating system name])
  34. AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
  35. AH_TEMPLATE([TARGET_CPU], [Target CPU name])
  36. # -- C Compiler --
  37. AC_PROG_CC
  38. AC_PROG_CC_STDC
  39. AC_C_PROTOTYPES
  40. # -- Helper programs --
  41. AC_PROG_AWK
  42. AC_PROG_INSTALL
  43. AC_PROG_LN_S
  44. AC_PROG_MAKE_SET
  45. AC_PROG_RANLIB
  46. # -- Compiler Features --
  47. AM_C_PROTOTYPES
  48. AC_C_CONST
  49. AC_C_INLINE
  50. # -- Hard coded system and compiler dependencies/features/options ... --
  51. AC_DEFUN([GCC_STACK_PROTECT_CC],[
  52. ssp_cc=yes
  53. # we use -fstack-protector-all for the test to enfoce the use of the guard variable
  54. AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
  55. ssp_old_cflags="$CFLAGS"
  56. CFLAGS="$CFLAGS -fstack-protector-all"
  57. AC_TRY_LINK(,,, ssp_cc=no)
  58. echo $ssp_cc
  59. CFLAGS="$ssp_old_cflags"
  60. if test "X$ssp_cc" = "Xyes"; then
  61. CFLAGS="$CFLAGS -fstack-protector"
  62. AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
  63. fi
  64. ])
  65. if test "$GCC" = "yes"; then
  66. # We are using the GNU C compiler. Good!
  67. CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
  68. GCC_STACK_PROTECT_CC
  69. fi
  70. case "$target_os" in
  71. hpux*)
  72. # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
  73. # (tested with HP/UX 11.11)
  74. CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
  75. ;;
  76. esac
  77. # Add additional CFLAGS, eventually specified on the command line:
  78. test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
  79. CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
  80. # -- Headers --
  81. AC_HEADER_STDC
  82. AC_HEADER_TIME
  83. AC_HEADER_SYS_WAIT
  84. AC_CHECK_HEADERS([ \
  85. ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
  86. stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
  87. ],,AC_MSG_ERROR([required C header missing!]))
  88. AC_CHECK_HEADERS([ \
  89. arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
  90. ],[],[],[[
  91. #ifdef HAVE_SYS_TYPES_H
  92. #include <sys/types.h>
  93. #endif
  94. #ifdef HAVE_SYS_SOCKET_H
  95. #include <sys/socket.h>
  96. #endif
  97. #ifdef HAVE_NETINET_IN_H
  98. #include <netinet/in.h>
  99. #endif
  100. ]]
  101. )
  102. # -- Datatypes --
  103. AC_MSG_CHECKING(whether socklen_t exists)
  104. AC_TRY_COMPILE([
  105. #include <sys/types.h>
  106. #include <sys/socket.h>
  107. ],[
  108. socklen_t a, b;
  109. a = 2; b = 4; a += b;
  110. ],[
  111. AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
  112. ],[
  113. AC_MSG_RESULT(no)
  114. ])
  115. AC_TYPE_SIGNAL
  116. AC_TYPE_SIZE_T
  117. AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
  118. [#include <arpa/inet.h>])
  119. # -- Libraries --
  120. # A/UX needs this.
  121. AC_CHECK_LIB(UTIL,memmove)
  122. # needed on solaris. GNU libc also has a libnsl, but we do not need it.
  123. AC_SEARCH_LIBS(gethostbyname,nsl)
  124. AC_CHECK_LIB(socket,bind)
  125. # -- Functions --
  126. AC_FUNC_FORK
  127. AC_FUNC_STRFTIME
  128. AC_CHECK_FUNCS([ \
  129. bind gethostbyaddr gethostbyname gethostname inet_ntoa \
  130. setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
  131. AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton sigaction sigprocmask snprintf \
  132. vsnprintf strdup strlcpy strlcat strtok_r)
  133. # -- Configuration options --
  134. # use syslog?
  135. x_syslog_on=no
  136. AC_ARG_WITH(syslog,
  137. [ --without-syslog disable syslog (autodetected by default)],
  138. [ if test "$withval" != "no"; then
  139. if test "$withval" != "yes"; then
  140. CFLAGS="-I$withval/include $CFLAGS"
  141. CPPFLAGS="-I$withval/include $CPPFLAGS"
  142. LDFLAGS="-L$withval/lib $LDFLAGS"
  143. fi
  144. AC_CHECK_LIB(be, syslog)
  145. AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
  146. AC_MSG_ERROR([Can't enable syslog!])
  147. )
  148. fi
  149. ],
  150. [
  151. AC_CHECK_LIB(be, syslog)
  152. AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
  153. ]
  154. )
  155. if test "$x_syslog_on" = "yes"; then
  156. AC_DEFINE(SYSLOG, 1)
  157. AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
  158. fi
  159. # use zlib compression?
  160. x_zlib_on=no
  161. AC_ARG_WITH(zlib,
  162. [ --without-zlib disable zlib compression (autodetected by default)],
  163. [ if test "$withval" != "no"; then
  164. if test "$withval" != "yes"; then
  165. CFLAGS="-I$withval/include $CFLAGS"
  166. CPPFLAGS="-I$withval/include $CPPFLAGS"
  167. LDFLAGS="-L$withval/lib $LDFLAGS"
  168. fi
  169. AC_CHECK_LIB(z, deflate)
  170. AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
  171. AC_MSG_ERROR([Can't enable zlib!])
  172. )
  173. fi
  174. ],
  175. [ AC_CHECK_LIB(z, deflate)
  176. AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
  177. ]
  178. )
  179. if test "$x_zlib_on" = "yes"; then
  180. AC_DEFINE(ZLIB, 1)
  181. AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
  182. fi
  183. # detect which IO API to use:
  184. x_io_backend=none
  185. AC_ARG_WITH(select,
  186. [ --without-select disable select IO support (autodetected by default)],
  187. [ if test "$withval" != "no"; then
  188. if test "$withval" != "yes"; then
  189. CFLAGS="-I$withval/include $CFLAGS"
  190. CPPFLAGS="-I$withval/include $CPPFLAGS"
  191. LDFLAGS="-L$withval/lib $LDFLAGS"
  192. fi
  193. AC_CHECK_FUNCS(select, x_io_select=yes,
  194. AC_MSG_ERROR([Can't enable select IO support!])
  195. )
  196. fi
  197. ],
  198. [
  199. AC_CHECK_FUNCS(select, x_io_select=yes)
  200. ]
  201. )
  202. AC_ARG_WITH(poll,
  203. [ --without-poll disable poll support (autodetected by default)],
  204. [ if test "$withval" != "no"; then
  205. if test "$withval" != "yes"; then
  206. CFLAGS="-I$withval/include $CFLAGS"
  207. CPPFLAGS="-I$withval/include $CPPFLAGS"
  208. LDFLAGS="-L$withval/lib $LDFLAGS"
  209. fi
  210. AC_CHECK_FUNCS(poll, x_io_backend=poll\(\),
  211. AC_MSG_ERROR([Can't enable poll IO support!])
  212. )
  213. fi
  214. ],
  215. [
  216. AC_CHECK_FUNCS(poll, x_io_backend=poll\(\))
  217. ]
  218. )
  219. AC_ARG_WITH(devpoll,
  220. [ --without-devpoll disable /dev/poll IO support (autodetected by default)],
  221. [ if test "$withval" != "no"; then
  222. if test "$withval" != "yes"; then
  223. CFLAGS="-I$withval/include $CFLAGS"
  224. CPPFLAGS="-I$withval/include $CPPFLAGS"
  225. LDFLAGS="-L$withval/lib $LDFLAGS"
  226. fi
  227. AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
  228. fi
  229. ],
  230. [
  231. AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
  232. ]
  233. )
  234. AC_ARG_WITH(epoll,
  235. [ --without-epoll disable epoll IO support (autodetected by default)],
  236. [ if test "$withval" != "no"; then
  237. if test "$withval" != "yes"; then
  238. CFLAGS="-I$withval/include $CFLAGS"
  239. CPPFLAGS="-I$withval/include $CPPFLAGS"
  240. LDFLAGS="-L$withval/lib $LDFLAGS"
  241. fi
  242. AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes,
  243. AC_MSG_ERROR([Can't enable epoll IO support!])
  244. )
  245. fi
  246. ],
  247. [
  248. AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
  249. ]
  250. )
  251. AC_ARG_WITH(kqueue,
  252. [ --without-kqueue disable kqueue 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(kqueue, x_io_backend=kqueue\(\),
  260. AC_MSG_ERROR([Can't enable kqueue IO support!])
  261. )
  262. fi
  263. ],
  264. [
  265. AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
  266. ]
  267. )
  268. if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
  269. # when epoll() and select() are available, we'll use both!
  270. x_io_backend="epoll(), select()"
  271. else
  272. if test "$x_io_epoll" = "yes"; then
  273. # we prefere epoll() if it is available
  274. x_io_backend="epoll()"
  275. else
  276. if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
  277. # we'll use select, when available and no "better"
  278. # interface has been detected ...
  279. x_io_backend="select()"
  280. fi
  281. fi
  282. fi
  283. if test "$x_io_backend" = "none"; then
  284. AC_MSG_ERROR([No useabe IO API activated/found!?])
  285. fi
  286. # use SSL?
  287. AC_ARG_WITH(openssl,
  288. [ --with-openssl enable SSL support using OpenSSL],
  289. [ if test "$withval" != "no"; then
  290. if test "$withval" != "yes"; then
  291. CFLAGS="-I$withval/include $CFLAGS"
  292. CPPFLAGS="-I$withval/include $CPPFLAGS"
  293. LDFLAGS="-L$withval/lib $LDFLAGS"
  294. fi
  295. AC_CHECK_LIB(crypto, BIO_s_mem)
  296. AC_CHECK_LIB(ssl, SSL_library_init)
  297. AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
  298. AC_MSG_ERROR([Can't enable openssl])
  299. )
  300. fi
  301. ]
  302. )
  303. AC_ARG_WITH(gnutls,
  304. [ --with-gnutls enable SSL support using gnutls],
  305. [ if test "$withval" != "no"; then
  306. if test "$withval" != "yes"; then
  307. CFLAGS="-I$withval/include $CFLAGS"
  308. CPPFLAGS="-I$withval/include $CPPFLAGS"
  309. LDFLAGS="-L$withval/lib $LDFLAGS"
  310. fi
  311. AC_CHECK_LIB(gnutls, gnutls_global_init)
  312. AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
  313. AC_MSG_ERROR([Can't enable gnutls])
  314. )
  315. fi
  316. ]
  317. )
  318. x_ssl_lib="no"
  319. if test "$x_ssl_gnutls" = "yes"; then
  320. if test "$x_ssl_openssl" = "yes";then
  321. AC_MSG_ERROR([Cannot enable both gnutls and openssl])
  322. fi
  323. x_ssl_lib=gnutls
  324. fi
  325. if test "$x_ssl_openssl" = "yes"; then
  326. x_ssl_lib=openssl
  327. fi
  328. # use TCP wrappers?
  329. x_tcpwrap_on=no
  330. AC_ARG_WITH(tcp-wrappers,
  331. [ --with-tcp-wrappers enable TCP wrappers support],
  332. [ if test "$withval" != "no"; then
  333. if test "$withval" != "yes"; then
  334. CFLAGS="-I$withval/include $CFLAGS"
  335. CPPFLAGS="-I$withval/include $CPPFLAGS"
  336. LDFLAGS="-L$withval/lib $LDFLAGS"
  337. fi
  338. AC_MSG_CHECKING(for hosts_access)
  339. LIBS="-lwrap $LIBS"
  340. AC_TRY_LINK([
  341. #include <tcpd.h>
  342. int allow_severity = 0;
  343. int deny_severity = 0;
  344. ],[
  345. tcpd_warn("link test");
  346. ],[
  347. AC_MSG_RESULT(yes)
  348. AC_DEFINE(TCPWRAP, 1)
  349. x_tcpwrap_on=yes
  350. ],[
  351. AC_MSG_RESULT(no)
  352. AC_MSG_ERROR([Can't enable TCP wrappers!])
  353. ])
  354. fi
  355. ]
  356. )
  357. # do IDENT requests using libident?
  358. x_identauth_on=no
  359. AC_ARG_WITH(ident,
  360. [ --with-ident enable "IDENT" ("AUTH") protocol support],
  361. [ if test "$withval" != "no"; then
  362. if test "$withval" != "yes"; then
  363. CFLAGS="-I$withval/include $CFLAGS"
  364. CPPFLAGS="-I$withval/include $CPPFLAGS"
  365. LDFLAGS="-L$withval/lib $LDFLAGS"
  366. fi
  367. AC_CHECK_LIB(ident, ident_id)
  368. AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
  369. AC_MSG_ERROR([Can't enable IDENT support!])
  370. )
  371. fi
  372. ]
  373. )
  374. if test "$x_identauth_on" = "yes"; then
  375. AC_DEFINE(IDENTAUTH, 1)
  376. AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
  377. fi
  378. # compile in PAM support?
  379. x_pam_on=no
  380. AC_ARG_WITH(pam,
  381. [ --with-pam enable user authentication using PAM],
  382. [ if test "$withval" != "no"; then
  383. if test "$withval" != "yes"; then
  384. CFLAGS="-I$withval/include $CFLAGS"
  385. CPPFLAGS="-I$withval/include $CPPFLAGS"
  386. LDFLAGS="-L$withval/lib $LDFLAGS"
  387. fi
  388. AC_CHECK_LIB(pam, pam_authenticate)
  389. AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
  390. AC_MSG_ERROR([Can't enable PAM support!])
  391. )
  392. fi
  393. ]
  394. )
  395. if test "$x_pam_on" = "yes"; then
  396. AC_DEFINE(PAM, 1)
  397. AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
  398. if test "$pam_ok" != "yes"; then
  399. AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
  400. AC_MSG_ERROR([required C header missing!]))
  401. fi
  402. fi
  403. # compile in IRC+ protocol support?
  404. x_ircplus_on=yes
  405. AC_ARG_ENABLE(ircplus,
  406. [ --disable-ircplus disable IRC+ protocol],
  407. if test "$enableval" = "no"; then x_ircplus_on=no; fi
  408. )
  409. if test "$x_ircplus_on" = "yes"; then
  410. AC_DEFINE(IRCPLUS, 1)
  411. fi
  412. # enable support for IPv6?
  413. x_ipv6_on=no
  414. AC_ARG_ENABLE(ipv6,
  415. [ --enable-ipv6 enable IPv6 protocol support],
  416. if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
  417. )
  418. if test "$x_ipv6_on" = "yes"; then
  419. # getaddrinfo() and getnameinfo() are optional when not compiling
  420. # with IPv6 support, but are required for IPv6 to work!
  421. AC_CHECK_FUNCS([ \
  422. getaddrinfo getnameinfo \
  423. ],,AC_MSG_ERROR([required function missing for IPv6 support!]))
  424. AC_DEFINE(WANT_IPV6, 1)
  425. fi
  426. # compile in IRC "sniffer"?
  427. x_sniffer_on=no; x_debug_on=no
  428. AC_ARG_ENABLE(sniffer,
  429. [ --enable-sniffer enable IRC traffic sniffer (enables debug mode)],
  430. if test "$enableval" = "yes"; then
  431. AC_DEFINE(SNIFFER, 1)
  432. x_sniffer_on=yes; x_debug_on=yes
  433. fi
  434. )
  435. # enable additional debugging code?
  436. AC_ARG_ENABLE(debug,
  437. [ --enable-debug show additional debug output],
  438. if test "$enableval" = "yes"; then x_debug_on=yes; fi
  439. )
  440. if test "$x_debug_on" = "yes"; then
  441. AC_DEFINE(DEBUG, 1)
  442. test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
  443. AC_CHECK_FUNCS(mtrace)
  444. fi
  445. # enable "strict RFC rules"?
  446. x_strict_rfc_on=no
  447. AC_ARG_ENABLE(strict-rfc,
  448. [ --enable-strict-rfc strict RFC conformance -- may break clients!],
  449. if test "$enableval" = "yes"; then
  450. AC_DEFINE(STRICT_RFC, 1)
  451. x_strict_rfc_on=yes
  452. fi
  453. )
  454. # -- Definitions --
  455. AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
  456. AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
  457. AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
  458. # Add additional CFLAGS, eventually specified on the command line, but after
  459. # running this configure script. Useful for "-Werror" for example.
  460. test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
  461. # -- Generate files --
  462. AC_OUTPUT([ \
  463. Makefile \
  464. doc/Makefile \
  465. doc/src/Makefile \
  466. src/Makefile \
  467. src/portab/Makefile \
  468. src/ipaddr/Makefile \
  469. src/tool/Makefile \
  470. src/ngircd/Makefile \
  471. src/testsuite/Makefile \
  472. man/Makefile \
  473. contrib/Makefile \
  474. contrib/Anope/Makefile \
  475. contrib/Debian/Makefile \
  476. contrib/MacOSX/Makefile \
  477. contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
  478. contrib/MacOSX/ngIRCd.pmdoc/Makefile \
  479. ])
  480. type dpkg >/dev/null 2>&1
  481. if test $? -eq 0; then
  482. # Generate debian/ link if the dpkg command exists
  483. # (read: if we are running on a debian compatible system)
  484. echo "creating Debian-specific links ..."
  485. test -f debian/rules || ln -s contrib/Debian debian
  486. fi
  487. # -- Result --
  488. echo
  489. echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
  490. echo
  491. # Someone please show me a better way :) [borrowed by OpenSSH]
  492. B=`eval echo ${bindir}` ; B=`eval echo ${B}`
  493. S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
  494. C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
  495. M=`eval echo ${mandir}` ; M=`eval echo ${M}`
  496. D=`eval echo ${docdir}` ; D=`eval echo ${D}`
  497. echo " Target: ${target}"
  498. test "$target" != "$host" && echo " Host: ${host}"
  499. echo " Compiler: ${CC}"
  500. test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}"
  501. test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}"
  502. test -n "$LDFLAGS" && echo " Linker flags: ${LDFLAGS}"
  503. test -n "$LIBS" && echo " Libraries: ${LIBS}"
  504. echo
  505. echo " 'ngircd' binary: $S"
  506. echo " Configuration file: $C"
  507. echo " Manual pages: $M"
  508. echo " Documentation: $D"
  509. echo
  510. echo $ECHO_N " Syslog support: $ECHO_C"
  511. test "$x_syslog_on" = "yes" \
  512. && echo $ECHO_N "yes $ECHO_C" \
  513. || echo $ECHO_N "no $ECHO_C"
  514. echo $ECHO_N " Enable debug code: $ECHO_C"
  515. test "$x_debug_on" = "yes" \
  516. && echo "yes" \
  517. || echo "no"
  518. echo $ECHO_N " zlib compression: $ECHO_C"
  519. test "$x_zlib_on" = "yes" \
  520. && echo $ECHO_N "yes $ECHO_C" \
  521. || echo $ECHO_N "no $ECHO_C"
  522. echo $ECHO_N " IRC sniffer: $ECHO_C"
  523. test "$x_sniffer_on" = "yes" \
  524. && echo "yes" \
  525. || echo "no"
  526. echo $ECHO_N " Use TCP Wrappers: $ECHO_C"
  527. test "$x_tcpwrap_on" = "yes" \
  528. && echo $ECHO_N "yes $ECHO_C" \
  529. || echo $ECHO_N "no $ECHO_C"
  530. echo $ECHO_N " Strict RFC mode: $ECHO_C"
  531. test "$x_strict_rfc_on" = "yes" \
  532. && echo "yes" \
  533. || echo "no"
  534. echo $ECHO_N " IDENT support: $ECHO_C"
  535. test "$x_identauth_on" = "yes" \
  536. && echo $ECHO_N "yes $ECHO_C" \
  537. || echo $ECHO_N "no $ECHO_C"
  538. echo $ECHO_N " IRC+ protocol: $ECHO_C"
  539. test "$x_ircplus_on" = "yes" \
  540. && echo "yes" \
  541. || echo "no"
  542. echo $ECHO_N " IPv6 protocol: $ECHO_C"
  543. test "$x_ipv6_on" = "yes" \
  544. && echo $ECHO_N "yes $ECHO_C" \
  545. || echo $ECHO_N "no $ECHO_C"
  546. echo $ECHO_N " I/O backend: $ECHO_C"
  547. echo "\"$x_io_backend\""
  548. echo $ECHO_N " PAM support: $ECHO_C"
  549. test "$x_pam_on" = "yes" \
  550. && echo $ECHO_N "yes $ECHO_C" \
  551. || echo $ECHO_N "no $ECHO_C"
  552. echo $ECHO_N " SSL support: $ECHO_C"
  553. echo "$x_ssl_lib"
  554. echo
  555. # -eof-