configure.in 17 KB

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