configure.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  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],,
  131. AC_MSG_ERROR([required function missing!]))
  132. AC_CHECK_FUNCS([ \
  133. gai_strerror getaddrinfo getnameinfo inet_aton sigaction \
  134. sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r])
  135. # -- Configuration options --
  136. # use syslog?
  137. x_syslog_on=no
  138. AC_ARG_WITH(syslog,
  139. [ --without-syslog disable syslog (autodetected by default)],
  140. [ if test "$withval" != "no"; then
  141. if test "$withval" != "yes"; then
  142. CFLAGS="-I$withval/include $CFLAGS"
  143. CPPFLAGS="-I$withval/include $CPPFLAGS"
  144. LDFLAGS="-L$withval/lib $LDFLAGS"
  145. fi
  146. AC_CHECK_LIB(be, syslog)
  147. AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
  148. AC_MSG_ERROR([Can't enable syslog!])
  149. )
  150. fi
  151. ],
  152. [
  153. AC_CHECK_LIB(be, syslog)
  154. AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
  155. ]
  156. )
  157. if test "$x_syslog_on" = "yes"; then
  158. AC_DEFINE(SYSLOG, 1)
  159. AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
  160. fi
  161. # use zlib compression?
  162. x_zlib_on=no
  163. AC_ARG_WITH(zlib,
  164. [ --without-zlib disable zlib compression (autodetected by default)],
  165. [ if test "$withval" != "no"; then
  166. if test "$withval" != "yes"; then
  167. CFLAGS="-I$withval/include $CFLAGS"
  168. CPPFLAGS="-I$withval/include $CPPFLAGS"
  169. LDFLAGS="-L$withval/lib $LDFLAGS"
  170. fi
  171. AC_CHECK_LIB(z, deflate)
  172. AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
  173. AC_MSG_ERROR([Can't enable zlib!])
  174. )
  175. fi
  176. ],
  177. [ AC_CHECK_LIB(z, deflate)
  178. AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
  179. ]
  180. )
  181. if test "$x_zlib_on" = "yes"; then
  182. AC_DEFINE(ZLIB, 1)
  183. AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
  184. fi
  185. # detect which IO API to use:
  186. x_io_backend=none
  187. AC_ARG_WITH(select,
  188. [ --without-select disable select IO support (autodetected by default)],
  189. [ if test "$withval" != "no"; then
  190. if test "$withval" != "yes"; then
  191. CFLAGS="-I$withval/include $CFLAGS"
  192. CPPFLAGS="-I$withval/include $CPPFLAGS"
  193. LDFLAGS="-L$withval/lib $LDFLAGS"
  194. fi
  195. AC_CHECK_FUNCS(select, x_io_select=yes,
  196. AC_MSG_ERROR([Can't enable select IO support!])
  197. )
  198. fi
  199. ],
  200. [
  201. AC_CHECK_FUNCS(select, x_io_select=yes)
  202. ]
  203. )
  204. AC_ARG_WITH(poll,
  205. [ --without-poll disable poll support (autodetected by default)],
  206. [ if test "$withval" != "no"; then
  207. if test "$withval" != "yes"; then
  208. CFLAGS="-I$withval/include $CFLAGS"
  209. CPPFLAGS="-I$withval/include $CPPFLAGS"
  210. LDFLAGS="-L$withval/lib $LDFLAGS"
  211. fi
  212. AC_CHECK_FUNCS(poll, [
  213. AC_CHECK_HEADERS(poll.h,
  214. x_io_backend=poll\(\),
  215. AC_MSG_ERROR(
  216. [Can't enable poll IO support!])
  217. )
  218. ], [
  219. AC_MSG_ERROR([Can't enable poll IO support!])
  220. ])
  221. fi
  222. ],
  223. [
  224. AC_CHECK_FUNCS(poll, [
  225. AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
  226. ])
  227. ]
  228. )
  229. AC_ARG_WITH(devpoll,
  230. [ --without-devpoll disable /dev/poll IO support (autodetected by default)],
  231. [ if test "$withval" != "no"; then
  232. if test "$withval" != "yes"; then
  233. CFLAGS="-I$withval/include $CFLAGS"
  234. CPPFLAGS="-I$withval/include $CPPFLAGS"
  235. LDFLAGS="-L$withval/lib $LDFLAGS"
  236. fi
  237. AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
  238. fi
  239. ],
  240. [
  241. AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
  242. ]
  243. )
  244. AC_ARG_WITH(epoll,
  245. [ --without-epoll disable epoll IO 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(epoll_create, x_io_epoll=yes,
  253. AC_MSG_ERROR([Can't enable epoll IO support!])
  254. )
  255. fi
  256. ],
  257. [
  258. AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
  259. ]
  260. )
  261. AC_ARG_WITH(kqueue,
  262. [ --without-kqueue disable kqueue 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. AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\),
  270. AC_MSG_ERROR([Can't enable kqueue IO support!])
  271. )
  272. fi
  273. ],
  274. [
  275. AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
  276. ]
  277. )
  278. if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
  279. # when epoll() and select() are available, we'll use both!
  280. x_io_backend="epoll(), select()"
  281. else
  282. if test "$x_io_epoll" = "yes"; then
  283. # we prefere epoll() if it is available
  284. x_io_backend="epoll()"
  285. else
  286. if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
  287. # we'll use select, when available and no "better"
  288. # interface has been detected ...
  289. x_io_backend="select()"
  290. fi
  291. fi
  292. fi
  293. if test "$x_io_backend" = "none"; then
  294. AC_MSG_ERROR([No useable IO API activated/found!?])
  295. fi
  296. # use SSL?
  297. AC_ARG_WITH(openssl,
  298. [ --with-openssl enable SSL support using OpenSSL],
  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_LIB(crypto, BIO_s_mem)
  306. AC_CHECK_LIB(ssl, SSL_library_init)
  307. AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
  308. AC_MSG_ERROR([Can't enable openssl])
  309. )
  310. fi
  311. ]
  312. )
  313. AC_ARG_WITH(gnutls,
  314. [ --with-gnutls enable SSL support using gnutls],
  315. [ if test "$withval" != "no"; then
  316. if test "$withval" != "yes"; then
  317. CFLAGS="-I$withval/include $CFLAGS"
  318. CPPFLAGS="-I$withval/include $CPPFLAGS"
  319. LDFLAGS="-L$withval/lib $LDFLAGS"
  320. fi
  321. AC_CHECK_LIB(gnutls, gnutls_global_init)
  322. AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
  323. AC_MSG_ERROR([Can't enable gnutls])
  324. )
  325. fi
  326. ]
  327. )
  328. x_ssl_lib="no"
  329. if test "$x_ssl_gnutls" = "yes"; then
  330. if test "$x_ssl_openssl" = "yes";then
  331. AC_MSG_ERROR([Cannot enable both gnutls and openssl])
  332. fi
  333. x_ssl_lib=gnutls
  334. fi
  335. if test "$x_ssl_openssl" = "yes"; then
  336. x_ssl_lib=openssl
  337. fi
  338. # use TCP wrappers?
  339. x_tcpwrap_on=no
  340. AC_ARG_WITH(tcp-wrappers,
  341. [ --with-tcp-wrappers enable TCP wrappers support],
  342. [ if test "$withval" != "no"; then
  343. if test "$withval" != "yes"; then
  344. CFLAGS="-I$withval/include $CFLAGS"
  345. CPPFLAGS="-I$withval/include $CPPFLAGS"
  346. LDFLAGS="-L$withval/lib $LDFLAGS"
  347. fi
  348. AC_MSG_CHECKING(for hosts_access)
  349. LIBS="-lwrap $LIBS"
  350. AC_TRY_LINK([
  351. #include <tcpd.h>
  352. int allow_severity = 0;
  353. int deny_severity = 0;
  354. ],[
  355. tcpd_warn("link test");
  356. ],[
  357. AC_MSG_RESULT(yes)
  358. AC_DEFINE(TCPWRAP, 1)
  359. x_tcpwrap_on=yes
  360. ],[
  361. AC_MSG_RESULT(no)
  362. AC_MSG_ERROR([Can't enable TCP wrappers!])
  363. ])
  364. fi
  365. ]
  366. )
  367. # do IDENT requests using libident?
  368. x_identauth_on=no
  369. AC_ARG_WITH(ident,
  370. [ --with-ident enable "IDENT" ("AUTH") protocol support],
  371. [ if test "$withval" != "no"; then
  372. if test "$withval" != "yes"; then
  373. CFLAGS="-I$withval/include $CFLAGS"
  374. CPPFLAGS="-I$withval/include $CPPFLAGS"
  375. LDFLAGS="-L$withval/lib $LDFLAGS"
  376. fi
  377. AC_CHECK_LIB(ident, ident_id)
  378. AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
  379. AC_MSG_ERROR([Can't enable IDENT support!])
  380. )
  381. fi
  382. ]
  383. )
  384. if test "$x_identauth_on" = "yes"; then
  385. AC_DEFINE(IDENTAUTH, 1)
  386. AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
  387. fi
  388. # compile in PAM support?
  389. x_pam_on=no
  390. AC_ARG_WITH(pam,
  391. [ --with-pam enable user authentication using PAM],
  392. [ if test "$withval" != "no"; then
  393. if test "$withval" != "yes"; then
  394. CFLAGS="-I$withval/include $CFLAGS"
  395. CPPFLAGS="-I$withval/include $CPPFLAGS"
  396. LDFLAGS="-L$withval/lib $LDFLAGS"
  397. fi
  398. AC_CHECK_LIB(pam, pam_authenticate)
  399. AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
  400. AC_MSG_ERROR([Can't enable PAM support!])
  401. )
  402. fi
  403. ]
  404. )
  405. if test "$x_pam_on" = "yes"; then
  406. AC_DEFINE(PAM, 1)
  407. AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
  408. if test "$pam_ok" != "yes"; then
  409. AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
  410. AC_MSG_ERROR([required C header missing!]))
  411. fi
  412. fi
  413. # compile in IRC+ protocol support?
  414. x_ircplus_on=yes
  415. AC_ARG_ENABLE(ircplus,
  416. [ --disable-ircplus disable IRC+ protocol],
  417. if test "$enableval" = "no"; then x_ircplus_on=no; fi
  418. )
  419. if test "$x_ircplus_on" = "yes"; then
  420. AC_DEFINE(IRCPLUS, 1)
  421. fi
  422. # enable support for IPv6?
  423. x_ipv6_on=no
  424. AC_ARG_ENABLE(ipv6,
  425. [ --enable-ipv6 enable IPv6 protocol support],
  426. if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
  427. )
  428. if test "$x_ipv6_on" = "yes"; then
  429. # getaddrinfo() and getnameinfo() are optional when not compiling
  430. # with IPv6 support, but are required for IPv6 to work!
  431. AC_CHECK_FUNCS([ \
  432. getaddrinfo getnameinfo \
  433. ],,AC_MSG_ERROR([required function missing for IPv6 support!]))
  434. AC_DEFINE(WANT_IPV6, 1)
  435. fi
  436. # compile in IRC "sniffer"?
  437. x_sniffer_on=no; x_debug_on=no
  438. AC_ARG_ENABLE(sniffer,
  439. [ --enable-sniffer enable IRC traffic sniffer (enables debug mode)],
  440. if test "$enableval" = "yes"; then
  441. AC_DEFINE(SNIFFER, 1)
  442. x_sniffer_on=yes; x_debug_on=yes
  443. fi
  444. )
  445. # enable additional debugging code?
  446. AC_ARG_ENABLE(debug,
  447. [ --enable-debug show additional debug output],
  448. if test "$enableval" = "yes"; then x_debug_on=yes; fi
  449. )
  450. if test "$x_debug_on" = "yes"; then
  451. AC_DEFINE(DEBUG, 1)
  452. test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
  453. AC_CHECK_FUNCS(mtrace)
  454. fi
  455. # enable "strict RFC rules"?
  456. x_strict_rfc_on=no
  457. AC_ARG_ENABLE(strict-rfc,
  458. [ --enable-strict-rfc strict RFC conformance -- may break clients!],
  459. if test "$enableval" = "yes"; then
  460. AC_DEFINE(STRICT_RFC, 1)
  461. x_strict_rfc_on=yes
  462. fi
  463. )
  464. # -- Definitions --
  465. AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
  466. AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
  467. AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
  468. # Add additional CFLAGS, eventually specified on the command line, but after
  469. # running this configure script. Useful for "-Werror" for example.
  470. test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
  471. # -- Generate files --
  472. AC_OUTPUT([ \
  473. Makefile \
  474. doc/Makefile \
  475. doc/src/Makefile \
  476. src/Makefile \
  477. src/portab/Makefile \
  478. src/ipaddr/Makefile \
  479. src/tool/Makefile \
  480. src/ngircd/Makefile \
  481. src/testsuite/Makefile \
  482. man/Makefile \
  483. contrib/Makefile \
  484. contrib/Anope/Makefile \
  485. contrib/Debian/Makefile \
  486. contrib/MacOSX/Makefile \
  487. contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
  488. contrib/MacOSX/ngIRCd.pmdoc/Makefile \
  489. ])
  490. type dpkg >/dev/null 2>&1
  491. if test $? -eq 0; then
  492. # Generate debian/ link if the dpkg command exists
  493. # (read: if we are running on a debian compatible system)
  494. echo "creating Debian-specific links ..."
  495. test -f debian/rules || ln -s contrib/Debian debian
  496. fi
  497. # -- Result --
  498. echo
  499. echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
  500. echo
  501. # Someone please show me a better way :) [borrowed by OpenSSH]
  502. B=`eval echo ${bindir}` ; B=`eval echo ${B}`
  503. S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
  504. C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
  505. M=`eval echo ${mandir}` ; M=`eval echo ${M}`
  506. D=`eval echo ${docdir}` ; D=`eval echo ${D}`
  507. echo " Target: ${target}"
  508. test "$target" != "$host" && echo " Host: ${host}"
  509. echo " Compiler: ${CC}"
  510. test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}"
  511. test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}"
  512. test -n "$LDFLAGS" && echo " Linker flags: ${LDFLAGS}"
  513. test -n "$LIBS" && echo " Libraries: ${LIBS}"
  514. echo
  515. echo " 'ngircd' binary: $S"
  516. echo " Configuration file: $C"
  517. echo " Manual pages: $M"
  518. echo " Documentation: $D"
  519. echo
  520. echo $ECHO_N " Syslog support: $ECHO_C"
  521. test "$x_syslog_on" = "yes" \
  522. && echo $ECHO_N "yes $ECHO_C" \
  523. || echo $ECHO_N "no $ECHO_C"
  524. echo $ECHO_N " Enable debug code: $ECHO_C"
  525. test "$x_debug_on" = "yes" \
  526. && echo "yes" \
  527. || echo "no"
  528. echo $ECHO_N " zlib compression: $ECHO_C"
  529. test "$x_zlib_on" = "yes" \
  530. && echo $ECHO_N "yes $ECHO_C" \
  531. || echo $ECHO_N "no $ECHO_C"
  532. echo $ECHO_N " IRC sniffer: $ECHO_C"
  533. test "$x_sniffer_on" = "yes" \
  534. && echo "yes" \
  535. || echo "no"
  536. echo $ECHO_N " Use TCP Wrappers: $ECHO_C"
  537. test "$x_tcpwrap_on" = "yes" \
  538. && echo $ECHO_N "yes $ECHO_C" \
  539. || echo $ECHO_N "no $ECHO_C"
  540. echo $ECHO_N " Strict RFC mode: $ECHO_C"
  541. test "$x_strict_rfc_on" = "yes" \
  542. && echo "yes" \
  543. || echo "no"
  544. echo $ECHO_N " IDENT support: $ECHO_C"
  545. test "$x_identauth_on" = "yes" \
  546. && echo $ECHO_N "yes $ECHO_C" \
  547. || echo $ECHO_N "no $ECHO_C"
  548. echo $ECHO_N " IRC+ protocol: $ECHO_C"
  549. test "$x_ircplus_on" = "yes" \
  550. && echo "yes" \
  551. || echo "no"
  552. echo $ECHO_N " IPv6 protocol: $ECHO_C"
  553. test "$x_ipv6_on" = "yes" \
  554. && echo $ECHO_N "yes $ECHO_C" \
  555. || echo $ECHO_N "no $ECHO_C"
  556. echo $ECHO_N " I/O backend: $ECHO_C"
  557. echo "\"$x_io_backend\""
  558. echo $ECHO_N " PAM support: $ECHO_C"
  559. test "$x_pam_on" = "yes" \
  560. && echo $ECHO_N "yes $ECHO_C" \
  561. || echo $ECHO_N "no $ECHO_C"
  562. echo $ECHO_N " SSL support: $ECHO_C"
  563. echo "$x_ssl_lib"
  564. echo
  565. # -eof-