1dnl modules enabled in this directory by default 2 3dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) 4 5APACHE_MODPATH_INIT(filters) 6 7APACHE_MODULE(buffer, Filter Buffering, , , most) 8APACHE_MODULE(data, RFC2397 data encoder, , , ) 9APACHE_MODULE(ratelimit, Output Bandwidth Limiting, , , most) 10APACHE_MODULE(reqtimeout, Limit time waiting for request from client, , , yes) 11APACHE_MODULE(ext_filter, external filter module, , , most) 12APACHE_MODULE(request, Request Body Filtering, , , most) 13APACHE_MODULE(include, Server Side Includes, , , most) 14APACHE_MODULE(filter, Smart Filtering, , , yes) 15APACHE_MODULE(reflector, Reflect request through the output filter stack, , , ) 16APACHE_MODULE(substitute, response content rewrite-like filtering, , , most) 17 18sed_obj="mod_sed.lo sed0.lo sed1.lo regexp.lo" 19APACHE_MODULE(sed, filter request and/or response bodies through sed, $sed_obj, , most, [ 20 if test "x$enable_sed" = "xshared"; then 21 # The only symbol which needs to be exported is the module 22 # structure, so ask libtool to hide libsed internals: 23 APR_ADDTO(MOD_SED_LDADD, [-export-symbols-regex sed_module]) 24 fi 25]) 26 27if test "$ac_cv_ebcdic" = "yes"; then 28# mod_charset_lite can be very useful on an ebcdic system, 29# so include it by default 30 APACHE_MODULE(charset_lite, character set translation. Enabled by default only on EBCDIC systems., , , yes) 31else 32 APACHE_MODULE(charset_lite, character set translation. Enabled by default only on EBCDIC systems., , , ) 33fi 34 35 36APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [ 37 AC_ARG_WITH(z, APACHE_HELP_STRING(--with-z=PATH,use a specific zlib library), 38 [ 39 if test "x$withval" != "xyes" && test "x$withval" != "x"; then 40 ap_zlib_base="$withval" 41 ap_zlib_with="yes" 42 fi 43 ]) 44 if test "x$ap_zlib_base" = "x"; then 45 AC_MSG_CHECKING([for zlib location]) 46 AC_CACHE_VAL(ap_cv_zlib,[ 47 for dir in /usr/local /usr ; do 48 if test -d $dir && test -f $dir/include/zlib.h; then 49 ap_cv_zlib=$dir 50 break 51 fi 52 done 53 ]) 54 ap_zlib_base=$ap_cv_zlib 55 if test "x$ap_zlib_base" = "x"; then 56 enable_deflate=no 57 AC_MSG_RESULT([not found]) 58 else 59 AC_MSG_RESULT([$ap_zlib_base]) 60 fi 61 fi 62 if test "$enable_deflate" != "no"; then 63 ap_save_includes=$INCLUDES 64 ap_save_ldflags=$LDFLAGS 65 ap_save_cppflags=$CPPFLAGS 66 ap_zlib_ldflags="" 67 if test "$ap_zlib_base" != "/usr"; then 68 APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include]) 69 APR_ADDTO(MOD_INCLUDES, [-I${ap_zlib_base}/include]) 70 dnl put in CPPFLAGS temporarily so that AC_TRY_LINK below will work 71 CPPFLAGS="$CPPFLAGS $INCLUDES" 72 APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib]) 73 APR_ADDTO(ap_zlib_ldflags, [-L${ap_zlib_base}/lib]) 74 if test "x$ap_platform_runtime_link_flag" != "x"; then 75 APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag${ap_zlib_base}/lib]) 76 APR_ADDTO(ap_zlib_ldflags, [$ap_platform_runtime_link_flag${ap_zlib_base}/lib]) 77 fi 78 fi 79 APR_ADDTO(LIBS, [-lz]) 80 AC_MSG_CHECKING([for zlib library]) 81 AC_TRY_LINK([#include <zlib.h>], [int i = Z_OK;], 82 [AC_MSG_RESULT(found) 83 APR_ADDTO(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])], 84 [AC_MSG_RESULT(not found) 85 enable_deflate=no 86 if test "x$ap_zlib_with" = "x"; then 87 AC_MSG_WARN([... Error, zlib was missing or unusable]) 88 else 89 AC_MSG_ERROR([... Error, zlib was missing or unusable]) 90 fi 91 ]) 92 INCLUDES=$ap_save_includes 93 LDFLAGS=$ap_save_ldflags 94 CPPFLAGS=$ap_save_cppflags 95 APR_REMOVEFROM(LIBS, [-lz]) 96 fi 97]) 98 99AC_DEFUN([FIND_LIBXML2], [ 100 AC_CACHE_CHECK([for libxml2], [ac_cv_libxml2], [ 101 AC_ARG_WITH(libxml2, 102 [APACHE_HELP_STRING(--with-libxml2=PATH,location for libxml2)], 103 [test_paths="${with_libxml2}/include/libxml2 ${with_libxml2}/include ${with_libxml2}"], 104 [test_paths="/usr/include/libxml2 /usr/local/include/libxml2 /usr/include /usr/local/include"] 105 ) 106 AC_MSG_CHECKING(for libxml2) 107 xml2_path="" 108 for x in ${test_paths}; do 109 if test -f "${x}/libxml/parser.h"; then 110 xml2_path="${x}" 111 break 112 fi 113 done 114 if test -n "${xml2_path}" ; then 115 ac_cv_libxml2=yes 116 XML2_INCLUDES="${xml2_path}" 117 else 118 ac_cv_libxml2=no 119 fi 120 ]) 121]) 122 123APACHE_MODULE(xml2enc, i18n support for markup filters, , , , [ 124 FIND_LIBXML2 125 if test "$ac_cv_libxml2" = "yes" ; then 126 APR_ADDTO(MOD_CFLAGS, [-I${XML2_INCLUDES}]) 127 APR_ADDTO(MOD_XML2ENC_LDADD, [-lxml2]) 128 else 129 enable_xml2enc=no 130 fi 131]) 132APACHE_MODULE(proxy_html, Fix HTML Links in a Reverse Proxy, , , , [ 133 FIND_LIBXML2 134 if test "$ac_cv_libxml2" = "yes" ; then 135 APR_ADDTO(MOD_CFLAGS, [-I${XML2_INCLUDES}]) 136 APR_ADDTO(MOD_PROXY_HTML_LDADD, [-lxml2]) 137 else 138 enable_proxy_html=no 139 fi 140] 141) 142 143APACHE_MODULE(brotli, Brotli compression support, , , most, [ 144 AC_ARG_WITH(brotli, APACHE_HELP_STRING(--with-brotli=PATH,Brotli installation directory),[ 145 if test "$withval" != "yes" -a "x$withval" != "x"; then 146 ap_brotli_base="$withval" 147 ap_brotli_with=yes 148 fi 149 ]) 150 ap_brotli_found=no 151 if test -n "$ap_brotli_base"; then 152 ap_save_cppflags=$CPPFLAGS 153 APR_ADDTO(CPPFLAGS, [-I${ap_brotli_base}/include]) 154 AC_MSG_CHECKING([for Brotli library >= 0.6.0 via prefix]) 155 AC_TRY_COMPILE( 156 [#include <brotli/encode.h>],[ 157const uint8_t *o = BrotliEncoderTakeOutput((BrotliEncoderState*)0, (size_t*)0); 158if (o) return *o;], 159 [AC_MSG_RESULT(yes) 160 ap_brotli_found=yes 161 ap_brotli_cflags="-I${ap_brotli_base}/include" 162 ap_brotli_libs="-L${ap_brotli_base}/lib -lbrotlienc -lbrotlicommon"], 163 [AC_MSG_RESULT(no)] 164 ) 165 CPPFLAGS=$ap_save_cppflags 166 else 167 if test -n "$PKGCONFIG"; then 168 AC_MSG_CHECKING([for Brotli library >= 0.6.0 via pkg-config]) 169 if $PKGCONFIG --exists "libbrotlienc >= 0.6.0"; then 170 AC_MSG_RESULT(yes) 171 ap_brotli_found=yes 172 ap_brotli_cflags=`$PKGCONFIG libbrotlienc --cflags` 173 ap_brotli_libs=`$PKGCONFIG libbrotlienc --libs` 174 else 175 AC_MSG_RESULT(no) 176 fi 177 fi 178 fi 179 if test "$ap_brotli_found" = "yes"; then 180 APR_ADDTO(MOD_CFLAGS, [$ap_brotli_cflags]) 181 APR_ADDTO(MOD_BROTLI_LDADD, [$ap_brotli_libs]) 182 if test "$enable_brotli" = "shared"; then 183 dnl The only symbol which needs to be exported is the module 184 dnl structure, so ask libtool to hide everything else: 185 APR_ADDTO(MOD_BROTLI_LDADD, [-export-symbols-regex brotli_module]) 186 fi 187 else 188 enable_brotli=no 189 if test "$ap_brotli_with" = "yes"; then 190 AC_MSG_ERROR([Brotli library was missing or unusable]) 191 fi 192 fi 193]) 194 195APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) 196 197APACHE_MODPATH_FINISH 198