lighttpd 1.4.x https://www.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1769 lines
46 KiB

  1. dnl -*- Autoconf -*-
  2. dnl Process this file with autoconf to produce a configure script.
  3. dnl
  4. dnl Indentation rules:
  5. dnl - closing braces not at the beginning of a line must match opening
  6. dnl braces earlier on that line
  7. dnl - closing braces at the beginning of a line:
  8. dnl - must not be followed by anything else apart from "," or comments
  9. dnl - must match opening braces from another line and indented the
  10. dnl same as that other line
  11. dnl - if one argument was put on a new line, all following arguments
  12. dnl must be on their own line too
  13. dnl - if an argument uses more than one line and is not a single
  14. dnl function call, the argument should be on different lines than the
  15. dnl wrapping braces
  16. AC_PREREQ(2.60)
  17. AC_INIT([lighttpd], [1.4.56], [https://redmine.lighttpd.net/projects/lighttpd/boards/2], [lighttpd], [https://www.lighttpd.net/])
  18. AC_CONFIG_SRCDIR([src/server.c])
  19. AC_CONFIG_HEADER([config.h])
  20. AC_CONFIG_MACRO_DIR([m4])
  21. AC_CANONICAL_HOST
  22. AM_INIT_AUTOMAKE([1.13 -Wall -Wno-portability -Wno-override foreign dist-xz tar-ustar serial-tests silent-rules subdir-objects])
  23. dnl @synopsis TRY_CFLAGS [compiler flags]
  24. dnl @summary check whether compiler supports given flags and adds them to CFLAGS
  25. AC_DEFUN([TRY_CFLAGS],
  26. [dnl
  27. AC_MSG_CHECKING([if $CC supports $1])
  28. AC_LANG_PUSH([C])
  29. ac_try_cflags_saved_cflags="${CFLAGS}"
  30. CFLAGS="${CFLAGS} $1"
  31. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
  32. [AC_MSG_RESULT([yes])],
  33. [
  34. AC_MSG_ERROR([no])
  35. CFLAGS="${ac_try_cflags_saved_cflags}"
  36. ]
  37. )
  38. AC_LANG_POP([C])
  39. ])
  40. dnl @synopsis TRY_LDFLAGS [linker flags]
  41. dnl @summary check whether linker supports given flags and adds them to LDFLAGS
  42. AC_DEFUN([TRY_LDFLAGS],
  43. [dnl
  44. AC_MSG_CHECKING([if $LD supports $1])
  45. AC_LANG_PUSH([C])
  46. ac_try_ldflags_saved_ldflags="${LDFLAGS}"
  47. LDFLAGS="${LDFLAGS} $1"
  48. AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
  49. [AC_MSG_RESULT([yes])],
  50. [
  51. AC_MSG_ERROR([no])
  52. LDFLAGS="${ac_try_ldflags_saved_cflags}"
  53. ]
  54. )
  55. AC_LANG_POP([C])
  56. ])
  57. dnl Checks for programs.
  58. AC_PROG_CC
  59. AC_PROG_CC_STDC
  60. AX_PROG_CC_FOR_BUILD
  61. AC_PROG_LD
  62. AC_PROG_INSTALL
  63. AC_PROG_CPP
  64. AC_PROG_MAKE_SET
  65. AC_USE_SYSTEM_EXTENSIONS
  66. AM_PROG_AR
  67. dnl AC_CANONICAL_HOST
  68. case "$host_os" in
  69. *darwin*|*cygwin*|*aix*|*mingw*|*midipix* ) NO_RDYNAMIC=yes ;;
  70. * ) NO_RDYNAMIC=no ;;
  71. esac
  72. AM_CONDITIONAL([NO_RDYNAMIC], [test "$NO_RDYNAMIC" = yes])
  73. AM_CONDITIONAL([LIGHTTPD_STATIC], [test "$LIGHTTPD_STATIC" = yes])
  74. AC_EXEEXT
  75. dnl libtool
  76. AC_DISABLE_STATIC
  77. AC_ENABLE_SHARED
  78. AC_LIBTOOL_DLOPEN
  79. AC_PROG_LIBTOOL
  80. dnl for solaris
  81. CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
  82. dnl Checks for header files.
  83. dnl check for:
  84. dnl inttypes.h => HAVE_INTTYPES_H
  85. dnl stdint.h => HAVE_STDINT_H
  86. dnl and maybe more (which shouldn't be relied on)
  87. AC_HEADER_STDC
  88. dnl checks for sys/wait.h => HAVE_SYS_WAIT_H
  89. AC_HEADER_SYS_WAIT
  90. AC_CHECK_HEADERS([\
  91. getopt.h \
  92. poll.h \
  93. port.h \
  94. pwd.h \
  95. stdlib.h \
  96. strings.h \
  97. sys/devpoll.h \
  98. sys/epoll.h \
  99. sys/event.h \
  100. sys/filio.h \
  101. sys/loadavg.h \
  102. sys/mman.h \
  103. sys/poll.h \
  104. sys/prctl.h \
  105. sys/resource.h \
  106. sys/select.h \
  107. sys/sendfile.h \
  108. sys/time.h \
  109. sys/uio.h \
  110. sys/un.h \
  111. syslog.h \
  112. uuid/uuid.h \
  113. ])
  114. dnl Checks for typedefs, structures, and compiler characteristics.
  115. AC_C_CONST
  116. AC_C_INLINE
  117. AC_TYPE_OFF_T
  118. AC_TYPE_PID_T
  119. AC_TYPE_SIZE_T
  120. AC_CHECK_MEMBER([struct tm.tm_gmtoff],
  121. [AC_DEFINE([HAVE_STRUCT_TM_GMTOFF], [1], [gmtoff in struct tm])],
  122. [],
  123. [#include <time.h>]
  124. )
  125. AC_CHECK_TYPES([socklen_t],
  126. [], dnl defines HAVE_SOCKLEN_T
  127. [],
  128. [
  129. #include <sys/types.h>
  130. #include <sys/socket.h>
  131. ]
  132. )
  133. dnl openssl on solaris needs -lsocket -lnsl
  134. AC_SEARCH_LIBS([socket], [socket])
  135. AC_SEARCH_LIBS([gethostbyname], [nsl socket])
  136. dnl On Haiku accept() and friends are in libnetwork
  137. AC_SEARCH_LIBS([accept], [network])
  138. dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
  139. AC_SEARCH_LIBS([clock_gettime], [rt])
  140. dnl FreeBSD elftc_copyfile()
  141. save_LIBS=$LIBS
  142. LIBS=
  143. AC_SEARCH_LIBS([elftc_copyfile], [elftc], [
  144. AC_CHECK_HEADERS([libelftc.h], [
  145. ELFTC_LIB=$LIBS
  146. AC_DEFINE([HAVE_LIBELFTC], [1], [libelftc])
  147. AC_DEFINE([HAVE_ELFTC_COPYFILE], [1], [elftc_copyfile])
  148. ])
  149. ])
  150. LIBS=$save_LIBS
  151. AC_SUBST([ELFTC_LIB])
  152. dnl need dlopen/-ldl to load plugins (when not on windows)
  153. save_LIBS=$LIBS
  154. LIBS=
  155. AC_SEARCH_LIBS([dlopen], [dl], [
  156. AC_CHECK_HEADERS([dlfcn.h], [
  157. DL_LIB=$LIBS
  158. AC_DEFINE([HAVE_LIBDL], [1], [libdl])
  159. AC_DEFINE([HAVE_DLFCN_H], [1])
  160. ])
  161. ])
  162. LIBS=$save_LIBS
  163. AC_SUBST([DL_LIB])
  164. dnl prepare pkg-config usage below
  165. PKG_PROG_PKG_CONFIG
  166. dnl checking for libev
  167. AC_MSG_NOTICE([----------------------------------------])
  168. AC_MSG_CHECKING([for libev support])
  169. AC_ARG_WITH([libev],
  170. [AC_HELP_STRING([--with-libev@<:@=PATH@:>@],
  171. [Include libev support for fdevent handlers in PATH/include and PATH/lib]
  172. )],
  173. [WITH_LIBEV=$withval],
  174. [WITH_LIBEV=no]
  175. )
  176. AC_MSG_RESULT([$WITH_LIBEV])
  177. LIBEV_CFLAGS=
  178. LIBEV_LIBS=
  179. if test "$WITH_LIBEV" != no; then
  180. PKG_CHECK_MODULES([LIBEV], [libev], [], [
  181. dnl no pkg-config for libev, searching manually:
  182. if test "$WITH_LIBEV" != yes; then
  183. LIBEV_CFLAGS="-I$WITH_LIBEV/include"
  184. LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
  185. else
  186. AC_CHECK_HEADERS([ev.h],
  187. [AC_CHECK_LIB([ev], [ev_time],
  188. [
  189. LIBEV_CFLAGS=
  190. LIBEV_LIBS="-lev"
  191. ],
  192. [AC_MSG_ERROR([libev not found])]
  193. )],
  194. [AC_MSG_ERROR([libev header not found])]
  195. )
  196. fi
  197. ])
  198. AC_DEFINE([HAVE_LIBEV], [1], [libev support])
  199. fi
  200. AC_SUBST([LIBEV_CFLAGS])
  201. AC_SUBST([LIBEV_LIBS])
  202. dnl Checks for mysql
  203. AC_MSG_NOTICE([----------------------------------------])
  204. AC_MSG_CHECKING([for MySQL support])
  205. AC_ARG_WITH([mysql],
  206. [AC_HELP_STRING([--with-mysql@<:@=PATH@:>@],
  207. [Include MySQL support. PATH is the path to 'mysql_config']
  208. )],
  209. [WITH_MYSQL=$withval],
  210. [WITH_MYSQL=no]
  211. )
  212. AC_MSG_RESULT([$WITH_MYSQL])
  213. MYSQL_CFLAGS=
  214. MYSQL_LIBS=
  215. if test "$WITH_MYSQL" != no; then
  216. if test "$WITH_MYSQL" = yes; then
  217. PKG_CHECK_MODULES([MYSQL],[mariadb],[
  218. MYSQL_CONFIG=$PKG_CONFIG
  219. ],[
  220. PKG_CHECK_MODULES([MYSQL],[mysqlclient],[
  221. MYSQL_CONFIG=$PKG_CONFIG
  222. ],[
  223. AC_PATH_PROG([MYSQL_CONFIG], [mysql_config])
  224. ])
  225. ])
  226. else
  227. MYSQL_CONFIG=$WITH_MYSQL
  228. fi
  229. if test "$MYSQL_CONFIG" != "$PKG_CONFIG"; then
  230. if test -z "$MYSQL_CONFIG"; then
  231. AC_MSG_ERROR([mysql_config is not found])
  232. fi
  233. if test ! -x "$MYSQL_CONFIG"; then
  234. AC_MSG_ERROR([mysql_config not exists or not executable, use --with-mysql=path-to-mysql_config])
  235. fi
  236. if "$MYSQL_CONFIG" | grep -- '--include' > /dev/null ; then
  237. MYSQL_CFLAGS=`"$MYSQL_CONFIG" --include | sed s/\'//g`
  238. else
  239. MYSQL_CFLAGS=`"$MYSQL_CONFIG" --cflags | sed s/\'//g`
  240. fi
  241. MYSQL_LIBS=`"$MYSQL_CONFIG" --libs | sed s/\'//g`
  242. fi
  243. AC_MSG_CHECKING([for MySQL includes at])
  244. AC_MSG_RESULT([$MYSQL_CFLAGS])
  245. AC_MSG_CHECKING([for MySQL libraries at])
  246. AC_MSG_RESULT([$MYSQL_LIBS])
  247. AC_DEFINE([HAVE_MYSQL], [1], [mysql support])
  248. fi
  249. AM_CONDITIONAL([BUILD_WITH_MYSQL], [test "$WITH_MYSQL" != no])
  250. AC_SUBST([MYSQL_LIBS])
  251. AC_SUBST([MYSQL_CFLAGS])
  252. dnl Checks for pgsql
  253. AC_MSG_NOTICE([----------------------------------------])
  254. AC_MSG_CHECKING([for PgSQL support])
  255. AC_ARG_WITH([pgsql],
  256. [AC_HELP_STRING([--with-pgsql@<:@=PATH@:>@],
  257. [Include PgSQL support. PATH is the path to 'pg_config']
  258. )],
  259. [WITH_PGSQL=$withval],
  260. [WITH_PGSQL=no]
  261. )
  262. AC_MSG_RESULT([$WITH_PGSQL])
  263. PGSQL_CFLAGS=
  264. PGSQL_LIBS=
  265. if test "$WITH_PGSQL" != no; then
  266. if test "$WITH_PGSQL" = yes; then
  267. PKG_CHECK_MODULES([PGSQL],[libpq],[
  268. PGSQL_CONFIG=$PKG_CONFIG
  269. ],[
  270. AC_PATH_PROG([PGSQL_CONFIG], [pg_config])
  271. ])
  272. else
  273. PGSQL_CONFIG=$WITH_PGSQL
  274. fi
  275. if test "$PGSQL_CONFIG" != "$PKG_CONFIG"; then
  276. if test -z "$PGSQL_CONFIG"; then
  277. AC_MSG_ERROR([pg_config is not found])
  278. fi
  279. if test ! -x "$PGSQL_CONFIG"; then
  280. AC_MSG_ERROR([pg_config not exists or not executable, use --with-pgsql=path-to-pg_config])
  281. fi
  282. PGSQL_CFLAGS="-I`"$PGSQL_CONFIG" --includedir`"
  283. PGSQL_LIBS="-L`"$PGSQL_CONFIG" --libdir` -lpq"
  284. fi
  285. AC_MSG_CHECKING([for PgSQL includes at])
  286. AC_MSG_RESULT([$PGSQL_CFLAGS])
  287. AC_MSG_CHECKING([for PgSQL libraries at])
  288. AC_MSG_RESULT([$PGSQL_LIBS])
  289. AC_DEFINE([HAVE_PGSQL], [1], [pgsql support])
  290. fi
  291. AM_CONDITIONAL([BUILD_WITH_PGSQL], [test "$WITH_PGSQL" != no])
  292. AC_SUBST([PGSQL_LIBS])
  293. AC_SUBST([PGSQL_CFLAGS])
  294. dnl Checks for libdbi library
  295. AC_MSG_NOTICE([----------------------------------------])
  296. AC_MSG_CHECKING([for LibDBI support])
  297. AC_ARG_WITH([dbi],
  298. [AC_HELP_STRING([--with-dbi@<:@=PATH@:>@],
  299. [Include DBI support in PATH/include/dbi.h and PATH/lib]
  300. )],
  301. [WITH_DBI=$withval],
  302. [WITH_DBI=no]
  303. )
  304. AC_MSG_RESULT([$WITH_DBI])
  305. DBI_INCLUDE=
  306. DBI_LIBS=
  307. if test "$WITH_DBI" != no; then
  308. if test "$WITH_DBI" != yes; then
  309. DBI_CFLAGS="-I$WITH_DBI/include"
  310. DBI_LIBS="-L$WITH_DBI/lib -ldbi"
  311. else
  312. AC_CHECK_HEADERS([dbi/dbi.h],
  313. [AC_CHECK_LIB([dbi], [dbi_version],
  314. [
  315. DBI_CFLAGS=
  316. DBI_LIBS="-ldbi"
  317. ],
  318. [AC_MSG_ERROR([LibDBI not found])]
  319. )],
  320. [AC_MSG_ERROR([LibDBI header not found])]
  321. )
  322. fi
  323. AC_DEFINE([HAVE_DBI], [1], [LibDBI support])
  324. fi
  325. AM_CONDITIONAL([BUILD_WITH_DBI], [test "$WITH_DBI" != no])
  326. AC_SUBST([DBI_LIBS])
  327. AC_SUBST([DBI_CFLAGS])
  328. dnl Checks for libsasl2 library
  329. AC_MSG_NOTICE([----------------------------------------])
  330. AC_MSG_CHECKING([for LibSASL support])
  331. AC_ARG_WITH([sasl],
  332. [AC_HELP_STRING([--with-sasl@<:@=PATH@:>@],
  333. [Include SASL support in PATH/include/sasl/sasl.h and PATH/lib]
  334. )],
  335. [WITH_SASL=$withval],
  336. [WITH_SASL=no]
  337. )
  338. AC_MSG_RESULT([$WITH_SASL])
  339. SASL_INCLUDE=
  340. SASL_LIBS=
  341. if test "$WITH_SASL" != no; then
  342. if test "$WITH_SASL" != yes; then
  343. SASL_CFLAGS="-I$WITH_SASL/include"
  344. SASL_LIBS="-L$WITH_SASL/lib -lsasl2"
  345. else
  346. AC_CHECK_HEADERS([sasl/sasl.h],
  347. [AC_CHECK_LIB([sasl2], [sasl_server_init],
  348. [
  349. SASL_CFLAGS=
  350. SASL_LIBS="-lsasl2"
  351. ],
  352. [AC_MSG_ERROR([libsasl2 not found])]
  353. )],
  354. [AC_MSG_ERROR([SASL header not found])]
  355. )
  356. fi
  357. AC_DEFINE([HAVE_SASL], [1], [LibSASL support])
  358. fi
  359. AM_CONDITIONAL([BUILD_WITH_SASL], [test "$WITH_SASL" != no])
  360. AC_SUBST([SASL_LIBS])
  361. AC_SUBST([SASL_CFLAGS])
  362. dnl Check for LDAP
  363. AC_MSG_NOTICE([----------------------------------------])
  364. AC_MSG_CHECKING([for LDAP support])
  365. AC_ARG_WITH([ldap],
  366. [AC_HELP_STRING([--with-ldap], [enable LDAP support])],
  367. [WITH_LDAP=$withval],
  368. [WITH_LDAP=no]
  369. )
  370. AC_MSG_RESULT([$WITH_LDAP])
  371. if test "$WITH_LDAP" != no; then
  372. AC_CHECK_LIB([ldap], [ldap_sasl_bind_s],
  373. [AC_CHECK_HEADERS([ldap.h],
  374. [
  375. LDAP_LIB=-lldap
  376. AC_DEFINE([HAVE_LIBLDAP], [1], [libldap])
  377. AC_DEFINE([HAVE_LDAP_H], [1])
  378. ],
  379. [AC_MSG_ERROR([ldap headers not found, install them or build without --with-ldap])]
  380. )],
  381. [AC_MSG_ERROR([ldap library not found, install it or build without --with-ldap])]
  382. )
  383. AC_SUBST([LDAP_LIB])
  384. AC_CHECK_LIB([lber], [ber_printf],
  385. [AC_CHECK_HEADERS([lber.h],
  386. [
  387. LBER_LIB=-llber
  388. AC_DEFINE([HAVE_LIBLBER], [1], [liblber])
  389. AC_DEFINE([HAVE_LBER_H], [1])
  390. ],
  391. [AC_MSG_ERROR([lber headers not found, install them or build without --with-ldap])]
  392. )],
  393. [AC_MSG_ERROR([lber library not found, install it or build without --with-ldap])]
  394. )
  395. AC_SUBST([LBER_LIB])
  396. fi
  397. AM_CONDITIONAL([BUILD_WITH_LDAP], [test "$WITH_LDAP" != no])
  398. dnl Check for PAM
  399. AC_MSG_NOTICE([----------------------------------------])
  400. AC_MSG_CHECKING(for PAM support)
  401. AC_ARG_WITH([pam],
  402. [AC_HELP_STRING([--with-pam],[enable PAM support])],
  403. [WITH_PAM=$withval],
  404. [WITH_PAM=no]
  405. )
  406. AC_MSG_RESULT([$withval])
  407. if test "$WITH_PAM" != "no"; then
  408. AC_CHECK_LIB([pam], [pam_start],
  409. [AC_CHECK_HEADERS([security/pam_appl.h],[
  410. PAM_LIB=-lpam
  411. AC_DEFINE([HAVE_PAM], [1], [libpam])
  412. AC_DEFINE([HAVE_SECURITY_PAM_APPL_H], [1])
  413. ],
  414. [AC_MSG_ERROR([pam headers not found, install them or build without --with-pam])]
  415. )],
  416. [AC_MSG_ERROR([pam library not found, install it or build without --with-pam])]
  417. )
  418. AC_SUBST(PAM_LIB)
  419. fi
  420. AM_CONDITIONAL([BUILD_WITH_PAM], [test "$WITH_PAM" != no])
  421. dnl Check for xattr
  422. AC_MSG_NOTICE([----------------------------------------])
  423. AC_MSG_CHECKING([for extended attributes support])
  424. AC_ARG_WITH([attr],
  425. [AC_HELP_STRING([--with-attr], [enable extended attribute support])],
  426. [WITH_ATTR=$withval],
  427. [WITH_ATTR=no]
  428. )
  429. AC_MSG_RESULT([$WITH_ATTR])
  430. if test "$WITH_ATTR" != no; then
  431. have_xattr=no
  432. # libattr (linux only?)
  433. AC_CHECK_LIB([attr], [attr_get], [
  434. AC_CHECK_HEADERS([attr/attributes.h], [
  435. ATTR_LIB=-lattr
  436. AC_DEFINE([HAVE_XATTR], [1], [libattr])
  437. AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
  438. have_xattr=yes
  439. ])
  440. ])
  441. AC_SUBST([ATTR_LIB])
  442. # Linux getxattr
  443. AC_CHECK_FUNC([getxattr], [
  444. AC_CHECK_HEADERS([sys/xattr.h], [
  445. AC_DEFINE([HAVE_XATTR], [1], [Linux extended attributes])
  446. AC_DEFINE([HAVE_SYS_XATTR_H], [1])
  447. have_xattr=yes
  448. ])
  449. ])
  450. # (Free)BSD extattr
  451. AC_CHECK_FUNC([extattr_get_file], [
  452. AC_CHECK_HEADERS([sys/extattr.h], [
  453. AC_DEFINE([HAVE_EXTATTR], [1], [BSD extended attributes])
  454. AC_DEFINE([HAVE_SYS_EXTATTR_H], [1])
  455. have_xattr=yes
  456. ])
  457. ])
  458. if test "$have_xattr" = no; then
  459. AC_MSG_ERROR([no backend found implementing extended attributes])
  460. fi
  461. fi
  462. dnl Check for valgrind
  463. AC_MSG_NOTICE([----------------------------------------])
  464. AC_MSG_CHECKING([for valgrind])
  465. AC_ARG_WITH([valgrind],
  466. [AC_HELP_STRING([--with-valgrind],
  467. [enable internal support for valgrind]
  468. )],
  469. [WITH_VALGRIND=$withval],
  470. [WITH_VALGRIND=no]
  471. )
  472. AC_MSG_RESULT([$WITH_VALGRIND])
  473. if test "$WITH_VALGRIND" != no; then
  474. AC_CHECK_HEADERS([valgrind/valgrind.h], [], [
  475. AC_MSG_ERROR([valgrind headers not found. install them or build without --with-valgrind])
  476. ])
  477. fi
  478. dnl Checking for libunwind
  479. AC_MSG_NOTICE([----------------------------------------])
  480. AC_MSG_CHECKING([for libunwind])
  481. AC_ARG_WITH([libunwind],
  482. [AC_HELP_STRING([--with-libunwind],
  483. [Include libunwind support for backtraces on assert failures]
  484. )],
  485. [WITH_LIBUNWIND=$withval],
  486. [WITH_LIBUNWIND=no]
  487. )
  488. AC_MSG_RESULT([$WITH_LIBUNWIND])
  489. if test "$WITH_LIBUNWIND" != no; then
  490. PKG_CHECK_MODULES([LIBUNWIND], [libunwind], [], [
  491. AC_MSG_ERROR([libunwind not found. install it or build without --with-libunwind])
  492. ])
  493. AC_DEFINE([HAVE_LIBUNWIND], [1], [Have libunwind support])
  494. fi
  495. dnl Checking for kerberos5
  496. AC_MSG_NOTICE([----------------------------------------])
  497. AC_MSG_CHECKING([for kerberos5])
  498. AC_ARG_WITH([krb5],
  499. [AC_HELP_STRING([--with-krb5@<:@=DIR@:>@], [Use Kerberos 5])],
  500. [WITH_KRB5=$withval],
  501. [WITH_KRB5=no]
  502. )
  503. AC_MSG_RESULT([$WITH_KRB5])
  504. if test "$WITH_KRB5" != no; then
  505. if test "$WITH_KRB5" != yes; then
  506. krb5_append_CPPFLAGS=" -I$WITH_KRB5/include"
  507. krb5_append_LDFLAGS=" -L$WITH_KRB5/lib"
  508. fi
  509. fi
  510. AC_MSG_CHECKING([custom include directory for kerberos5])
  511. AC_ARG_WITH([krb5-includes],
  512. [AC_HELP_STRING([--with-krb5-includes=DIR], [Kerberos includes])],
  513. [
  514. if test "$WITH_KRB5" = no; then
  515. AC_MSG_ERROR([build --with-krb5 to use --with-krb5-includes])
  516. fi
  517. krb5_append_CPPFLAGS=" -I$withval"
  518. AC_MSG_RESULT([$withval])
  519. ],
  520. [AC_MSG_RESULT([no])]
  521. )
  522. AC_MSG_CHECKING([custom lib directory for kerberos5])
  523. AC_ARG_WITH([krb5-libs],
  524. [AC_HELP_STRING([--with-krb5-libs=DIR], [Kerberos libraries])],
  525. [
  526. if test "$WITH_KRB5" = no; then
  527. AC_MSG_ERROR([build --with-krb5 to use --with-krb5-libs])
  528. fi
  529. krb5_append_LDFLAGS=" -L$withval"
  530. AC_MSG_RESULT([$withval])
  531. ],
  532. [AC_MSG_RESULT([no])]
  533. )
  534. if test "$WITH_KRB5" != no; then
  535. CPPFLAGS="${CPPFLAGS}${krb5_append_CPPFLAGS}"
  536. LDFLAGS="${LDFLAGS}${krb5_append_LDFLAGS}"
  537. AC_CHECK_LIB([gssapi_krb5], [gss_acquire_cred],
  538. [AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],
  539. [
  540. KRB5_LIB="-lkrb5 -lgssapi_krb5"
  541. AC_DEFINE([HAVE_KRB5], [1], [libgssapi_krb5])
  542. ],
  543. [AC_MSG_ERROR([gssapi_krb5 headers were not found, install them or build without --with-krb5])]
  544. )],
  545. [AC_MSG_ERROR([gssapi_krb5 libs were not found, install them or build without --with-krb5])]
  546. )
  547. case "$host_os" in
  548. *darwin*|*cygwin* ) KRB5_LIB="$KRB5_LIB -lcom_err" ;;
  549. * ) ;;
  550. esac
  551. fi
  552. AM_CONDITIONAL([BUILD_WITH_KRB5], [test "$WITH_KRB5" != no])
  553. AC_SUBST([KRB5_LIB])
  554. dnl Check for openssl
  555. AC_MSG_NOTICE([----------------------------------------])
  556. AC_MSG_CHECKING([for OpenSSL])
  557. AC_ARG_WITH([openssl],
  558. [AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],
  559. [Include openssl support (default no)]
  560. )],
  561. [WITH_OPENSSL=$withval],
  562. [WITH_OPENSSL=no]
  563. )
  564. AC_MSG_RESULT([$WITH_OPENSSL])
  565. if test "$WITH_OPENSSL" != no; then
  566. if test "$WITH_OPENSSL" != yes; then
  567. openssl_append_CPPFLAGS=" -I$WITH_OPENSSL/include"
  568. openssl_append_LDFLAGS=" -L$WITH_OPENSSL/lib"
  569. fi
  570. fi
  571. AC_MSG_CHECKING([custom include directory for openssl])
  572. AC_ARG_WITH([openssl-includes],
  573. [AC_HELP_STRING([--with-openssl-includes=DIR], [OpenSSL includes])],
  574. [
  575. if test "$WITH_OPENSSL" = no; then
  576. AC_MSG_ERROR([build --with-openssl to use --with-openssl-includes])
  577. fi
  578. openssl_append_CPPFLAGS=" -I$withval"
  579. AC_MSG_RESULT([$withval])
  580. ],
  581. [AC_MSG_RESULT([no])]
  582. )
  583. AC_MSG_CHECKING([custom lib directory for openssl])
  584. AC_ARG_WITH([openssl-libs],
  585. [AC_HELP_STRING([--with-openssl-libs=DIR], [OpenSSL libraries])],
  586. [
  587. if test "$WITH_OPENSSL" = no; then
  588. AC_MSG_ERROR([build --with-openssl to use --with-openssl-libs])
  589. fi
  590. openssl_append_LDFLAGS=" -L$withval"
  591. AC_MSG_RESULT([$withval])
  592. ],
  593. [AC_MSG_RESULT([no])]
  594. )
  595. if test "$WITH_OPENSSL" != no; then
  596. if test "$WITH_KRB5" != no; then
  597. AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos])
  598. fi
  599. CPPFLAGS="${CPPFLAGS}${openssl_append_CPPFLAGS}"
  600. LDFLAGS="${LDFLAGS}${openssl_append_LDFLAGS}"
  601. AC_CHECK_HEADERS([openssl/ssl.h], [], [
  602. AC_MSG_ERROR([openssl headers not found. install them or build without --with-openssl])
  603. ])
  604. AC_CHECK_LIB([crypto], [BIO_f_base64],
  605. [CRYPTO_LIB="-lcrypto"],
  606. [AC_MSG_ERROR([openssl crypto library not found. install it or build without --with-openssl])]
  607. )
  608. AC_CHECK_LIB([ssl], [SSL_new],
  609. [SSL_LIB="-lssl -lcrypto"],
  610. [AC_MSG_ERROR([openssl ssl library not found. install it or build without --with-openssl])],
  611. [ -lcrypto "$DL_LIB" ]
  612. )
  613. AC_DEFINE([HAVE_LIBSSL], [1], [Have libssl])
  614. AC_SUBST([SSL_LIB])
  615. AC_SUBST([CRYPTO_LIB])
  616. fi
  617. dnl Check for wolfSSL
  618. AC_MSG_NOTICE([----------------------------------------])
  619. AC_MSG_CHECKING([for wolfSSL])
  620. AC_ARG_WITH([wolfssl],
  621. [AC_HELP_STRING([--with-wolfssl@<:@=DIR@:>@],
  622. [Include openssl support (default no)]
  623. )],
  624. [WITH_WOLFSSL=$withval],
  625. [WITH_WOLFSSL=no]
  626. )
  627. AC_MSG_RESULT([$WITH_WOLFSSL])
  628. if test "$WITH_WOLFSSL" != no; then
  629. if test "$WITH_WOLFSSL" = yes; then
  630. WITH_WOLFSSL="/usr/local"
  631. fi
  632. CPPFLAGS="${CPPFLAGS} -I$WITH_WOLFSSL/include -I$WITH_WOLFSSL/include/wolfssl"
  633. LDFLAGS="${LDFLAGS} -L$WITH_WOLFSSL/lib"
  634. AC_CHECK_HEADERS([wolfssl/ssl.h], [], [
  635. AC_MSG_ERROR([wolfssl headers not found. install them or build without --with-wolfssl])
  636. ])
  637. AC_CHECK_LIB([wolfssl], [wolfSSL_Init],
  638. [CRYPTO_LIB="-lwolfssl"],
  639. [AC_MSG_ERROR([wolfssl crypto library not found. install it or build without --with-wolfssl])]
  640. )
  641. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
  642. #include <wolfssl/options.h>
  643. #if !defined(HAVE_LIGHTY) && !defined(OPENSSL_ALL)
  644. #error HAVE_LIGHTY macro not defined
  645. #endif
  646. ]])], [], [AC_MSG_ERROR([wolfssl must be built with ./configure --enable-lighty])])
  647. SSL_LIB="-lwolfssl"
  648. AC_SUBST([SSL_LIB])
  649. AC_SUBST([CRYPTO_LIB])
  650. fi
  651. AM_CONDITIONAL([BUILD_WITH_OPENSSL],
  652. [test "$WITH_OPENSSL" != no || test "$WITH_WOLFSSL" != no])
  653. if test "$WITH_OPENSSL" != no && test "$WITH_WOLFSSL" != no; then
  654. AC_MSG_ERROR([lighttpd should not be built with both --with-openssl and --with-wolfssl])
  655. fi
  656. dnl Check for mbedTLS
  657. AC_MSG_NOTICE([----------------------------------------])
  658. AC_MSG_CHECKING([for mbedTLS])
  659. AC_ARG_WITH([mbedtls],
  660. AC_HELP_STRING([--with-mbedtls@<:@=DIR@:>@],[Include mbedTLS support. DIR points to the installation root. (default no)]),
  661. [WITH_MBEDTLS=$withval],
  662. [WITH_MBEDTLS=no]
  663. )
  664. if test "$WITH_MBEDTLS" != "no"; then
  665. use_mbedtls=yes
  666. if test "$WITH_MBEDTLS" != "yes"; then
  667. CPPFLAGS="$CPPFLAGS -I$WITH_MBEDTLS/include"
  668. LDFLAGS="$LDFLAGS -L$WITH_MBEDTLS/lib"
  669. fi
  670. else
  671. use_mbedtls=no
  672. fi
  673. AC_MSG_RESULT([$use_mbedtls])
  674. AM_CONDITIONAL(BUILD_WITH_MBEDTLS, test ! $WITH_MBEDTLS = no)
  675. if test "x$use_mbedtls" = "xyes"; then
  676. AC_CHECK_HEADERS([mbedtls/ssl.h])
  677. OLDLIBS="$LIBS"
  678. AC_CHECK_LIB(mbedcrypto,mbedtls_base64_encode,
  679. [AC_CHECK_LIB(mbedx509, mbedtls_x509_get_name,
  680. [AC_CHECK_LIB(mbedtls, mbedtls_cipher_info_from_type,
  681. [MTLS_LIB="-lmbedtls -lmbedx509 -lmbedcrypto"
  682. CRYPTO_LIB="-lmbedcrypto"
  683. AC_DEFINE(HAVE_LIBMBEDTLS, [1], [Have libmbedtls library])
  684. AC_DEFINE(HAVE_LIBMBEDX509, [1], [Have libmbedx509 library])
  685. AC_DEFINE(HAVE_LIBMBEDCRYPTO, [1], [Have libmbedcrypto library]) ],
  686. [],[-lmbedcrypto "$DL_LIB"])
  687. ],[],[-lmbedcrypto "$DL_LIB"])
  688. ],[],[])
  689. LIBS="$OLDLIBS"
  690. AC_SUBST(MTLS_LIB)
  691. AC_SUBST(CRYPTO_LIB)
  692. fi
  693. dnl Check for Nettle (and overwrite CRYPTO_LIB if set by OpenSSL or wolfSSL)
  694. AC_MSG_NOTICE([----------------------------------------])
  695. AC_MSG_CHECKING([for Nettle])
  696. AC_ARG_WITH([nettle],
  697. [AC_HELP_STRING([--with-nettle@<:@=DIR@:>@],
  698. [Include Nettle support (default no)]
  699. )],
  700. [WITH_NETTLE=$withval],
  701. [WITH_NETTLE=no]
  702. )
  703. AC_MSG_RESULT([$WITH_NETTLE])
  704. if test "$WITH_NETTLE" != no; then
  705. if test "$WITH_NETTLE" != yes; then
  706. CPPFLAGS="${CPPFLAGS} -I$WITH_NETTLE/include"
  707. LDFLAGS="${LDFLAGS} -L$WITH_NETTLE/lib"
  708. fi
  709. AC_CHECK_HEADERS([nettle/nettle-types.h], [], [
  710. AC_MSG_ERROR([nettle headers not found. install them or build without --with-nettle])
  711. ])
  712. AC_CHECK_LIB([nettle], [nettle_md5_init],
  713. [CRYPTO_LIB="-lnettle"],
  714. [AC_MSG_ERROR([nettle crypto library not found. install it or build without --with-nettle])]
  715. )
  716. AC_SUBST([CRYPTO_LIB])
  717. fi
  718. dnl Check for GnuTLS
  719. AC_MSG_NOTICE([----------------------------------------])
  720. AC_MSG_CHECKING([for GnuTLS])
  721. AC_ARG_WITH([gnutls],
  722. AC_HELP_STRING([--with-gnutls@<:@=DIR@:>@],[Include GnuTLS support. DIR points to the installation root. (default no)]),
  723. [WITH_GNUTLS=$withval],
  724. [WITH_GNUTLS=no]
  725. )
  726. if test "$WITH_GNUTLS" != "no"; then
  727. use_gnutls=yes
  728. else
  729. use_gnutls=no
  730. fi
  731. AC_MSG_RESULT([$use_gnutls])
  732. AM_CONDITIONAL(BUILD_WITH_GNUTLS, test ! $WITH_GNUTLS = no)
  733. GNUTLS_CFLAGS=
  734. GNUTLS_LIBS=
  735. if test "x$use_gnutls" = "xyes"; then
  736. if test "$WITH_GNUTLS" != "yes"; then
  737. GNUTLS_CFLAGS="-I$WITH_GNUTLS/include"
  738. GNUTLS_LIBS="-L$WITH_GNUTLS/lib"
  739. else
  740. dnl oldest GnuTLS supported release is 3.3.x at time this is being written
  741. PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.3.0])
  742. fi
  743. AC_SUBST([GNUTLS_CFLAGS])
  744. AC_SUBST([GNUTLS_LIBS])
  745. AC_DEFINE([HAVE_GNUTLS_CRYPTO_H], [1], [gnutls/crypto.h])
  746. if test "$WITH_OPENSSL" = no && test "$WITH_WOLFSSL" = no && \
  747. test "$WITH_MBEDTLS" = no && test "$WITH_NETTLE" = no; then
  748. AC_SUBST([CRYPTO_LIB],[$GNUTLS_LIBS])
  749. fi
  750. fi
  751. dnl Check for NSS
  752. AC_MSG_NOTICE([----------------------------------------])
  753. AC_MSG_CHECKING([for NSS])
  754. AC_ARG_WITH([nss],
  755. AC_HELP_STRING([--with-nss@<:@=DIR@:>@],[Include NSS support. DIR points to the installation root. (default no)]),
  756. [WITH_NSS=$withval],
  757. [WITH_NSS=no]
  758. )
  759. if test "$WITH_NSS" != "no"; then
  760. use_nss=yes
  761. else
  762. use_nss=no
  763. fi
  764. AC_MSG_RESULT([$use_nss])
  765. AM_CONDITIONAL(BUILD_WITH_NSS, test ! $WITH_NSS = no)
  766. NSS_CFLAGS=
  767. NSS_LIBS=
  768. if test "x$use_nss" = "xyes"; then
  769. if test "$WITH_NSS" != "yes"; then
  770. NSS_CFLAGS="-I$WITH_NSS/include"
  771. NSS_LIBS="-L$WITH_NSS/lib"
  772. else
  773. PKG_CHECK_MODULES([NSS],[nss])
  774. fi
  775. AC_DEFINE([HAVE_NSS3_NSS_H], [1], [nss3/nss.h])
  776. AC_SUBST([NSS_CFLAGS])
  777. AC_SUBST([NSS_LIBS])
  778. fi
  779. dnl pcre support
  780. AC_MSG_NOTICE([----------------------------------------])
  781. AC_MSG_CHECKING([for perl regular expressions support])
  782. AC_ARG_WITH([pcre],
  783. [AC_HELP_STRING([--with-pcre], [Enable pcre support (default yes)])],
  784. [WITH_PCRE=$withval],
  785. [WITH_PCRE=yes]
  786. )
  787. AC_MSG_RESULT([$WITH_PCRE])
  788. if test "$WITH_PCRE" != no; then
  789. if test "$WITH_PCRE" != yes; then
  790. PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
  791. CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
  792. else
  793. AC_PATH_PROG([PCRECONFIG], [pcre-config])
  794. if test -n "$PCRECONFIG"; then
  795. PCRE_LIB=`"$PCRECONFIG" --libs`
  796. CPPFLAGS="$CPPFLAGS `"$PCRECONFIG" --cflags`"
  797. fi
  798. fi
  799. if test -z "$PCRE_LIB"; then
  800. AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
  801. fi
  802. AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
  803. AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
  804. AC_SUBST([PCRE_LIB])
  805. fi
  806. dnl zlib
  807. AC_MSG_NOTICE([----------------------------------------])
  808. AC_MSG_CHECKING([for zlib support])
  809. AC_ARG_WITH([zlib],
  810. [AC_HELP_STRING([--with-zlib],
  811. [Enable zlib support for mod_deflate]
  812. )],
  813. [WITH_ZLIB=$withval],
  814. [WITH_ZLIB=yes]
  815. )
  816. AC_MSG_RESULT([$WITH_ZLIB])
  817. if test "$WITH_ZLIB" != no; then
  818. if test "$WITH_ZLIB" != yes; then
  819. Z_LIB="-L$WITH_ZLIB -lz"
  820. CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB"
  821. else
  822. AC_CHECK_HEADERS([zlib.h], [],
  823. [AC_MSG_ERROR([zlib headers not found, install them or build without --with-zlib])]
  824. )
  825. AC_CHECK_LIB([z], [deflate],
  826. [Z_LIB=-lz],
  827. [AC_MSG_ERROR([zlib library not found, install it or build without --with-zlib])]
  828. )
  829. fi
  830. AC_DEFINE([HAVE_LIBZ], [1], [libz])
  831. AC_DEFINE([HAVE_ZLIB_H], [1])
  832. AC_SUBST([Z_LIB])
  833. fi
  834. dnl bzip2
  835. AC_MSG_NOTICE([----------------------------------------])
  836. AC_MSG_CHECKING([for bzip2 support])
  837. AC_ARG_WITH([bzip2],
  838. [AC_HELP_STRING([--with-bzip2],
  839. [Enable bzip2 support for mod_deflate]
  840. )],
  841. [WITH_BZIP2=$withval],
  842. [WITH_BZIP2=no]
  843. )
  844. AC_MSG_RESULT([$WITH_BZIP2])
  845. if test "$WITH_BZIP2" != no; then
  846. if test "$WITH_BZIP2" != yes; then
  847. BZ_LIB="-L$WITH_BZIP2 -lbz2"
  848. CPPFLAGS="$CPPFLAGS -I$WITH_BZIP2"
  849. else
  850. AC_CHECK_HEADERS([bzlib.h], [], [
  851. AC_MSG_ERROR([bzip2 headers not found, install them or build without --with-bzip2])
  852. ])
  853. AC_CHECK_LIB([bz2], [BZ2_bzCompress],
  854. [BZ_LIB=-lbz2],
  855. [AC_MSG_ERROR([bzip2 library not found, install it or build without --with-bzip2])]
  856. )
  857. fi
  858. AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
  859. AC_DEFINE([HAVE_BZLIB_H], [1])
  860. AC_SUBST([BZ_LIB])
  861. fi
  862. dnl brotli
  863. AC_MSG_NOTICE([----------------------------------------])
  864. AC_MSG_CHECKING([for brotli support])
  865. AC_ARG_WITH([brotli],
  866. [AC_HELP_STRING([--with-brotli],
  867. [Enable brotli support for mod_deflate]
  868. )],
  869. [WITH_BROTLI=$withval],
  870. [WITH_BROTLI=no]
  871. )
  872. AC_MSG_RESULT([$WITH_BROTLI])
  873. if test "$WITH_BROTLI" != no; then
  874. if test "$WITH_BROTLI" != yes; then
  875. BROTLI_LIB="-L$WITH_BROTLI -lbrotlienc"
  876. CPPFLAGS="$CPPFLAGS -I$WITH_BROTLI"
  877. else
  878. PKG_CHECK_MODULES([BROTLI], [libbrotlienc], [], [
  879. AC_MSG_ERROR([brotli not found, install it or build without --with-brotli])
  880. ])
  881. fi
  882. AC_DEFINE([HAVE_BROTLI_ENCODE_H], [1], [brotli/encode.h])
  883. AC_DEFINE([HAVE_BROTLI], [1], [libbrotlienc])
  884. AC_SUBST([BROTLI_CFLAGS])
  885. AC_SUBST([BROTLI_LIBS])
  886. fi
  887. dnl Check for fam/gamin
  888. AC_MSG_NOTICE([----------------------------------------])
  889. AC_MSG_CHECKING([for FAM])
  890. AC_ARG_WITH([fam],
  891. [AC_HELP_STRING([--with-fam],
  892. [fam/gamin for reducing number of stat() calls]
  893. )],
  894. [WITH_FAM=$withval],
  895. [WITH_FAM=no]
  896. )
  897. AC_MSG_RESULT([$WITH_FAM])
  898. if test "$WITH_FAM" != no; then
  899. if test "$WITH_FAM" != yes; then
  900. FAM_LIBS="-L$WITH_FAM -lfam"
  901. CPPFLAGS="$CPPFLAGS -I$WITH_FAM"
  902. else
  903. AC_CHECK_LIB([fam], [FAMOpen2], [
  904. AC_CHECK_HEADERS([fam.h], [FAM_LIBS=-lfam])
  905. ])
  906. dnl fam has no pkg-config so far, so just search for gamin as fallback
  907. if test -z "$FAM_LIBS"; then
  908. PKG_CHECK_MODULES([FAM], [gamin >= 0.1.0])
  909. fi
  910. fi
  911. if test -z "$FAM_LIBS"; then
  912. AC_MSG_ERROR([fam/gamin headers and/or libs were not found, install them or build without --with-fam])
  913. fi
  914. OLD_LIBS=$LIBS
  915. LIBS=$FAM_LIBS
  916. AC_CHECK_FUNCS([FAMNoExists])
  917. LIBS=$OLD_LIBS
  918. AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
  919. AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
  920. AC_SUBST([FAM_LIBS])
  921. fi
  922. dnl webdav props (xml2 and sqlite3)
  923. AC_MSG_NOTICE([----------------------------------------])
  924. AC_MSG_CHECKING([for properties in mod_webdav])
  925. AC_ARG_WITH([webdav-props],
  926. [AC_HELP_STRING([--with-webdav-props], [properties in mod_webdav])],
  927. [WITH_WEBDAV_PROPS=$withval],
  928. [WITH_WEBDAV_PROPS=no]
  929. )
  930. AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
  931. if test "$WITH_WEBDAV_PROPS" != no; then
  932. AC_MSG_CHECKING([for libxml2])
  933. AC_ARG_WITH([libxml],
  934. [AC_HELP_STRING([--with-libxml],
  935. [libxml2 for properties in mod_webdav]
  936. )],
  937. [WITH_LIBXML=$withval],
  938. [WITH_LIBXML=yes]
  939. )
  940. AC_MSG_RESULT([$WITH_LIBXML])
  941. if test "$WITH_LIBXML" = no; then
  942. AC_MSG_ERROR([--with-webdav-props requires libxml])
  943. fi
  944. if test "$WITH_LIBXML" != yes; then
  945. XML_LIBS="-L$WITH_LIBXML/.libs -lxml2"
  946. XML_CFLAGS="-I$WITH_LIBXML/include"
  947. else
  948. PKG_CHECK_MODULES([XML], [libxml-2.0], [], [
  949. AC_MSG_ERROR([libxml2 not found, install it or build without --with-webdav-props])
  950. ])
  951. fi
  952. AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])
  953. AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])
  954. AC_SUBST([XML_LIBS])
  955. AC_SUBST([XML_CFLAGS])
  956. AC_MSG_CHECKING([for sqlite])
  957. AC_ARG_WITH([sqlite],
  958. [AC_HELP_STRING([--with-sqlite],
  959. [sqlite for properties in mod_webdav]
  960. )],
  961. [WITH_SQLITE=$withval],
  962. [WITH_SQLITE=yes]
  963. )
  964. AC_MSG_RESULT([$WITH_SQLITE])
  965. if test "$WITH_SQLITE" = no; then
  966. AC_MSG_ERROR([--with-webdav-props requires sqlite])
  967. fi
  968. if test "$WITH_SQLITE" != yes; then
  969. SQLITE_LIBS="-L$WITH_SQLITE/.libs -lsqlite3"
  970. SQLITE_CFLAGS="-I$WITH_SQLITE"
  971. else
  972. PKG_CHECK_MODULES([SQLITE], [sqlite3], [], [
  973. AC_MSG_ERROR([sqlite3 not found, install it or build without --with-webdav-props])
  974. ])
  975. fi
  976. AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])
  977. AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])
  978. AC_SUBST([SQLITE_LIBS])
  979. AC_SUBST([SQLITE_CFLAGS])
  980. fi
  981. dnl webdav locks (uuid)
  982. AC_MSG_NOTICE([----------------------------------------])
  983. AC_MSG_CHECKING([for locks in mod_webdav])
  984. AC_ARG_WITH([webdav-locks],
  985. [AC_HELP_STRING([--with-webdav-locks],
  986. [locks in mod_webdav (requires webdav properties)]
  987. )],
  988. [WITH_WEBDAV_LOCKS=$withval],
  989. [WITH_WEBDAV_LOCKS=no]
  990. )
  991. AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
  992. if test "$WITH_WEBDAV_LOCKS" != no; then
  993. if test "$WITH_WEBDAV_PROPS" = no; then
  994. AC_MSG_ERROR([--with-webdav-locks requires --with-webdav-props])
  995. fi
  996. AC_MSG_CHECKING([for libuuid])
  997. AC_ARG_WITH([uuid],
  998. [AC_HELP_STRING([--with-uuid], [uuid for locks in mod_webdav])],
  999. [WITH_UUID=$withval],
  1000. [WITH_UUID=yes]
  1001. )
  1002. AC_MSG_RESULT([$WITH_UUID])
  1003. if test "$WITH_UUID" = no; then
  1004. AC_MSG_ERROR([--with-webdav-locks requires uuid])
  1005. fi
  1006. if test "$WITH_UUID" != yes; then
  1007. UUID_LIBS="-L$WITH_UUID -luuid"
  1008. CPPFLAGS="$CPPFLAGS -I$WITH_UUID"
  1009. else
  1010. AC_CHECK_LIB([uuid], [uuid_unparse],
  1011. [UUID_LIBS=-luuid],
  1012. [AC_MSG_ERROR([uuid lib not found, install it or build without --with-webdav-locks])]
  1013. )
  1014. AC_CHECK_HEADERS([uuid/uuid.h], [],
  1015. [AC_MSG_ERROR([uuid headers not found, install them or build without --with-webdav-locks])]
  1016. )
  1017. fi
  1018. AC_DEFINE([HAVE_LIBUUID], [1], [libuuid])
  1019. AC_DEFINE([HAVE_UUID_UUID_H], [1], [uuid/uuid.h is available])
  1020. AC_SUBST([UUID_LIBS])
  1021. fi
  1022. dnl Check for gdbm
  1023. AC_MSG_NOTICE([----------------------------------------])
  1024. AC_MSG_CHECKING([for gdbm])
  1025. AC_ARG_WITH([gdbm],
  1026. [AC_HELP_STRING([--with-gdbm], [gdbm storage for mod_trigger_b4_dl])],
  1027. [WITH_GDBM=$withval],
  1028. [WITH_GDBM=no]
  1029. )
  1030. AC_MSG_RESULT([$WITH_GDBM])
  1031. if test "$WITH_GDBM" != no; then
  1032. if test "$WITH_GDBM" != yes; then
  1033. GDBM_LIB="-L$WITH_GDBM -lgdbm"
  1034. CPPFLAGS="$CPPFLAGS -I$WITH_GDBM"
  1035. else
  1036. AC_CHECK_LIB([gdbm], [gdbm_open],
  1037. [GDBM_LIB=-lgdbm],
  1038. [AC_MSG_ERROR([gdbm lib not found, install it or build without --with-gdbm])]
  1039. )
  1040. AC_CHECK_HEADERS([gdbm.h], [],
  1041. [AC_MSG_ERROR([gdbm headers not found, install them or build without --with-gdbm])]
  1042. )
  1043. fi
  1044. AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
  1045. AC_DEFINE([HAVE_GDBM_H], [1])
  1046. AC_SUBST([GDBM_LIB])
  1047. fi
  1048. AM_CONDITIONAL([BUILD_WITH_GDBM], [test "$WITH_GDBM" != no])
  1049. dnl Check for GeoIP
  1050. AC_MSG_NOTICE([----------------------------------------])
  1051. AC_MSG_CHECKING([for GeoIP])
  1052. AC_ARG_WITH([geoip],
  1053. [AC_HELP_STRING([--with-geoip], [IP-based geolocation lookup])],
  1054. [WITH_GEOIP=$withval],
  1055. [WITH_GEOIP=no]
  1056. )
  1057. AC_MSG_RESULT([$WITH_GEOIP])
  1058. if test "$WITH_GEOIP" != no; then
  1059. if test "$WITH_GEOIP" != yes; then
  1060. GEOIP_LIB="-L$WITH_GEOIP -lGeoIP"
  1061. CPPFLAGS="$CPPFLAGS -I$WITH_GEOIP"
  1062. else
  1063. AC_CHECK_LIB([GeoIP], [GeoIP_country_name_by_addr],
  1064. [GEOIP_LIB=-lGeoIP],
  1065. [AC_MSG_ERROR([GeoIP lib not found, install it or build without --with-geoip])]
  1066. )
  1067. AC_CHECK_HEADERS([GeoIP.h], [],
  1068. [AC_MSG_ERROR([GeoIP headers not found, install them or build without --with-geoip])]
  1069. )
  1070. fi
  1071. AC_DEFINE([HAVE_GEOIP], [1], [libGeoIP])
  1072. AC_DEFINE([HAVE_GEOIP_H], [1])
  1073. AC_SUBST([GEOIP_LIB])
  1074. fi
  1075. AM_CONDITIONAL([BUILD_WITH_GEOIP], [test "$WITH_GEOIP" != no])
  1076. dnl Check for maxminddb
  1077. AC_MSG_NOTICE([----------------------------------------])
  1078. AC_MSG_CHECKING([for maxminddb])
  1079. AC_ARG_WITH([maxminddb],
  1080. [AC_HELP_STRING([--with-maxminddb], [IP-based geolocation lookup])],
  1081. [WITH_MAXMINDDB=$withval],
  1082. [WITH_MAXMINDDB=no]
  1083. )
  1084. AC_MSG_RESULT([$WITH_MAXMINDDB])
  1085. if test "$WITH_MAXMINDDB" != no; then
  1086. if test "$WITH_MAXMINDDB" != yes; then
  1087. MAXMINDDB_LIB="-L$WITH_MAXMINDDB -lmaxminddb"
  1088. CPPFLAGS="$CPPFLAGS -I$WITH_MAXMINDDB"
  1089. else
  1090. AC_CHECK_LIB([maxminddb], [MMDB_open],
  1091. [MAXMINDDB_LIB=-lmaxminddb],
  1092. [AC_MSG_ERROR([maxminddb lib not found, install it or build without --with-maxminddb])]
  1093. )
  1094. AC_CHECK_HEADERS([maxminddb.h], [],
  1095. [AC_MSG_ERROR([maxminddb headers not found, install them or build without --with-maxminddb])]
  1096. )
  1097. fi
  1098. AC_DEFINE([HAVE_MAXMINDDB], [1], [libmaxminddb])
  1099. AC_DEFINE([HAVE_MAXMINDDB_H], [1])
  1100. AC_SUBST([MAXMINDDB_LIB])
  1101. fi
  1102. AM_CONDITIONAL([BUILD_WITH_MAXMINDDB], [test "$WITH_MAXMINDDB" != no])
  1103. dnl Check for memcached
  1104. AC_MSG_NOTICE([----------------------------------------])
  1105. AC_MSG_CHECKING([for memcached])
  1106. AC_ARG_WITH([memcached],
  1107. [AC_HELP_STRING([--with-memcached],
  1108. [memcached storage for mod_trigger_b4_dl/mod_cml]
  1109. )],
  1110. [WITH_MEMCACHED=$withval],
  1111. [WITH_MEMCACHED=no]
  1112. )
  1113. AC_MSG_RESULT([$WITH_MEMCACHED])
  1114. if test "$WITH_MEMCACHED" != no; then
  1115. if test "$WITH_MEMCACHED" != yes; then
  1116. MEMCACHED_LIB="-L$WITH_MEMCACHED -lMEMCACHED"
  1117. CPPFLAGS="$CPPFLAGS -I$WITH_MEMCACHED"
  1118. else
  1119. AC_CHECK_LIB([memcached], [memcached],
  1120. [ MEMCACHED_LIB=-lmemcached ],
  1121. [AC_MSG_ERROR([memcached lib not found, install it or build without --with-memcached])]
  1122. )
  1123. AC_CHECK_HEADERS([libmemcached/memcached.h], [],
  1124. [AC_MSG_ERROR([memcached headers not found, install them or build without --with-memcached])]
  1125. )
  1126. fi
  1127. AC_DEFINE([USE_MEMCACHED], [1], [libmemcached])
  1128. AC_SUBST([MEMCACHED_LIB])
  1129. fi
  1130. AM_CONDITIONAL([BUILD_WITH_MEMCACHED], [test "$WITH_MEMCACHED" != no])
  1131. BUILD_MOD_TRIGGER_B4_DL=no
  1132. if test "$WITH_MEMCACHED" != no || test "$WITH_GDBM" != no ; then
  1133. BUILD_MOD_TRIGGER_B4_DL=yes
  1134. fi
  1135. AM_CONDITIONAL([BUILD_MOD_TRIGGER_B4_DL], [test "$BUILD_MOD_TRIGGER_B4_DL" != no])
  1136. dnl Check for lua
  1137. AC_MSG_NOTICE([----------------------------------------])
  1138. AC_MSG_CHECKING([if lua-support is requested])
  1139. AC_ARG_WITH([lua],
  1140. [AC_HELP_STRING([--with-lua], [lua engine for mod_magnet/mod_cml])],
  1141. [WITH_LUA=$withval],
  1142. [WITH_LUA=no]
  1143. )
  1144. AC_MSG_RESULT([$WITH_LUA])
  1145. if test "$WITH_LUA" != no; then
  1146. found_lua=0
  1147. if test "$WITH_LUA" != yes; then
  1148. PKG_CHECK_MODULES([LUA], [$WITH_LUA >= 5.1],
  1149. [found_lua=1],
  1150. [AC_MSG_NOTICE([Couldn\'t find requested lua pkg-config module $WITH_LUA])]
  1151. )
  1152. if test "$found_lua" = "0"; then
  1153. LUA_LIBS="-L$WITH_LUA -llua"
  1154. LUA_CFLAGS="-I$WITH_LUA"
  1155. fi
  1156. else
  1157. for luaname in lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua; do
  1158. if test "$found_lua" = "0"; then
  1159. PKG_CHECK_MODULES([LUA], [$luaname >= 5.1],
  1160. [found_lua=1],
  1161. [AC_MSG_NOTICE([Couldn\'t find $luaname])]
  1162. )
  1163. fi
  1164. done
  1165. if test "$found_lua" = "0"; then
  1166. AC_MSG_ERROR([Couldn\'t find any lua pkg-config module])
  1167. fi
  1168. fi
  1169. AC_DEFINE([HAVE_LUA], [1], [liblua])
  1170. AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
  1171. AC_SUBST([LUA_LIBS])
  1172. AC_SUBST([LUA_CFLAGS])
  1173. fi
  1174. AM_CONDITIONAL([BUILD_WITH_LUA], [test "$WITH_LUA" != no])
  1175. dnl "--with-FEATURE" blocks end
  1176. AC_MSG_NOTICE([----------------------------------------])
  1177. dnl search for crypt_r and (fallback) for crypt
  1178. save_LIBS=$LIBS
  1179. LIBS=
  1180. found_crypt=no
  1181. AC_SEARCH_LIBS([crypt_r], [crypt],
  1182. [
  1183. AC_DEFINE([HAVE_CRYPT_R], [1], [crypt_r])
  1184. AC_CHECK_HEADERS([crypt.h])
  1185. CRYPT_LIB=$LIBS
  1186. found_crypt=crypt_r
  1187. ],
  1188. [AC_SEARCH_LIBS([crypt], [crypt], [
  1189. AC_DEFINE([HAVE_CRYPT], [1], [crypt])
  1190. AC_CHECK_HEADERS([crypt.h])
  1191. CRYPT_LIB=$LIBS
  1192. found_crypt=crypt
  1193. ])]
  1194. )
  1195. LIBS=$save_LIBS
  1196. AC_SUBST([CRYPT_LIB])
  1197. AC_MSG_CHECKING([crypt_r/crypt support])
  1198. AC_MSG_RESULT([$found_crypt])
  1199. dnl check whether sendfilev needs -lsendfile
  1200. AC_MSG_NOTICE([----------------------------------------])
  1201. save_LIBS=$LIBS
  1202. LIBS=
  1203. have_sendfilev=no
  1204. AC_SEARCH_LIBS([sendfilev], [sendfile], [
  1205. if test -z "$LIBS"; then
  1206. have_sendfilev=yes
  1207. else
  1208. have_sendfilev=$LIBS
  1209. fi
  1210. SENDFILE_LIB=$LIBS
  1211. AC_DEFINE([HAVE_SENDFILEV], [1], [solaris sendfilev])
  1212. ])
  1213. LIBS=$save_LIBS
  1214. AC_SUBST([SENDFILE_LIB])
  1215. AC_MSG_CHECKING([solaris sendfilev present])
  1216. AC_MSG_RESULT([$have_sendfilev])
  1217. AC_MSG_NOTICE([----------------------------------------])
  1218. case "$host_os" in
  1219. *mingw* ) LIBS="$LIBS -lwsock32" ;;
  1220. * ) ;;
  1221. esac
  1222. AC_CHECK_FUNCS([\
  1223. arc4random_buf \
  1224. chroot \
  1225. clock_gettime \
  1226. copy_file_range \
  1227. epoll_ctl \
  1228. explicit_bzero \
  1229. explicit_memset \
  1230. fork \
  1231. getloadavg \
  1232. getrlimit \
  1233. getuid \
  1234. gmtime_r \
  1235. inet_pton \
  1236. issetugid \
  1237. jrand48 \
  1238. kqueue \
  1239. localtime_r \
  1240. lstat \
  1241. madvise \
  1242. memset \
  1243. memset_s \
  1244. mmap \
  1245. pathconf \
  1246. pipe2 \
  1247. poll \
  1248. port_create \
  1249. select \
  1250. send_file \
  1251. sendfile \
  1252. sendfile64 \
  1253. sigaction \
  1254. signal \
  1255. srandom \
  1256. writev \
  1257. ])
  1258. AC_CHECK_HEADERS([sys/random.h], [AC_CHECK_FUNCS([getentropy])])
  1259. AC_CHECK_HEADERS([linux/random.h], [AC_CHECK_FUNCS([getrandom])])
  1260. AC_MSG_NOTICE([----------------------------------------])
  1261. AC_MSG_CHECKING([if weak symbols are supported])
  1262. AC_LINK_IFELSE(
  1263. [AC_LANG_PROGRAM([[
  1264. __attribute__((weak)) void __dummy(void *x) { }
  1265. void f(void *x) { __dummy(x); }
  1266. ]])],
  1267. [
  1268. AC_MSG_RESULT([yes])
  1269. AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])
  1270. ],
  1271. [AC_MSG_RESULT([no])]
  1272. )
  1273. AC_MSG_NOTICE([----------------------------------------])
  1274. AC_MSG_CHECKING([for Large File System support])
  1275. AC_ARG_ENABLE([lfs],
  1276. [AC_HELP_STRING([--enable-lfs],
  1277. [Turn on Large File System (default)]
  1278. )],
  1279. [
  1280. case "${enableval}" in
  1281. yes) ENABLE_LFS=yes ;;
  1282. no) ENABLE_LFS=no ;;
  1283. *) AC_MSG_ERROR([bad value ${enableval} for --enable-lfs]) ;;
  1284. esac
  1285. ],
  1286. [ ENABLE_LFS=yes ]
  1287. )
  1288. AC_MSG_RESULT([$ENABLE_LFS])
  1289. if test "$ENABLE_LFS" = yes; then
  1290. CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
  1291. fi
  1292. dnl check if sendfile works
  1293. if test "$ac_cv_func_sendfile" = yes; then
  1294. AC_MSG_NOTICE([----------------------------------------])
  1295. AC_MSG_CHECKING([if sendfile works])
  1296. if test "$cross_compiling" = no; then
  1297. AC_TRY_RUN(
  1298. [
  1299. #ifdef HAVE_SYS_SENDFILE_H
  1300. #include <sys/sendfile.h>
  1301. #endif /* HAVE_SYS_SENDFILE_H */
  1302. #include <errno.h>
  1303. int main() {
  1304. int o = 0;
  1305. if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
  1306. return 0;
  1307. }
  1308. ],
  1309. [AC_MSG_RESULT([yes])],
  1310. [
  1311. AC_MSG_RESULT([no])
  1312. AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile])
  1313. ]
  1314. )
  1315. fi
  1316. fi
  1317. dnl Check for IPv6 support
  1318. AC_MSG_NOTICE([----------------------------------------])
  1319. AC_ARG_ENABLE([ipv6],
  1320. [AC_HELP_STRING([--disable-ipv6], [disable IPv6 support])],
  1321. [
  1322. case "${enableval}" in
  1323. yes) ipv6=true ;;
  1324. no) ipv6=false ;;
  1325. *) AC_MSG_ERROR([bad value ${enableval} for --enable-ipv6]) ;;
  1326. esac
  1327. ],
  1328. [ipv6=true]
  1329. )
  1330. if test "$ipv6" = true; then
  1331. AC_CACHE_CHECK([for IPv6 support], [ac_cv_ipv6_support], [
  1332. AC_TRY_LINK(
  1333. [
  1334. #include <sys/types.h>
  1335. #include <sys/socket.h>
  1336. #include <netinet/in.h>
  1337. ],
  1338. [
  1339. struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
  1340. ],
  1341. [ac_cv_ipv6_support=yes],
  1342. [ac_cv_ipv6_support=no]
  1343. )
  1344. ])
  1345. if test "$ac_cv_ipv6_support" = yes; then
  1346. AC_DEFINE([HAVE_IPV6], [1], [Whether to enable IPv6 support])
  1347. else
  1348. AC_MSG_ERROR([IPv6 seems broken. Fix it or build with --disable-ipv6])
  1349. fi
  1350. fi
  1351. # disable mmap by default
  1352. # lighttpd may always use mmap with files it owns (created tmp files)
  1353. AC_MSG_NOTICE([----------------------------------------])
  1354. AC_MSG_CHECKING([use mmap if available])
  1355. AC_ARG_ENABLE([mmap],
  1356. [AC_HELP_STRING([--enable-mmap],
  1357. [use mmap if available]
  1358. )],
  1359. [
  1360. case "${enableval}" in
  1361. yes) mmap=true ;;
  1362. no) mmap=false ;;
  1363. *) AC_MSG_ERROR([bad value ${enableval} for --enable-mmap]) ;;
  1364. esac
  1365. ],
  1366. [mmap=false]
  1367. )
  1368. AC_MSG_RESULT([$mmap])
  1369. if test "$mmap" = true; then
  1370. AC_DEFINE([ENABLE_MMAP], [1], [Use mmap if available])
  1371. fi
  1372. dnl check for fastcgi lib, for the tests only
  1373. AC_MSG_NOTICE([----------------------------------------])
  1374. fastcgi_found=no
  1375. AC_CHECK_LIB([fcgi], [FCGI_Accept], [
  1376. AC_CHECK_HEADERS([fastcgi.h fastcgi/fastcgi.h], [
  1377. fastcgi_found=yes
  1378. ])
  1379. ])
  1380. AM_CONDITIONAL([CHECK_WITH_FASTCGI], [test "$fastcgi_found" = yes])
  1381. AC_MSG_NOTICE([----------------------------------------])
  1382. dnl check for extra compiler options (warning options)
  1383. if test "${GCC}" = yes; then
  1384. TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
  1385. fi
  1386. AC_ARG_ENABLE([extra-warnings],
  1387. [AC_HELP_STRING([--enable-extra-warnings],
  1388. [enable extra warnings (gcc specific)]
  1389. )],
  1390. [
  1391. case "${enableval}" in
  1392. error) extrawarnings=error ;;
  1393. yes) extrawarnings=true ;;
  1394. no) extrawarnings=false ;;
  1395. *) AC_MSG_ERROR([bad value ${enableval} for --enable-extra-warnings]) ;;
  1396. esac
  1397. ],
  1398. [extrawarnings=false]
  1399. )
  1400. if test "$extrawarnings" = true || test "$extrawarnings" = error; then
  1401. TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security])
  1402. TRY_LDFLAGS([-Wl,--as-needed])
  1403. if test "$extrawarnings" = error; then
  1404. AS_VAR_APPEND([CFLAGS], [" -Werror"])
  1405. AS_VAR_APPEND([LDFLAGS], [" -Wl,--fatal-warnings"])
  1406. fi
  1407. fi
  1408. dnl build version-id
  1409. LIGHTTPD_VERSION_ID=m4_format([0x%x%02x%02x], m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))
  1410. AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
  1411. AC_CONFIG_FILES([\
  1412. distribute.sh \
  1413. doc/config/conf.d/Makefile \
  1414. doc/config/Makefile \
  1415. doc/config/vhosts.d/Makefile \
  1416. doc/Makefile \
  1417. doc/outdated/Makefile \
  1418. doc/scripts/Makefile \
  1419. doc/systemd/Makefile \
  1420. Makefile \
  1421. src/Makefile \
  1422. tests/docroot/123/Makefile \
  1423. tests/docroot/Makefile \
  1424. tests/docroot/www/expire/Makefile \
  1425. tests/docroot/www/go/Makefile \
  1426. tests/docroot/www/indexfile/Makefile \
  1427. tests/docroot/www/Makefile \
  1428. tests/Makefile \
  1429. ])
  1430. AC_OUTPUT
  1431. do_build="\
  1432. mod_access \
  1433. mod_accesslog \
  1434. mod_alias \
  1435. mod_auth \
  1436. mod_authn_file \
  1437. mod_cgi \
  1438. mod_deflate \
  1439. mod_dirlisting \
  1440. mod_evhost \
  1441. mod_expire \
  1442. mod_extforward \
  1443. mod_fastcgi \
  1444. mod_flv_streaming \
  1445. mod_indexfile \
  1446. mod_proxy \
  1447. mod_redirect \
  1448. mod_rewrite \
  1449. mod_rrdtool \
  1450. mod_scgi \
  1451. mod_secdownload \
  1452. mod_setenv \
  1453. mod_simple_vhost \
  1454. mod_sockproxy \
  1455. mod_ssi \
  1456. mod_staticfile \
  1457. mod_status \
  1458. mod_userdir \
  1459. mod_usertrack \
  1460. mod_vhostdb \
  1461. mod_webdav \
  1462. mod_wstunnel \
  1463. "
  1464. lighty_track_feature() {
  1465. if eval "$3"; then
  1466. enable_feature="$enable_feature $1"
  1467. do_build="$do_build $2"
  1468. else
  1469. disable_feature="$disable_feature $1"
  1470. no_build="$no_build $2"
  1471. fi
  1472. }
  1473. lighty_track_feature "regex-conditionals" "" \
  1474. 'test "$WITH_PCRE" != no'
  1475. lighty_track_feature "storage-gdbm" "" \
  1476. 'test "$WITH_GDBM" != no'
  1477. lighty_track_feature "storage-memcached" "" \
  1478. 'test "$WITH_MEMCACHED" != no'
  1479. lighty_track_feature "" "mod_trigger_b4_dl" \
  1480. 'test "$BUILD_MOD_TRIGGER_B4_DL" != no'
  1481. lighty_track_feature "mysql" "mod_authn_mysql mod_mysql_vhost mod_vhostdb_mysql" \
  1482. 'test "$WITH_MYSQL" != no'
  1483. lighty_track_feature "postgresql" "mod_vhostdb_pgsql" \
  1484. 'test "$WITH_PGSQL" != no'
  1485. lighty_track_feature "dbi" "mod_authn_dbi mod_vhostdb_dbi" \
  1486. 'test "$WITH_DBI" != no'
  1487. lighty_track_feature "lua" "mod_cml mod_magnet" \
  1488. 'test "$WITH_LUA" != no'
  1489. lighty_track_feature "geoip" "mod_geoip" \
  1490. 'test "$WITH_GEOIP" != no'
  1491. lighty_track_feature "maxminddb" "mod_maxminddb" \
  1492. 'test "$WITH_MAXMINDDB" != no'
  1493. lighty_track_feature "compress-gzip compress-deflate" "" \
  1494. 'test "$WITH_ZLIB" != no'
  1495. lighty_track_feature "compress-bzip2" "" \
  1496. 'test "$WITH_BZIP2" != no'
  1497. lighty_track_feature "compress-brotli" "" \
  1498. 'test "$WITH_BROTLI" != no'
  1499. lighty_track_feature "kerberos" "mod_authn_gssapi" \
  1500. 'test "$WITH_KRB5" != no'
  1501. lighty_track_feature "ldap" "mod_authn_ldap mod_vhostdb_ldap" \
  1502. 'test "$WITH_LDAP" != no'
  1503. lighty_track_feature "pam" "mod_authn_pam" \
  1504. 'test "$WITH_PAM" != no'
  1505. lighty_track_feature "network-openssl" "mod_openssl" \
  1506. 'test "$WITH_OPENSSL" != no || test "$WITH_WOLFSSL" != no'
  1507. lighty_track_feature "network-mbedtls" "mod_mbedtls" \
  1508. 'test "$WITH_MBEDTLS" != no'
  1509. lighty_track_feature "network-gnutls" "mod_gnutls" \
  1510. 'test "$WITH_GNUTLS" != no'
  1511. lighty_track_feature "network-nss" "mod_nss" \
  1512. 'test "$WITH_NSS" != no'
  1513. lighty_track_feature "auth-crypt" "" \
  1514. 'test "$found_crypt" != no'
  1515. lighty_track_feature "network-ipv6" "" \
  1516. 'test "$ac_cv_ipv6_support" != no'
  1517. lighty_track_feature "large-files" "" \
  1518. 'test "$ENABLE_LFS" = yes'
  1519. lighty_track_feature "stat-cache-fam" "" \
  1520. 'test "$WITH_FAM" != no'
  1521. lighty_track_feature "webdav-properties" "" \
  1522. 'test "$WITH_WEBDAV_PROPS" != no'
  1523. lighty_track_feature "webdav-locks" "" \
  1524. 'test "$WITH_WEBDAV_LOCKS" != no'
  1525. dnl output
  1526. $ECHO
  1527. $ECHO "Plugins:"
  1528. $ECHO
  1529. $ECHO "enabled: "
  1530. for p in $do_build; do
  1531. $ECHO " $p"
  1532. done | sort
  1533. $ECHO "disabled: "
  1534. for p in $no_build; do
  1535. $ECHO " $p"
  1536. done | sort
  1537. $ECHO
  1538. $ECHO "Features:"
  1539. $ECHO
  1540. $ECHO "enabled: "
  1541. for p in $enable_feature; do
  1542. $ECHO " $p"
  1543. done | sort
  1544. $ECHO "disabled: "
  1545. for p in $disable_feature; do
  1546. $ECHO " $p"
  1547. done | sort
  1548. $ECHO