]>
Commit | Line | Data |
---|---|---|
b8ae064d | 1 | ## Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
5d2e6f19 AJ |
2 | ## |
3 | ## Squid software is distributed under GPLv2+ license and includes | |
4 | ## contributions from numerous individuals and organizations. | |
5 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
6 | ## | |
7 | ||
672d2a73 | 8 | AC_INIT([Squid Web Proxy],[7.0.0-VCS],[https://bugs.squid-cache.org/],[squid]) |
d966027f | 9 | AC_PREREQ(2.61) |
62979ab1 | 10 | AC_CONFIG_HEADERS([include/autoconf.h]) |
71b12d7c | 11 | AC_CONFIG_AUX_DIR(cfgaux) |
8d9ce05e | 12 | AC_CONFIG_SRCDIR([src/main.cc]) |
3dc6f003 | 13 | AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz]) |
c2720d44 | 14 | AC_REVISION($Revision$)dnl |
a2794549 | 15 | AC_PREFIX_DEFAULT(/usr/local/squid) |
246d7ffc | 16 | AM_MAINTAINER_MODE |
a2794549 | 17 | |
5d2e6f19 | 18 | m4_include([acinclude/ax_with_prog.m4]) |
4ecf021b | 19 | m4_include([acinclude/init.m4]) |
fa522425 | 20 | m4_include([acinclude/squid-util.m4]) |
6a56798f | 21 | m4_include([acinclude/compiler-flags.m4]) |
0abb39dd | 22 | m4_include([acinclude/os-deps.m4]) |
c8093f05 | 23 | m4_include([acinclude/krb5.m4]) |
0d57ed2e | 24 | m4_include([acinclude/ldap.m4]) |
b12b66cd | 25 | m4_include([acinclude/nettle.m4]) |
3c586e38 | 26 | m4_include([acinclude/pam.m4]) |
2b448046 | 27 | m4_include([acinclude/pkg.m4]) |
acd207af | 28 | m4_include([acinclude/tdb.m4]) |
91983da0 | 29 | m4_include([acinclude/lib-checks.m4]) |
09835feb | 30 | m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) |
b9ce9676 | 31 | m4_include([acinclude/win32-sspi.m4]) |
6a56798f | 32 | |
63e02610 | 33 | PRESET_CFLAGS="$CFLAGS" |
a203dec7 | 34 | PRESET_CXXFLAGS="$CXXFLAGS" |
63e02610 | 35 | PRESET_LDFLAGS="$LDFLAGS" |
36 | ||
a2794549 | 37 | dnl Set default LDFLAGS |
a1c22363 | 38 | AS_IF([test "x$LDFLAGS" = "x"],[LDFLAGS="-g"]) |
a2794549 | 39 | |
0c4134e1 AJ |
40 | # check for host OS detail |
41 | AC_CANONICAL_HOST | |
42 | AC_MSG_CHECKING([simplified host os]) | |
43 | simple_host_os=`echo $host_os|sed 's/[0-9].*//g;s/-.*//g'` | |
44 | squid_host_os_version=`echo $host_os|tr -d "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"` | |
45 | AS_IF([test -n "$squid_host_os_version"],[ | |
46 | squid_host_os="`echo $simple_host_os| sed s/$squid_host_os_version//g`" | |
47 | ],[ | |
48 | squid_host_os="$simple_host_os" | |
49 | ]) | |
50 | AC_MSG_RESULT($squid_host_os (version $squid_host_os_version)) | |
51 | # on windows squid_host_os is either mingw or cygwin, version is 32 | |
52 | ||
a2794549 | 53 | AC_PROG_CC |
e6c4cdd6 | 54 | AM_PROG_CC_C_O |
29b8d8d6 | 55 | AC_PROG_CXX |
0c4134e1 AJ |
56 | |
57 | # AC_USE_SYSTEM_EXTENSIONS should be called before any macros that run the C compiler. | |
5139f0f6 | 58 | AC_USE_SYSTEM_EXTENSIONS |
0c4134e1 | 59 | |
62979ab1 | 60 | AC_LANG([C++]) |
3e7b6055 | 61 | |
c8640c9a AJ |
62 | # Clang 3.2 on some CPUs requires -march-native to detect correctly. |
63 | # GCC 4.3+ can also produce faster executables when its used. | |
64 | # But building inside a virtual machine environment has been found to | |
65 | # cause random Illegal Instruction errors due to mis-detection of CPU. | |
66 | AC_ARG_ENABLE(arch-native, | |
67 | AS_HELP_STRING([--disable-arch-native],[Some compilers offer CPU-specific | |
68 | optimizations with the -march=native parameter. | |
69 | This flag disables the optimization. The default is to | |
70 | auto-detect compiler support and use where available.]), [ | |
ec308e40 | 71 | SQUID_YESNO([$enableval],[--enable-arch-native]) |
c8640c9a | 72 | ]) |
d8a4ba7c | 73 | AC_MSG_NOTICE([CPU arch native optimization enabled: ${enable_arch_native:=auto}]) |
a1c22363 | 74 | AS_IF([test "x${enable_arch_native}" != "xno"],[ |
c8640c9a | 75 | SQUID_CC_CHECK_ARGUMENT([squid_cv_check_marchnative],[-march=native]) |
a1c22363 | 76 | ]) |
e9d3951b | 77 | |
09835feb AR |
78 | # If the user did not specify a C++ version. |
79 | user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "(-)std="` | |
80 | AS_IF([test "x$user_cxx" = "x"],[ | |
81 | # Check for C++17 compiler support | |
82 | # May change CXX. | |
83 | AX_CXX_COMPILE_STDCXX([17],[noext],[mandatory]) | |
84 | ]) | |
85 | ||
86 | # Prerequisite: CXX has been finalized. | |
87 | # BUILDCXXFLAGS are defined later, after CXXFLAGS have been finalized. | |
b2f0a375 | 88 | AC_ARG_VAR([BUILDCXX],[path to compiler for building compile-time tools. e.g. cf_gen]) |
a1c22363 AJ |
89 | AS_IF([test "x$HOSTCXX" != "x" -a "x$BUILDCXX" = "x"],[ |
90 | AC_MSG_WARN([Cross-compiling with HOSTCXX is deprecated. Use BUILDCXX instead.]) | |
b2f0a375 | 91 | BUILDCXX="$HOSTCXX" |
a1c22363 AJ |
92 | ]) |
93 | AS_IF([test "x$BUILDCXX" = "x"],[ | |
b2f0a375 | 94 | BUILDCXX="$CXX" |
a1c22363 | 95 | AS_IF([test "x$squid_cv_check_marchnative" = "xyes"],[ |
e9d3951b | 96 | CXXFLAGS="$CXXFLAGS -march=native" |
a1c22363 AJ |
97 | ]) |
98 | ]) | |
b2f0a375 | 99 | AC_SUBST(BUILDCXX) |
de051d9d | 100 | |
aff48cc8 | 101 | # test for programs |
aff48cc8 FC |
102 | AC_PROG_RANLIB |
103 | AC_PROG_CPP | |
104 | AC_PROG_INSTALL | |
105 | AC_PROG_LN_S | |
106 | AC_PROG_EGREP | |
107 | ||
108 | AC_PATH_PROG(SH, sh, /bin/sh) | |
109 | AC_PATH_PROG(FALSE, false, /usr/bin/false) | |
110 | AC_PATH_PROG(TRUE, true, /usr/bin/true) | |
111 | AC_PATH_PROG(MV, mv, $FALSE) | |
112 | AC_PATH_PROG(MKDIR, mkdir, $FALSE) | |
113 | AC_PATH_PROG(LN, ln, cp) | |
114 | AC_PATH_PROG(CHMOD, chmod, $FALSE) | |
6d1c1ab1 | 115 | AC_PATH_PROG(TR, tr, $FALSE) |
aff48cc8 FC |
116 | AC_PATH_PROG(RM, rm, $FALSE) |
117 | dnl Libtool 2.2.6 requires: rm -f | |
118 | RM="$RM -f" | |
119 | ||
d93bf055 AJ |
120 | PKG_PROG_PKG_CONFIG |
121 | ||
aff48cc8 | 122 | AC_PATH_PROG(PERL, perl, none) |
a1c22363 | 123 | AS_IF([test "x$ac_cv_path_PERL" = "xnone"],[ |
aff48cc8 | 124 | AC_MSG_FAILURE([Perl is required to compile Squid. Please install Perl and then re-run configure ]) |
a1c22363 | 125 | ]) |
07f370ee | 126 | AC_PATH_PROG(POD2MAN, pod2man, $FALSE) |
33d1abfe | 127 | AM_CONDITIONAL(ENABLE_POD2MAN_DOC, test "x${ac_cv_path_POD2MAN}" != "x$FALSE") |
aff48cc8 | 128 | |
a1c22363 | 129 | AC_PATH_PROG(AR, ar, $FALSE) |
aff48cc8 | 130 | AR_R="$AR r" |
aff48cc8 FC |
131 | AC_SUBST(AR_R) |
132 | ||
86b8d400 AJ |
133 | AC_PATH_PROG(LINUXDOC, linuxdoc, $FALSE) |
134 | AM_CONDITIONAL(ENABLE_RELEASE_DOCS, test "x${ac_cv_path_LINUXDOC}" != "x$FALSE") | |
135 | ||
552d1774 AJ |
136 | SQUID_RELEASE=`echo $VERSION | cut -d. -f1` |
137 | AC_SUBST(SQUID_RELEASE) | |
138 | ||
cda5e747 | 139 | # pre-define DEFAULT_PREFIX, some modules need it. |
a1c22363 | 140 | AS_IF([test "${prefix}" = "NONE"],[squid_prefix=$ac_default_prefix],[squid_prefix=$prefix]) |
cda5e747 AJ |
141 | AC_DEFINE_UNQUOTED(DEFAULT_PREFIX,[$squid_prefix],[The install prefix]) |
142 | ||
0b45d157 FC |
143 | AC_ARG_ENABLE(strict-error-checking, |
144 | AS_HELP_STRING([--disable-strict-error-checking],[By default squid is compiled | |
2d65bb9a | 145 | with all possible static compiler error-checks enabled. |
cdb352bb | 146 | This flag disables the behavior]), [ |
ec308e40 | 147 | SQUID_YESNO([$enableval],[--enable-strict-error-checking]) |
0b45d157 | 148 | ]) |
cdb352bb | 149 | AC_MSG_NOTICE([strict error checking enabled: ${enable_strict_error_checking:=yes}]) |
d1f95b42 | 150 | |
4313559d | 151 | # LT_INIT requires libtool v2, might as well state it loud |
2663a9c8 | 152 | LT_PREREQ([2.2]) |
5a2409b7 | 153 | LT_INIT([dlopen]) |
a1c22363 AJ |
154 | AS_IF([test "x$ac_top_build_prefix" != "x"],[ |
155 | # LTDL v3-v7 macros assume the autoconf 2.62 variable top_build_prefix is defined | |
156 | # But from autoconf 2.64 its called ac_top_build_prefix and not automatically added to the Makefile | |
157 | # This fixes Linux LTDLv3-v7, and BSD LTDL v2.2 | |
158 | top_build_prefix=${ac_top_build_prefix} | |
159 | AC_SUBST(top_build_prefix) | |
160 | ]) | |
bd9303f5 | 161 | LTDL_INIT |
081863f3 | 162 | |
d9a41469 | 163 | dnl LibTool environment is now prepared for setup. Check that it is usable and initialize. |
081863f3 | 164 | LT_LIB_DLLOAD |
3e7b6055 AR |
165 | |
166 | # Do we need these unconditionally for "make distcheck" to work? | |
167 | AC_SUBST(INCLTDL) | |
168 | AC_SUBST(LIBLTDL) | |
169 | ||
5a2409b7 AJ |
170 | AC_MSG_CHECKING(whether to use loadable modules) |
171 | AS_IF([test "x${enable_shared:=yes}" = "xyes"],[AC_DEFINE(USE_LOADABLE_MODULES,1,[Support Loadable Modules])]) | |
172 | AM_CONDITIONAL(ENABLE_LOADABLE_MODULES, test "x${enable_shared:=yes}" = "xyes") | |
173 | AC_MSG_RESULT([$enable_shared]) | |
174 | ||
07f370ee | 175 | SQUID_CC_GUESS_VARIANT |
fa6307ae | 176 | SQUID_CC_GUESS_OPTIONS |
f9d138eb | 177 | |
be0c7ff0 FC |
178 | dnl find out the exe extension for this platform. |
179 | dnl If it is not empty, use it for CGI as well. | |
a2794549 | 180 | AC_EXEEXT |
181 | AC_OBJEXT | |
a1c22363 | 182 | AS_IF([test "x$EXEEXT" = "x"],[CGIEXT=".cgi"],[CGIEXT=""]) |
7aeb8001 | 183 | AC_SUBST(CGIEXT) |
a2794549 | 184 | |
a396d1f8 | 185 | AM_CONDITIONAL(ENABLE_WIN32SPECIFIC,[test "x$squid_host_os" = "xmingw"]) |
daf2ddfa | 186 | AM_CONDITIONAL(ENABLE_WIN32_IPC,[test "x$squid_host_os" = "xmingw"]) |
fcabe077 | 187 | |
a1c22363 AJ |
188 | AS_CASE(["$squid_host_os"], |
189 | [mingw],[ | |
a1c22363 AJ |
190 | CFLAGS="$CFLAGS -mthreads" |
191 | CXXFLAGS="$CXXFLAGS -mthreads -static-libgcc -static-libstdc++" | |
f44dcb95 AJ |
192 | dnl Check for Winsock only on MinGW |
193 | SQUID_CHECK_WINSOCK_LIB | |
194 | AC_CHECK_HEADERS([ws2tcpip.h winsock2.h windows.h],,,[ | |
195 | #if HAVE_WS2TCPIP_H | |
196 | #include <ws2tcpip.h> | |
197 | #endif | |
198 | #if HAVE_WINSOCK2_H | |
199 | #include <winsock2.h> | |
200 | #endif | |
201 | #if HAVE_WINDOWS_H | |
202 | #include <windows.h> | |
203 | #endif | |
204 | ]) | |
a1c22363 AJ |
205 | MINGW_LIBS="-lmingwex" |
206 | AC_SUBST(MINGW_LIBS) | |
207 | ], | |
208 | ||
209 | [freebsd],[ | |
b5467222 CT |
210 | # FreeBSD places local libraries and packages in /usr/local |
211 | CFLAGS="$CFLAGS -I/usr/local/include" | |
212 | CXXFLAGS="$CXXFLAGS -I/usr/local/include" | |
213 | LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-R/usr/local/lib" | |
a1c22363 AJ |
214 | ] |
215 | ) | |
4b26fae9 | 216 | |
f4aaf39c | 217 | dnl Substitutions |
6a9f6389 | 218 | AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host",[Host type from configure]) |
30a4f2a8 | 219 | |
9603207d | 220 | AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args", |
8075a4da | 221 | [configure command line used to configure Squid]) |
090089c4 | 222 | |
5483d916 | 223 | CACHE_EFFECTIVE_USER="nobody" |
224 | AC_ARG_WITH(default-user, | |
62979ab1 | 225 | AS_HELP_STRING([--with-default-user=USER],[System user account for squid permissions. Default: nobody]), |
5483d916 | 226 | [ CACHE_EFFECTIVE_USER="$withval" ] |
227 | ) | |
228 | AC_SUBST(CACHE_EFFECTIVE_USER) | |
229 | ||
c8d2dc9b AJ |
230 | DEFAULT_LOG_DIR="$localstatedir/logs" |
231 | AC_ARG_WITH(logdir, | |
73862432 | 232 | AS_HELP_STRING([--with-logdir=PATH], |
a1c22363 AJ |
233 | [Default location for squid logs. default: PREFIX/var/logs]),[ |
234 | AS_CASE([$withval], | |
235 | [yes|no],[AC_MSG_ERROR([--with-logdir requires a directory PATH. --with-logdir=PATH])], | |
236 | [DEFAULT_LOG_DIR="$withval"] | |
237 | ) | |
238 | ]) | |
c8d2dc9b AJ |
239 | AC_SUBST(DEFAULT_LOG_DIR) |
240 | ||
2f36643c | 241 | DEFAULT_PID_FILE="$localstatedir/run/@SERVICE_NAME@.pid" |
a7f6af35 | 242 | AC_ARG_WITH(pidfile, |
e0eb5853 | 243 | AS_HELP_STRING([--with-pidfile=PATH], |
a1c22363 AJ |
244 | [Default location for squid pid file. Default: PREFIX/var/run/squid.pid]),[ |
245 | AS_CASE([$withval], | |
246 | [yes|no],[AC_MSG_ERROR([--with-pidfile requires a file PATH. --with-pidfile=PATH])], | |
247 | [DEFAULT_PID_FILE="$withval"] | |
248 | ) | |
e0eb5853 | 249 | ]) |
32f07882 | 250 | AC_SUBST(DEFAULT_PID_FILE) |
a7f6af35 | 251 | |
bf52b026 AJ |
252 | DEFAULT_SWAP_DIR="$localstatedir/cache/squid" |
253 | AC_ARG_WITH(swapdir, | |
254 | AS_HELP_STRING([--with-swapdir=PATH], | |
a1c22363 AJ |
255 | [Default location for squid cache directories. Default: PREFIX/var/cache/squid]),[ |
256 | AS_CASE([$withval], | |
257 | [yes|no],[AC_MSG_ERROR([--with-swapdir requires a directory PATH. --with-swapdir=PATH])], | |
258 | [DEFAULT_SWAP_DIR="$withval"] | |
259 | ) | |
bf52b026 AJ |
260 | ]) |
261 | AC_SUBST(DEFAULT_SWAP_DIR) | |
262 | ||
30a4f2a8 | 263 | dnl Set Default CFLAGS |
a1c22363 AJ |
264 | AS_IF([test "x$PRESET_CFLAGS" = "x"],[ |
265 | AS_IF([test "$squid_cv_compiler" = "gcc"],[ | |
266 | # TODO check if these exceptions are still necessary | |
267 | AS_CASE(["$host"], | |
268 | [*-sun-sunos*],[ | |
269 | # sunos has too many warnings for -Wall to be useful | |
270 | ], | |
271 | [CFLAGS="$squid_cv_cc_option_wall $CFLAGS"] | |
272 | ) | |
273 | ],[ | |
274 | AS_CASE(["$host"], | |
275 | [*mips-sgi-irix6.*],[ | |
fcabe077 FC |
276 | # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com> |
277 | CFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \ | |
278 | -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \ | |
279 | -Wl,-woff,85,-woff,84,-woff,134 \ | |
280 | -nostdinc -I/usr/include -D_BSD_SIGNALS $CFLAGS" | |
281 | CXXFLAGS="$squid_cv_cc_option_optimize -OPT:Olimit=0:space=OFF \ | |
282 | -woff 1009,1014,1110,1116,1183,1185,1188,1204,1230,1233,1355 \ | |
283 | -Wl,-woff,85,-woff,84,-woff,134 \ | |
284 | -nostdinc -I/usr/include -D_BSD_SIGNALS $CXXFLAGS" | |
a1c22363 AJ |
285 | ]) |
286 | ]) | |
287 | ]) | |
30a4f2a8 | 288 | |
0ba77a3c AR |
289 | AC_MSG_CHECKING([compiler name-version]) |
290 | squid_cv_cc_name=`$CC --version | head -1 | cut -f1 -d" "` | |
291 | AS_CASE([$squid_cv_cc_name], | |
292 | [gcc|clang],[squid_cv_cc_majversion=`$CC -dumpversion | cut -f1 -d.`], | |
293 | [squid_cv_cc_majversion="unknown"] | |
294 | ) | |
295 | squid_cv_cc_simplified="$squid_cv_cc_name-$squid_cv_cc_majversion" | |
296 | AC_MSG_RESULT($squid_cv_cc_simplified) | |
297 | ||
298 | # warning flags | |
299 | ||
300 | # -Wall | |
301 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([$squid_cv_cc_option_wall]) | |
302 | ||
303 | # -Wextra | |
304 | AS_IF([test "$squid_cv_cc_simplified" = "gcc-4"],[ | |
305 | AC_MSG_NOTICE([skipping -Wextra on $squid_cv_cc_simplified]) | |
306 | ],[ | |
307 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wextra]) | |
308 | ||
309 | # Now disable or configure certain warnings enabled by -Wextra | |
310 | ||
311 | # -Wunused-private-field causes a huge number of false positives | |
312 | # in unit tests. Disable that | |
313 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wno-unused-private-field]) | |
314 | ||
09835feb AR |
315 | # ...=5: Do not trust comments about fallthrough cases (GCC). |
316 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wimplicit-fallthrough=5]) | |
317 | AS_IF([test "x$squid_cv_cc_arg_wimplicit_fallthrough_5" != "xyes"], [ | |
0ba77a3c AR |
318 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wno-implicit-fallthrough]) |
319 | ]) | |
320 | ]) | |
321 | ||
8b082ed9 | 322 | # useful warnings that may not be included in -Wall -Wextra |
0ba77a3c AR |
323 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wpointer-arith]) |
324 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wwrite-strings]) | |
325 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wcomments]) | |
326 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wshadow]) | |
327 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Wmissing-declarations]) | |
328 | SQUID_CC_ADD_CXXFLAG_WARNING_IF_SUPPORTED([-Woverloaded-virtual]) | |
07f370ee | 329 | |
05c9db69 | 330 | dnl CentOS (and RHEL) still define ntohs() using deprecated C++ features |
629cb141 | 331 | SQUID_CC_REQUIRE_ARGUMENT([ac_cv_require_wno_deprecated_register],[-Werror -Wno-deprecated-register],[[#include <arpa/inet.h>]],[[int fox=ntohs(1);]]) |
05c9db69 | 332 | |
a1c22363 | 333 | AS_IF([test "x$enable_strict_error_checking" != "xno"],[ |
fcabe077 | 334 | SQUID_CFLAGS="$SQUID_CFLAGS $squid_cv_cc_option_werror" |
59a09b98 | 335 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS $squid_cv_cxx_option_werror" |
a1c22363 | 336 | ]) |
07f370ee | 337 | |
a1c22363 | 338 | AS_IF([test "x$ac_cv_require_wno_deprecated_register" = "xyes"],[ |
0568bff2 | 339 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -Wno-deprecated-register" |
a1c22363 | 340 | ]) |
0568bff2 | 341 | |
e0eb5853 FC |
342 | # squid_cv_cc_arg_pipe is set by SQUID_CC_GUESS_OPTIONS |
343 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS $squid_cv_cc_arg_pipe" | |
344 | SQUID_CFLAGS="$SQUID_CFLAGS $squid_cv_cc_arg_pipe" | |
2060fa9a | 345 | |
4fe75473 FC |
346 | # possibly include some build info tag into squid -v |
347 | SQUID_EMBED_BUILD_INFO | |
348 | ||
83079644 | 349 | AC_ARG_ENABLE(optimizations, |
ffa3bad9 | 350 | AS_HELP_STRING([--disable-optimizations], |
be0c7ff0 | 351 | [Do not compile Squid with compiler optimizations enabled. |
a2f6a96c FC |
352 | Optimization is good for production builds, but not |
353 | good for debugging. During development, use | |
354 | --disable-optimizations to reduce compilation times | |
10185a38 | 355 | and allow easier debugging.]), [ |
a1c22363 AJ |
356 | AS_IF([test "x$enableval" = "xno"],[ |
357 | AC_MSG_NOTICE([Disabling compiler optimizations (-O flag)]) | |
358 | CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9g]]*//'`" | |
359 | CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9g]]*//'`" | |
360 | ]) | |
83079644 | 361 | ]) |
362 | ||
c9267250 AJ |
363 | dnl Nasty hack to get autoconf 2.64 on Linux to run. |
364 | dnl all other uses of RUN_IFELSE are wrapped inside CACHE_CHECK which breaks on 2.64 | |
aff0e8fe | 365 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[:]) |
c9267250 | 366 | |
0d00c98b | 367 | AH_TEMPLATE(XMALLOC_STATISTICS,[Define to have malloc statistics]) |
d9180414 | 368 | AC_ARG_ENABLE(xmalloc-statistics, |
8075a4da FC |
369 | AS_HELP_STRING([--enable-xmalloc-statistics], |
370 | [Show malloc statistics in status page]), [ | |
ec308e40 | 371 | SQUID_YESNO([$enableval],[--enable-xmalloc-statistics]) |
e5f4e1b0 | 372 | ]) |
4d1d2477 FC |
373 | SQUID_DEFINE_BOOL(XMALLOC_STATISTICS,${enable_xmalloc_statistics:=no}, |
374 | [Show malloc statistics in status page]) | |
375 | AC_MSG_NOTICE([xmalloc stats display: $enable_xmalloc_statistics]) | |
e5f4e1b0 | 376 | |
8075a4da | 377 | squid_opt_aufs_threads="" |
f85c88f3 | 378 | AC_ARG_WITH(aufs-threads, |
8075a4da | 379 | AS_HELP_STRING([--with-aufs-threads=N_THREADS], |
a1c22363 AJ |
380 | [Tune the number of worker threads for the aufs object store.]), [ |
381 | AS_CASE([$withval], | |
c881e2b1 | 382 | [@<:@0-9@:>@*],[squid_opt_aufs_threads=$withval], |
8b0d8e31 | 383 | AC_MSG_ERROR(--with-aufs-threads expects a numeric argument) |
a1c22363 AJ |
384 | ) |
385 | ]) | |
386 | AS_IF([test "x$squid_opt_aufs_threads" != "x"],[ | |
387 | AC_MSG_NOTICE([With $squid_opt_aufs_threads aufs threads]) | |
388 | AC_DEFINE_UNQUOTED(AUFS_IO_THREADS,$squid_opt_aufs_threads, | |
389 | [Defines how many threads aufs uses for I/O]) | |
a3310b77 | 390 | ]) |
cd748f27 | 391 | |
24531401 AJ |
392 | ## TODO check if this is necessary, LT_INIT does these checks |
393 | SQUID_AUTO_LIB(dl,[dynamic linking],[LIBDL]) | |
a3bc98c3 | 394 | SQUID_CHECK_LIB_WORKS(dl,[ |
24531401 | 395 | LDFLAGS="$LIBDL_PATH $LDFLAGS" |
a3bc98c3 AJ |
396 | AC_CHECK_LIB(dl, dlopen,[LIBDL_LIBS="-ldl"]) |
397 | LIBS="$LIBDL_LIBS $LIBS" | |
a1c22363 | 398 | ]) |
f85c88f3 | 399 | |
8636e7c1 EB |
400 | AC_DEFUN([LIBATOMIC_CHECKER],[ |
401 | AC_MSG_CHECKING(whether linking $1 -latomic works) | |
402 | AC_LINK_IFELSE([ | |
403 | AC_LANG_SOURCE([[ | |
404 | #include <atomic> | |
405 | #include <cstdint> | |
406 | int | |
b98c6823 HS |
407 | main(int argc, char **) { |
408 | return ( | |
409 | std::atomic<uint8_t>(uint8_t(argc)).exchange(0) && | |
410 | std::atomic<uint64_t>{}.is_lock_free() | |
411 | ) ? 0 : 1; | |
8636e7c1 EB |
412 | } |
413 | ]])],[ | |
414 | AC_MSG_RESULT(yes) | |
415 | libatomic_checker_result="yes"],[ | |
416 | AC_MSG_RESULT(no) | |
417 | libatomic_checker_result="no" | |
418 | ])]) | |
419 | ||
4b0f8912 | 420 | ## check for atomics library before anything that might need it |
16530552 | 421 | SQUID_STATE_SAVE(LIBATOMIC) |
8636e7c1 EB |
422 | LIBATOMIC_CHECKER(without) |
423 | AS_IF([test "x$libatomic_checker_result" = "xno"],[ | |
424 | LIBS="$LIBS -latomic" | |
425 | LIBATOMIC_CHECKER(with) | |
426 | AS_IF([test "x$libatomic_checker_result" = "xyes"],[ | |
427 | ATOMICLIB="-latomic"],[ | |
428 | AC_MSG_ERROR([Required library libatomic not found.]) | |
429 | ])]) | |
16530552 | 430 | SQUID_STATE_ROLLBACK(LIBATOMIC) |
4b0f8912 AJ |
431 | AC_SUBST(ATOMICLIB) |
432 | ||
a186e0d9 AJ |
433 | SQUID_AUTO_LIB(psapi,[Windows PSAPI.dll],[LIBPSAPI]) |
434 | AS_IF([test "x$with_psapi" != "xno"],[ | |
435 | SQUID_STATE_SAVE(squid_psapi_state) | |
436 | CPPFLAGS="$LIBPSAPI_CFLAGS $CPPFLAGS" | |
437 | LIBS="$LIBPSAPI_PATH $LIBS" | |
438 | AC_CHECK_LIB([psapi],[K32GetProcessMemoryInfo],[LIBPSAPI_LIBS="-lpsapi"]) | |
439 | AC_CHECK_HEADER([psapi.h],,,[ | |
440 | #if HAVE_WINDOWS_H | |
441 | #include <windows.h> | |
442 | #endif | |
443 | ]) | |
444 | SQUID_STATE_ROLLBACK(squid_psapi_state) | |
445 | AS_IF([test "x$LIBPSAPI_LIBS" != "x"],[ | |
446 | CXXFLAGS="$LIBPSAPI_CFLAGS $CXXFLAGS" | |
447 | LIBPSAPI_LIBS="$LIBPSAPI_PATH $LIBPSAPI_LIBS" | |
448 | ],[test "x$with_psapi" = "xyes"],[ | |
449 | AC_MSG_ERROR([Required library PSAPI.dll not found]) | |
450 | ],[ | |
451 | AC_MSG_NOTICE([Library PSAPI.dll not found.]) | |
452 | ]) | |
453 | ]) | |
454 | AC_MSG_NOTICE([Using Windows PSAPI.dll library: ${with_psapi:=auto}]) | |
455 | AC_SUBST(LIBPSAPI_LIBS) | |
456 | ||
c975f532 | 457 | AC_SEARCH_LIBS([shm_open], [rt]) |
a1c22363 | 458 | AS_IF([test "x$ac_cv_search_shm_open" != "xno"],[ |
c975f532 | 459 | AC_DEFINE(HAVE_SHM,1,[Support shared memory features]) |
a1c22363 | 460 | ]) |
c975f532 | 461 | |
a1c22363 | 462 | squid_disk_module_candidates= |
2513178d | 463 | AC_ARG_ENABLE(disk-io, |
50fbcbd6 FC |
464 | AS_HELP_STRING([--enable-disk-io="list of modules"], |
465 | [Build support for the list of disk I/O modules. | |
466 | Set without a value or omitted, all available modules will be built. | |
467 | See src/DiskIO for a list of available modules, or | |
468 | Programmers Guide section on DiskIO | |
a1c22363 AJ |
469 | for details on how to build your custom disk module]), |
470 | AS_CASE(["$enableval"], | |
471 | [yes],[], | |
472 | [no|none],[enable_disk_io="no"], | |
473 | [ | |
474 | enable_disk_io="yes" | |
475 | squid_disk_module_candidates="$enableval" | |
476 | ]) | |
477 | ) | |
478 | AS_IF([test "x${enable_disk_io:=yes}" = "xyes"],[ | |
479 | SQUID_LOOK_FOR_MODULES([$srcdir/src/DiskIO],[squid_disk_module_candidates]) | |
480 | AS_IF([test "x$ac_cv_search_shm_open" = "xno"],[ | |
481 | squid_disk_module_candidates=`echo "$squid_disk_module_candidates" | sed 's/IpcIo//g'` | |
482 | ]) | |
483 | ]) | |
484 | SQUID_CLEANUP_MODULES_LIST([squid_disk_module_candidates]) | |
dc299f29 | 485 | SQUID_CHECK_EXISTING_MODULES([$srcdir/src/DiskIO],[squid_disk_module_candidates]) |
a1c22363 AJ |
486 | AC_MSG_NOTICE([DiskIO modules built: ${squid_disk_module_candidates:-none}]) |
487 | SQUID_DEFINE_BOOL(USE_DISKIO,$enable_disk_io,[DiskIO modules are expected to be available.]) | |
40503c27 | 488 | |
2513178d | 489 | dnl Some autoconf.h defines we might enable later... |
0b163dbb FC |
490 | AC_ARG_WITH(pthreads,AS_HELP_STRING([--without-pthreads],[Disable POSIX Threads])) |
491 | AC_ARG_WITH(aio, AS_HELP_STRING([--without-aio],[Do not use POSIX AIO. Default: auto-detect])) | |
daf2ddfa | 492 | ENABLE_WIN32_AIOPS=0 |
ffa3bad9 FC |
493 | squid_opt_use_aio= |
494 | squid_opt_use_diskthreads= | |
46577dd1 | 495 | AIOLIB= |
2513178d AJ |
496 | |
497 | dnl Setup the module paths etc. | |
2513178d AJ |
498 | DISK_LIBS= |
499 | DISK_MODULES= | |
d9691f09 AJ |
500 | AH_TEMPLATE(HAVE_DISKIO_MODULE_AIO, [Whether POSIX AIO Disk I/O module is built]) |
501 | AH_TEMPLATE(HAVE_DISKIO_MODULE_BLOCKING, [Whether Blocking Disk I/O module is built]) | |
502 | AH_TEMPLATE(HAVE_DISKIO_MODULE_DISKDAEMON, [Whether DiskDaemon Disk I/O module is built]) | |
23ee12fb | 503 | AH_TEMPLATE(HAVE_DISKIO_MODULE_DISKTHREADS, [Whether DiskThreads Disk I/O module is built]) |
d9691f09 AJ |
504 | AH_TEMPLATE(HAVE_DISKIO_MODULE_IPCIO, [Whether IpcIo Disk I/O module is built]) |
505 | AH_TEMPLATE(HAVE_DISKIO_MODULE_MMAPPED, [Whether Mmapped Disk I/O module is built]) | |
50fbcbd6 | 506 | for module in $squid_disk_module_candidates none; do |
d235bc84 | 507 | # maybe not needed |
a1c22363 AJ |
508 | AS_IF([test "x$module" = "xnone"],[continue]) |
509 | AS_IF([! test -d "$srcdir/src/DiskIO/$module"],[AC_MSG_ERROR([disk-io $module does not exist])]) | |
510 | AS_CASE(["$module"], | |
511 | [AIO],[ | |
d9691f09 AJ |
512 | dnl Check for POSIX AIO availability |
513 | squid_opt_use_aio="yes" | |
514 | AIOLIB= | |
a1c22363 | 515 | AS_IF([test "x$with_aio" != "xno"],[ |
d9691f09 AJ |
516 | have_aio_header=no |
517 | AC_CHECK_HEADERS(aio.h,[have_aio_header=yes]) | |
518 | dnl On some systems POSIX AIO functions are in librt | |
519 | dnl On some systems POSIX AIO functions are in libaio | |
520 | AC_CHECK_LIB(rt,aio_read,[AIOLIB="-lrt"],AC_CHECK_LIB(aio,aio_read,[AIOLIB="-laio"],[])) | |
521 | dnl Enable AIO if the library and headers are found | |
a1c22363 | 522 | AS_IF([test "x$AIOLIB" != "x" -a "x$have_aio_header" = "xyes"],[ |
d9691f09 AJ |
523 | AC_MSG_NOTICE([Native POSIX AIO support detected.]) |
524 | squid_opt_use_aio="yes" | |
a1c22363 | 525 | ],[ |
d9691f09 AJ |
526 | dnl Windows does things differently. We provide wrappers. |
527 | dnl TODO: Windows really needs its own DiskIO module or its Overlaped IO | |
a1c22363 AJ |
528 | AS_IF([test "$squid_host_os" = "mingw"],[ |
529 | squid_opt_use_aio="yes" | |
530 | AC_MSG_NOTICE([Windows being built. Maybe-enable POSIX AIO.]) | |
531 | ],[ | |
532 | squid_opt_use_aio="no" | |
533 | AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.]) | |
534 | ]) | |
535 | ]) | |
536 | ],[ | |
d9691f09 AJ |
537 | AC_MSG_NOTICE([POSIX AIO support manually disabled.]) |
538 | squid_opt_use_aio="no" | |
a1c22363 | 539 | ]) |
d9691f09 | 540 | dnl Use the POSIX AIO pieces if we actually need them. |
a1c22363 | 541 | AS_IF([test "x$squid_opt_use_aio" = "xyes"],[ |
d9691f09 | 542 | DISK_MODULES="$DISK_MODULES AIO" |
d9691f09 | 543 | AC_DEFINE([HAVE_DISKIO_MODULE_AIO],1,[POSIX AIO Disk I/O module is built]) |
a1c22363 AJ |
544 | AS_IF([test "$squid_host_os" = "mingw"],[ |
545 | ENABLE_WIN32_AIO=1 | |
546 | AC_MSG_NOTICE([Replacing AIO DiskIO module with: Windows overlapped I/O support]) | |
547 | ],[ | |
548 | AC_MSG_NOTICE([Enabling AIO DiskIO module]) | |
549 | ]) | |
550 | ],[ | |
d9691f09 | 551 | AC_MSG_NOTICE([AIO DiskIO Module disabled. Missing POSIX AIO support.]) |
fedd516f | 552 | squid_disk_module_candidates_AIO=no |
a1c22363 AJ |
553 | ]) |
554 | ], | |
d9691f09 | 555 | |
a1c22363 | 556 | [Blocking],[ |
d9691f09 AJ |
557 | AC_MSG_NOTICE([Enabling Blocking DiskIO module]) |
558 | DISK_MODULES="$DISK_MODULES Blocking" | |
d9691f09 | 559 | AC_DEFINE([HAVE_DISKIO_MODULE_BLOCKING],1,[Blocking Disk I/O module is built]) |
a1c22363 AJ |
560 | ], |
561 | ||
562 | [DiskDaemon],[ | |
563 | AS_IF([test "$squid_host_os" = "mingw"],[ | |
564 | AC_MSG_NOTICE([DiskDaemon not supported on MinGW]) | |
565 | squid_disk_module_candidates_DiskDaemon=no | |
566 | ],[ | |
567 | AC_MSG_NOTICE([Enabling DiskDaemon DiskIO module]) | |
568 | DISK_MODULES="$DISK_MODULES DiskDaemon" | |
569 | AC_DEFINE([HAVE_DISKIO_MODULE_DISKDAEMON],1,[DiskDaemon Disk I/O module is built]) | |
570 | ]) | |
571 | ], | |
572 | ||
573 | [DiskThreads],[ | |
507ca601 FC |
574 | squid_opt_use_diskthreads="yes" |
575 | LIBPTHREADS= | |
576 | SQUID_STATE_SAVE([diskthreads_state],[SQUID_CFLAGS SQUID_CXXFLAGS]) | |
a1c22363 AJ |
577 | AS_IF([test "x$with_pthreads" != "xno"],[ |
578 | dnl TODO: this needs to be extended to handle more systems and better | |
579 | dnl REF: http://www.openldap.org/lists/openldap-bugs/200006/msg00070.html | |
580 | dnl REF: http://autoconf-archive.cryp.to/acx_pthread.html | |
581 | AS_CASE(["$squid_host_os"], | |
582 | [mingw],[ | |
daf2ddfa | 583 | ENABLE_WIN32_AIOPS=1 |
507ca601 | 584 | AC_MSG_NOTICE([Windows threads support automatically enabled]) |
a1c22363 AJ |
585 | ], |
586 | ||
587 | [freebsd],[ | |
588 | AS_IF([test `echo "$squid_host_os_version" | tr -d .` -lt 70],[ | |
589 | AC_MSG_NOTICE(pthread library requires FreeBSD 7 or later) | |
590 | squid_opt_use_diskthreads="no" | |
591 | ],[ | |
a0f82085 AJ |
592 | SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT" |
593 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT" | |
a1c22363 AJ |
594 | AS_IF([test "x$GCC" = "xyes" -a "x$PRESET_LDFLAGS" = "x"],[LDFLAGS="$LDFLAGS -pthread"]) |
595 | ]) | |
596 | ], | |
597 | ||
598 | [openbsd],[ | |
599 | AS_IF([test `echo "$squid_host_os_version" | tr -d .` -lt 52],[ | |
600 | AC_MSG_NOTICE(pthread library requires OpenBSD 5.2 or later) | |
601 | squid_opt_use_diskthreads="no" | |
602 | ],[ | |
ec264296 SH |
603 | SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT" |
604 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT" | |
605 | LDFLAGS="$LDFLAGS -lpthread" | |
a1c22363 AJ |
606 | ]) |
607 | ], | |
608 | ||
609 | [solaris],[ | |
610 | AS_IF([test "x$GCC" = "xyes"],[ | |
507ca601 FC |
611 | SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT -pthreads" |
612 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT -pthreads" | |
613 | AC_CHECK_LIB(pthread, pthread_create ,[LIBPTHREADS="-lpthread"], [ | |
614 | AC_MSG_NOTICE(pthread library required but cannot be found.) | |
615 | squid_opt_use_diskthreads="no" | |
616 | ]) | |
a1c22363 | 617 | ],[ |
507ca601 FC |
618 | dnl test for -lpthread first. libc version is a stub apparently on Solaris. |
619 | SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT -lpthread" | |
620 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT -lpthread" | |
621 | AC_SEARCH_LIBS([pthread_create],[pthread thread],[ | |
9603207d | 622 | LIBPTHREADS="" #in LIBS |
507ca601 FC |
623 | ],[ |
624 | AC_MSG_NOTICE(pthread library required but cannot be found.) | |
625 | squid_opt_use_diskthreads="no" | |
626 | ]) | |
a1c22363 AJ |
627 | ]) |
628 | ], | |
629 | ||
630 | [ | |
507ca601 FC |
631 | SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT" |
632 | SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT" | |
633 | AC_CHECK_LIB(pthread, pthread_create ,[LIBPTHREADS="-lpthread"], [ | |
40503c27 FC |
634 | AC_MSG_NOTICE(pthread library required but cannot be found.) |
635 | squid_opt_use_diskthreads="no" | |
636 | ]) | |
a1c22363 AJ |
637 | ] |
638 | ) | |
639 | ],[ | |
640 | AC_MSG_NOTICE([Native pthreads support manually disabled.]) | |
641 | squid_opt_use_diskthreads="no" | |
642 | ]) | |
643 | AS_IF([test "x$squid_opt_use_diskthreads" = "xyes"],[ | |
644 | AC_MSG_NOTICE([Enabling DiskThreads DiskIO module]) | |
645 | DISK_MODULES="$DISK_MODULES DiskThreads" | |
646 | AC_DEFINE([HAVE_DISKIO_MODULE_DISKTHREADS],1,[DiskThreads Disk I/O module is built]) | |
647 | ],[ | |
648 | AC_MSG_NOTICE([Native pthreads support disabled. DiskThreads module automaticaly disabled.]) | |
649 | SQUID_STATE_ROLLBACK([diskthreads_state]) | |
650 | squid_disk_module_candidates_DiskThreads=no | |
651 | ]) | |
652 | ], | |
653 | ||
654 | [IpcIo],[ | |
655 | AS_IF([test "x$ac_cv_search_shm_open" = "xno"],[ | |
fedd516f AJ |
656 | AC_MSG_NOTICE([DiskIO IpcIo module requires shared memory support]) |
657 | squid_disk_module_candidates_IpcIo=no | |
a1c22363 | 658 | ],[ |
23ee12fb | 659 | AC_MSG_NOTICE([Enabling IpcIo DiskIO module]) |
fedd516f | 660 | DISK_MODULES="$DISK_MODULES IpcIo" |
fedd516f | 661 | AC_DEFINE([HAVE_DISKIO_MODULE_IPCIO],1,[IpcIo Disk I/O module is built]) |
a1c22363 AJ |
662 | ]) |
663 | ], | |
2513178d | 664 | |
a1c22363 | 665 | [Mmapped],[ |
e2cbb70e FC |
666 | dnl TODO: use availability of sys/mman.h and/or mmap to define |
667 | dnl OR support windows mmap functions | |
a1c22363 | 668 | AS_IF([test "x$squid_host_os" = "xmingw"],[ |
e2cbb70e | 669 | AC_MSG_NOTICE([Mmapped DiskIO is not available on Mingw]) |
fedd516f | 670 | squid_disk_module_candidates_Mmapped=no |
a1c22363 | 671 | ],[ |
e2cbb70e | 672 | AC_MSG_NOTICE([Enabling Mmapped DiskIO module]) |
e2cbb70e | 673 | DISK_MODULES="$DISK_MODULES Mmapped" |
d9691f09 | 674 | AC_DEFINE([HAVE_DISKIO_MODULE_MMAPPED],1,[Mmapped Disk I/O module is built]) |
a1c22363 AJ |
675 | ]) |
676 | ], | |
e2851fe7 | 677 | |
a1c22363 | 678 | [ |
507ca601 | 679 | AC_MSG_NOTICE([Enabling $module DiskIO module]) |
d9691f09 | 680 | DISK_LIBS="$DISK_LIBS lib${module}.la" |
507ca601 | 681 | DISK_MODULES="$DISK_MODULES ${module}" |
a1c22363 | 682 | ]) |
2513178d AJ |
683 | done |
684 | AC_MSG_NOTICE([IO Modules built: $DISK_MODULES]) | |
685 | AC_SUBST(DISK_MODULES) | |
686 | AC_SUBST(DISK_LIBS) | |
8aafbbc1 | 687 | AM_CONDITIONAL(ENABLE_DISKIO_AIO, test "x$squid_disk_module_candidates_AIO" = "xyes") |
d9691f09 | 688 | AC_SUBST(AIOLIB) |
8aafbbc1 AJ |
689 | AM_CONDITIONAL(ENABLE_WIN32_AIO, test "x$squid_disk_module_candidates_AIO" = "xyes" -a "x$ENABLE_WIN32_AIO" = "x1") |
690 | AM_CONDITIONAL(ENABLE_DISKIO_BLOCKING, test "x$squid_disk_module_candidates_Blocking" = "xyes") | |
691 | AM_CONDITIONAL(ENABLE_DISKIO_DISKDAEMON, test "x$squid_disk_module_candidates_DiskDaemon" = "xyes") | |
692 | AM_CONDITIONAL(ENABLE_DISKIO_DISKTHREADS, test "x$squid_disk_module_candidates_DiskThreads" = "xyes") | |
d9691f09 | 693 | AC_SUBST(LIBPTHREADS) |
8aafbbc1 AJ |
694 | AM_CONDITIONAL(ENABLE_WIN32_AIOPS, test "x$squid_disk_module_candidates_DiskThreads" = "xyes" -a "x$ENABLE_WIN32_AIOPS" = "x1") |
695 | AM_CONDITIONAL(ENABLE_DISKIO_IPCIO, test "x$squid_disk_module_candidates_IpcIo" = "xyes") | |
696 | AM_CONDITIONAL(ENABLE_DISKIO_MMAPPED, test "x$squid_disk_module_candidates_Mmapped" = "xyes") | |
2513178d AJ |
697 | |
698 | dnl Check what Storage formats are wanted. | |
699 | dnl This version will error out with a message saying why if a required DiskIO is missing. | |
d235bc84 FC |
700 | AC_ARG_ENABLE([storeio], |
701 | AS_HELP_STRING([--enable-storeio="list of modules"], | |
702 | [Build support for the list of store I/O modules. | |
18cc92fb FC |
703 | The default is only to build the "ufs" module. |
704 | See src/fs for a list of available modules, or | |
705 | Programmers Guide section <not yet written> | |
507ca601 | 706 | for details on how to build your custom store module]), [ |
a1c22363 AJ |
707 | AS_CASE(["$enableval"], |
708 | [yes],[], | |
709 | [no|none],[enable_storeio="no"], | |
710 | [ | |
711 | enable_storeio="yes" | |
712 | # ufs is really always needed as it has low-level routines | |
713 | # if it is a dupe it will be cleaned-up later | |
714 | squid_storeio_module_candidates="$enableval ufs" | |
715 | ]) | |
716 | ]) | |
717 | AS_IF([test "x${enable_storeio:=yes}" = "xyes"],[ | |
d235bc84 | 718 | SQUID_LOOK_FOR_MODULES([$srcdir/src/fs],[squid_storeio_module_candidates]) |
a1c22363 | 719 | ]) |
dc299f29 FC |
720 | SQUID_CLEANUP_MODULES_LIST([squid_storeio_module_candidates]) |
721 | SQUID_CHECK_EXISTING_MODULES([$srcdir/src/fs],[squid_storeio_module_candidates]) | |
a1c22363 | 722 | AC_MSG_NOTICE([Store modules built: ${squid_storeio_module_candidates:-none}]) |
dc299f29 | 723 | |
a1c22363 AJ |
724 | for fs in ${squid_storeio_module_candidates:-none}; do |
725 | AS_CASE([$fs], | |
726 | [diskd],[ | |
727 | AS_IF([test "x$squid_disk_module_candidates_Blocking" != "xyes" -a \ | |
728 | "x$squid_disk_module_candidates_DiskDaemon" != "xyes"],[ | |
507ca601 | 729 | AC_MSG_ERROR([Storage diskd module requires DiskIO module: Blocking or DiskDaemon]) |
a1c22363 AJ |
730 | ]) |
731 | ], | |
732 | [aufs],[ | |
733 | AS_IF([test "x$squid_disk_module_candidates_Blocking" != "xyes" -a \ | |
734 | "x$squid_disk_module_candidates_DiskThreads" != "xyes"],[ | |
507ca601 | 735 | AC_MSG_ERROR([Storage module aufs requires DiskIO module: Blocking or DiskThreads]) |
a1c22363 AJ |
736 | ]) |
737 | ], | |
738 | [rock],[ | |
739 | AS_IF([test "x$squid_disk_module_candidates_IpcIo" != "xyes" -a \ | |
740 | "x$squid_disk_module_candidates_Blocking" != "xyes"],[ | |
b5b88fb5 | 741 | AC_MSG_ERROR([Storage module Rock requires DiskIO module: Blocking or IpcIo]) |
a1c22363 | 742 | ]) |
b5b88fb5 | 743 | squid_do_build_rock=true |
a1c22363 AJ |
744 | ], |
745 | [ufs],[ | |
746 | AS_IF([test "x$squid_disk_module_candidates_Blocking" != "xyes"],[ | |
b5b88fb5 | 747 | AC_MSG_ERROR([Storage module ufs requires DiskIO module: Blocking]) |
a1c22363 | 748 | ]) |
b5b88fb5 | 749 | squid_do_build_ufs=true |
a1c22363 AJ |
750 | ] |
751 | ) | |
a2794549 | 752 | done |
23ee12fb | 753 | |
8aafbbc1 AJ |
754 | AM_CONDITIONAL(ENABLE_FS_UFS, test "x$squid_do_build_ufs" = "xtrue") |
755 | AM_CONDITIONAL(ENABLE_FS_ROCK, test "x$squid_do_build_rock" = "xtrue") | |
9d6186b1 FC |
756 | dnl hack: need to define those even if not used in the build system to |
757 | dnl make sure that global FS objects are linked to the squid binary. | |
7b5b7ba8 CT |
758 | AH_TEMPLATE(HAVE_FS_UFS, "Define to 1 if ufs filesystem module is build") |
759 | AH_TEMPLATE(HAVE_FS_AUFS, "Define to 1 if aufs filesystem module is build") | |
760 | AH_TEMPLATE(HAVE_FS_DISKD, "Define to 1 if diskd filesystem module is build") | |
e2851fe7 | 761 | AH_TEMPLATE(HAVE_FS_ROCK, "Define to 1 if rock filesystem module is build") |
7b5b7ba8 CT |
762 | |
763 | ||
dc299f29 | 764 | dnl got final squid_storeio_module_candidates, build library lists |
b66455ff AR |
765 | dnl This list will not be needed when each fs library has its own Makefile |
766 | STORE_LIBS_TO_BUILD= | |
767 | dnl File system libraries to link executables with. | |
768 | dnl These are the same as STORE_LIBS_TO_BUILD, but with a path | |
769 | STORE_LIBS_TO_ADD= | |
dc299f29 | 770 | for fs in $squid_storeio_module_candidates; do |
7b5b7ba8 CT |
771 | STORE_LIBS_TO_BUILD="$STORE_LIBS_TO_BUILD lib${fs}.la" |
772 | STORE_LIBS_TO_ADD="$STORE_LIBS_TO_ADD fs/lib${fs}.la" | |
6d1c1ab1 FC |
773 | SQUID_TOUPPER_VAR_CONTENTS([fs]) |
774 | AC_DEFINE_UNQUOTED(HAVE_FS_${fs}, 1) | |
b66455ff AR |
775 | done |
776 | ||
777 | AC_SUBST(STORE_LIBS_TO_BUILD) | |
778 | AC_SUBST(STORE_LIBS_TO_ADD) | |
082a5e7a | 779 | AC_SUBST(STORE_TESTS) |
a2794549 | 780 | |
24a04df9 AJ |
781 | |
782 | dnl At lest one removal policy is always needed. | |
783 | dnl 'lru' removal policy is currently hard-coded by name for tests | |
784 | dnl so we must set it as default. | |
785 | REPL_POLICIES="lru" | |
d9180414 | 786 | AC_ARG_ENABLE(removal-policies, |
56ffc413 FC |
787 | AS_HELP_STRING([--enable-removal-policies="list of policies"], |
788 | [Build support for the list of removal policies. | |
18cc92fb FC |
789 | The default is only to build the "lru" module. |
790 | See src/repl for a list of available modules, or | |
791 | Programmers Guide section 9.9 for details on how | |
507ca601 | 792 | to build your custom policy]), [ |
a1c22363 AJ |
793 | AS_CASE(["$enableval"], |
794 | [yes],[ SQUID_LOOK_FOR_MODULES([$srcdir/src/repl],[REPL_POLICIES]) ], | |
795 | [no],[], | |
796 | [ REPL_POLICIES="$enableval" ] | |
797 | ) | |
798 | ]) | |
799 | SQUID_CLEANUP_MODULES_LIST([REPL_POLICIES]) | |
800 | SQUID_CHECK_EXISTING_MODULES([$srcdir/src/repl],[REPL_POLICIES]) | |
801 | AC_MSG_NOTICE([Removal policies to build: $REPL_POLICIES]) | |
802 | REPL_OBJS="repl/lib`echo \"$REPL_POLICIES\" | sed -e 's% %.a repl/lib%g'`.a" | |
803 | REPL_LIBS=`echo "$REPL_OBJS" | sed -e 's%repl/%%g'` | |
6a566b9c | 804 | AC_SUBST(REPL_POLICIES) |
6a566b9c | 805 | AC_SUBST(REPL_OBJS) |
f71946fc | 806 | AC_SUBST(REPL_LIBS) |
6a566b9c | 807 | |
d1da2d1f | 808 | AM_CONDITIONAL(ENABLE_PINGER, false) |
e5f4e1b0 | 809 | AC_ARG_ENABLE(icmp, |
a1c22363 AJ |
810 | AS_HELP_STRING([--enable-icmp],[Enable ICMP pinging and Network Measurement]),[ |
811 | AS_IF([test "x$enableval" = "xyes"],[ | |
eed82608 | 812 | AC_MSG_NOTICE([ICMP enabled]) |
be0c7ff0 | 813 | AC_DEFINE(USE_ICMP,1,[Define to use Squid ICMP and Network Measurement features (highly recommended!)]) |
d1da2d1f | 814 | AM_CONDITIONAL(ENABLE_PINGER, true) |
a1c22363 | 815 | ]) |
e5f4e1b0 | 816 | ]) |
817 | ||
9a0a18de | 818 | AM_CONDITIONAL(ENABLE_DELAY_POOLS, false) |
d9180414 | 819 | AC_ARG_ENABLE(delay-pools, |
a1c22363 AJ |
820 | AS_HELP_STRING([--enable-delay-pools],[Enable delay pools to limit bandwidth usage]),[ |
821 | AS_IF([test "x$enableval" = "xyes"],[ | |
eed82608 | 822 | AC_MSG_NOTICE([Delay pools enabled]) |
9a0a18de | 823 | AC_DEFINE([USE_DELAY_POOLS],1,[Traffic management via "delay pools".]) |
ffe4ffd8 | 824 | AM_CONDITIONAL(ENABLE_DELAY_POOLS, true) |
a1c22363 | 825 | ]) |
e5f4e1b0 | 826 | ]) |
827 | ||
5fa840c3 | 828 | dnl disable generic/common adaptation support by default |
5069fb38 | 829 | squid_opt_use_adaptation=no |
5fa840c3 | 830 | |
799b66d1 AJ |
831 | squid_opt_use_esi=auto |
832 | AH_TEMPLATE([USE_SQUID_ESI],[Define to enable the ESI processor]) | |
43ae1d95 | 833 | AC_ARG_ENABLE(esi, |
799b66d1 | 834 | AS_HELP_STRING([--disable-esi], |
5cf2197f | 835 | [Disable ESI for accelerators. ESI requires expat or xml2 library. |
7eb77a5f | 836 | Enabling ESI will cause squid reverse proxies to be capable |
5069fb38 | 837 | of the Edge Acceleration Specification (www.esi.org).]), |
799b66d1 | 838 | [squid_opt_use_esi=$enableval],[]) |
88bfe098 | 839 | |
7eb77a5f | 840 | # ESI support libraries: expat |
407c0702 | 841 | AH_TEMPLATE(HAVE_LIBEXPAT,[Define to 1 if you have the expat library]) |
5cf2197f | 842 | SQUID_AUTO_LIB(expat,[ESI expat library],[LIBEXPAT]) |
a1c22363 | 843 | AS_IF([test "x$squid_opt_use_esi" != "xno" -a "x$with_expat" != "xno"],[ |
407c0702 AJ |
844 | SQUID_STATE_SAVE(squid_expat_state) |
845 | PKG_CHECK_MODULES([LIBEXPAT],[expat],[],[ | |
846 | AC_CHECK_LIB([expat],[main],[LIBEXPAT_LIBS="-lexpat"]) | |
799b66d1 | 847 | ]) |
407c0702 AJ |
848 | CPPFLAGS="$LIBEXPAT_CFLAGS $CPPFLAGS" |
849 | AC_CHECK_HEADERS(expat.h) | |
850 | SQUID_STATE_ROLLBACK(squid_expat_state) | |
851 | AS_IF([test "x$LIBEXPAT_LIBS" != "x"],[ | |
852 | squid_opt_use_esi=yes | |
853 | LIBEXPAT_LIBS="$LIBEXPAT_PATH $LIBEXPAT_LIBS" | |
854 | AC_DEFINE(HAVE_LIBEXPAT,1,[Define to 1 if you have the expat library]) | |
855 | ], | |
856 | [test "x$with_expat" = "xyes"],[AC_MSG_ERROR([Required library expat not found.])], | |
857 | [AC_MSG_NOTICE([Library expat not found.])] | |
858 | ) | |
a1c22363 | 859 | ]) |
407c0702 AJ |
860 | AM_CONDITIONAL(ENABLE_LIBEXPAT,[test "x$LIBEXPAT_LIBS" != "x"]) |
861 | AC_SUBST(LIBEXPAT_LIBS) | |
ad32c661 | 862 | |
866a092d AJ |
863 | # ESI support libraries: xml2 |
864 | AH_TEMPLATE(HAVE_LIBXML2,[Define to 1 if you have the xml2 library]) | |
5cf2197f AJ |
865 | SQUID_AUTO_LIB(xml2,[ESI xml2 library],[LIBXML2]) |
866 | AS_IF([test "x$squid_opt_use_esi" != "xno" -a "x$with_xml2" != "xno"],[ | |
8fa07024 FF |
867 | SQUID_STATE_SAVE([squid_libxml2_save]) |
868 | PKG_CHECK_MODULES([LIBXML2],[libxml-2.0],[],[ | |
866a092d | 869 | AC_CHECK_LIB([xml2],[main],[LIBXML2_LIBS="$LIBXML2_PATH -lxml2"]) |
0dc1a86a | 870 | ]) |
37be0e75 | 871 | CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" |
0dc1a86a | 872 | AC_CHECK_HEADERS(libxml/parser.h libxml/HTMLparser.h libxml/HTMLtree.h) |
8fa07024 FF |
873 | SQUID_STATE_ROLLBACK([squid_libxml2_save]) |
874 | ||
a1c22363 | 875 | AS_IF([test "x$LIBXML2_LIBS" != "x"],[ |
799b66d1 | 876 | squid_opt_use_esi=yes |
37be0e75 | 877 | CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" |
866a092d AJ |
878 | LIBXML2_LIBS="$LIBXML2_PATH $LIBXML2_LIBS" |
879 | AC_DEFINE(HAVE_LIBXML2,1,[Define to 1 if you have the xml2 library]) | |
5cf2197f AJ |
880 | ],[test "x$with_xml2" = "xyes"],[ |
881 | AC_MSG_ERROR([Required library xml2 not found]) | |
a1c22363 | 882 | ],[ |
5cf2197f | 883 | AC_MSG_NOTICE([Library xml2 not found.]) |
a1c22363 AJ |
884 | ]) |
885 | ]) | |
866a092d AJ |
886 | AM_CONDITIONAL(ENABLE_LIBXML2,[test "x$LIBXML2_LIBS" != "x"]) |
887 | AC_SUBST(LIBXML2_LIBS) | |
7eb77a5f | 888 | |
799b66d1 | 889 | AS_IF([test "x$squid_opt_use_esi" = "xyes"],[ |
407c0702 | 890 | AS_IF([test "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"],[ |
799b66d1 AJ |
891 | AC_MSG_ERROR([ESI processor requires libxml2 or libexpat]) |
892 | ]) | |
407c0702 | 893 | AC_MSG_NOTICE([Enabling ESI processor: $LIBEXPAT_LIBS $LIBXML2_LIBS]) |
799b66d1 AJ |
894 | AC_DEFINE(USE_SQUID_ESI,1,[Compile the ESI processor]) |
895 | ],[ | |
896 | AS_IF(test "x$squid_opt_use_esi" = "xno",[ | |
897 | AC_MSG_NOTICE([Disabling ESI processor.]) | |
898 | ],[ | |
899 | AC_MSG_NOTICE([Disabling ESI processor. libxml2 and libexpat not found.]) | |
900 | ]) | |
901 | ]) | |
8aafbbc1 | 902 | AM_CONDITIONAL(ENABLE_ESI, test "x$squid_opt_use_esi" = "xyes") |
43ae1d95 | 903 | |
51952383 | 904 | AC_ARG_ENABLE(icap-client, |
4f07726a | 905 | AS_HELP_STRING([--disable-icap-client],[Disable the ICAP client.]),[ |
ec308e40 | 906 | SQUID_YESNO([$enableval],[--enable-icap-client]) |
4f07726a AJ |
907 | ]) |
908 | SQUID_DEFINE_BOOL(ICAP_CLIENT,${enable_icap_client:=yes}, [Enable ICAP client features in Squid]) | |
ebf76e07 | 909 | AS_IF(test "x$enable_icap_client" != "xno", squid_opt_use_adaptation="yes") |
8aafbbc1 | 910 | AM_CONDITIONAL(ENABLE_ICAP_CLIENT, test "x$enable_icap_client" != "xno") |
51952383 | 911 | |
3e7b6055 | 912 | AC_ARG_ENABLE(ecap, |
a1c22363 | 913 | AS_HELP_STRING([--enable-ecap],[support loadable content adaptation modules]),[ |
ec308e40 | 914 | SQUID_YESNO([$enableval],[--enable-ecap])],[ |
a1c22363 AJ |
915 | enable_ecap="no" |
916 | ]) | |
3e7b6055 | 917 | dnl Perform configuration consistency checks for eCAP |
a1c22363 AJ |
918 | AS_IF([test "x$enable_ecap" != "xno"],[ |
919 | AS_IF([test "x$enable_shared" != "xyes"],[ | |
5a2409b7 | 920 | AC_MSG_ERROR([eCAP support requires loadable modules. Please do not use --disable-shared with --enable-ecap.]) |
a1c22363 | 921 | ]) |
4cfba571 | 922 | |
a1c22363 | 923 | AS_IF([test -n "$PKG_CONFIG"],[ |
6666da11 | 924 | dnl eCAP support requires libecap. |
0a720258 | 925 | dnl This Squid supports libecap v1.0.x. |
3e115aaf AR |
926 | dnl Use EXT_ prefix to distinguish external libecap (that we check for |
927 | dnl here) from our own convenience ecap library in Makefiles. | |
0a720258 | 928 | PKG_CHECK_MODULES([EXT_LIBECAP],[libecap >= 1.0 libecap < 1.1]) |
a1c22363 | 929 | ],[ |
cbc14831 | 930 | AC_MSG_NOTICE([eCAP support requires pkg-config to verify the correct library version. Trouble may follow.]) |
a1c22363 | 931 | ]) |
3e7b6055 | 932 | |
ebf76e07 AJ |
933 | SQUID_STATE_SAVE(squid_ecap_state) |
934 | AC_MSG_CHECKING([whether -lecap will link]) | |
a023fd8e AJ |
935 | CXXFLAGS="$CXXFLAGS $EXT_LIBECAP_CFLAGS" |
936 | LIBS="$LIBS $EXT_LIBECAP_LIBS" | |
ebf76e07 AJ |
937 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libecap/common/names.h>]],[[ |
938 | const libecap::Name test("test", libecap::Name::NextId()); | |
939 | ]])],[ | |
940 | AC_MSG_RESULT(yes) | |
5069fb38 | 941 | squid_opt_use_adaptation=yes |
ebf76e07 AJ |
942 | ],[ |
943 | AC_MSG_RESULT(no) | |
a1c22363 AJ |
944 | AS_IF([test "x$enable_ecap" = "xyes"],[ |
945 | AC_MSG_ERROR([eCAP library will not link. | |
ebf76e07 | 946 | You may need to rebuild libecap using the same version of GCC as Squid. |
a1c22363 AJ |
947 | There have been breaking ABI changes in the libstdc++ STL with GCC 5.]) |
948 | ],[ | |
949 | AC_MSG_NOTICE([eCAP library will not link. | |
ebf76e07 AJ |
950 | You may need to rebuild libecap using the same version of GCC as Squid. |
951 | There have been breaking ABI changes in the libstdc++ STL with GCC 5.]) | |
a1c22363 | 952 | enable_ecap="no" |
ebf76e07 AJ |
953 | ]) |
954 | ]) | |
955 | SQUID_STATE_ROLLBACK(squid_ecap_state) | |
a1c22363 AJ |
956 | ]) |
957 | SQUID_DEFINE_BOOL(USE_ECAP,${enable_ecap:=no},[Whether to use eCAP support]) | |
958 | AM_CONDITIONAL(ENABLE_ECAP, test "x$enable_ecap" = "xyes") | |
3e7b6055 | 959 | |
5fa840c3 | 960 | dnl enable adaptation if requested by specific adaptation mechanisms |
8aafbbc1 | 961 | ADAPTATION_LIBS="" |
a1c22363 | 962 | AS_IF([test "x$squid_opt_use_adaptation" = "xyes"],[ADAPTATION_LIBS="adaptation/libadaptation.la"]) |
8aafbbc1 AJ |
963 | SQUID_DEFINE_BOOL(USE_ADAPTATION,${squid_opt_use_adaptation:=no}, [common adaptation support]) |
964 | AM_CONDITIONAL(ENABLE_ADAPTATION, test "x$squid_opt_use_adaptation" = "xyes") | |
5fa840c3 | 965 | AC_SUBST(ADAPTATION_LIBS) |
3e7b6055 | 966 | |
a1c22363 | 967 | AS_IF([test "x$squid_host_os" = "xmingw"],[enable_wccp=no]) |
5069fb38 | 968 | AC_ARG_ENABLE(wccp, |
ec308e40 AJ |
969 | AS_HELP_STRING([--disable-wccp],[Disable Web Cache Coordination Protocol]),[ |
970 | SQUID_YESNO([$enableval],[--enable-wccp]) | |
5069fb38 | 971 | ]) |
0067eb06 | 972 | SQUID_DEFINE_BOOL(USE_WCCP, ${enable_wccp:=yes}, [Define to enable WCCP]) |
1a6b111a | 973 | AC_MSG_NOTICE([Web Cache Coordination Protocol enabled: $enable_wccp]) |
0b0cfcf2 | 974 | |
a1c22363 | 975 | AS_IF([test "x$squid_host_os" = "xmingw"],[enable_wccpv2=no]) |
0b0cfcf2 | 976 | AC_ARG_ENABLE(wccpv2, |
1a6b111a | 977 | AS_HELP_STRING([--disable-wccpv2], |
9603207d | 978 | [Disable Web Cache Coordination V2 Protocol]), [ |
ec308e40 | 979 | SQUID_YESNO([$enableval],[--enable-wccpv2]) |
0b0cfcf2 | 980 | ]) |
0067eb06 | 981 | SQUID_DEFINE_BOOL(USE_WCCPv2,${enable_wccpv2:=yes}, |
1a6b111a FC |
982 | [Define to enable WCCP V2]) |
983 | AC_MSG_NOTICE([Web Cache Coordination V2 Protocol enabled: $enable_wccpv2]) | |
320e9f36 | 984 | |
e5f4e1b0 | 985 | AC_ARG_ENABLE(snmp, |
1d87b6b3 | 986 | AS_HELP_STRING([--disable-snmp],[Disable SNMP monitoring support]), [ |
ec308e40 | 987 | SQUID_YESNO([$enableval],[--enable-snmp]) |
87630341 | 988 | ]) |
0067eb06 | 989 | SQUID_DEFINE_BOOL(SQUID_SNMP,${enable_snmp:=yes}, |
1a6b111a | 990 | [Define to enable SNMP monitoring of Squid]) |
f738d783 | 991 | AM_CONDITIONAL(ENABLE_SNMP, [test "x$enable_snmp" = "xyes"]) |
a1c22363 | 992 | AS_IF([test "x$enable_snmp" = "xyes"],[SNMPLIB="../lib/snmplib/libsnmplib.la"]) |
1a6b111a | 993 | AC_MSG_NOTICE([SNMP support enabled: $enable_snmp]) |
e5f4e1b0 | 994 | AC_SUBST(SNMPLIB) |
e5f4e1b0 | 995 | |
d9180414 | 996 | AC_ARG_ENABLE(cachemgr-hostname, |
5069fb38 FC |
997 | AS_HELP_STRING([--enable-cachemgr-hostname=hostname], |
998 | [Make cachemgr.cgi default to this host. | |
1d87b6b3 | 999 | If unspecified, uses the name of the build-host]), [ |
a1c22363 AJ |
1000 | AS_CASE([$enableval], |
1001 | [yes],[ | |
1002 | AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()], | |
1003 | [If you are upset that the cachemgr.cgi form comes up with the hostname field blank, then define this to getfullhostname()]) | |
1004 | AC_MSG_NOTICE([Cachemgr default hostname == host where cachemgr runs]) | |
1005 | ], | |
1006 | [no],[:], | |
1007 | [ | |
1008 | AC_DEFINE_UNQUOTED(CACHEMGR_HOSTNAME,"${enableval}") | |
1009 | AC_MSG_NOTICE([Cachemgr default hostname set to ${enableval}]) | |
1010 | ]) | |
e5f4e1b0 | 1011 | ]) |
1012 | ||
ee0927b6 | 1013 | AC_ARG_ENABLE(eui, |
1a6b111a | 1014 | AS_HELP_STRING([--disable-eui], |
c8da66ba | 1015 | [Disable use of ARP / MAC/ EUI (ether address)]), [ |
ec308e40 | 1016 | SQUID_YESNO([$enableval],[--enable-eui]) |
1a6b111a | 1017 | ]) |
a1c22363 | 1018 | AS_IF([test "x${enable_eui:=yes}" = "xyes"],[ |
195ec847 AJ |
1019 | SQUID_STATE_SAVE(LIBEUI) |
1020 | # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. | |
1021 | CFLAGS=$SQUID_CFLAGS | |
1022 | CXXFLAGS=$SQUID_CXXFLAGS | |
a1c22363 AJ |
1023 | AS_CASE(["$squid_host_os"], |
1024 | [linux|solaris|freebsd|openbsd|netbsd|cygwin],[:], | |
1025 | [mingw],[EUILIB="-liphlpapi"], | |
1026 | [AC_MSG_WARN([EUI support probably will not work on host $host.])] | |
1027 | ) | |
b966288b | 1028 | # iphlpapi.h check delayed after winsock2.h |
507ca601 | 1029 | AC_CHECK_HEADERS( \ |
32341684 | 1030 | windows.h \ |
507ca601 | 1031 | sys/sockio.h \ |
32341684 AJ |
1032 | sys/param.h, |
1033 | [], [], [[ | |
1034 | #if HAVE_WINDOWS_H | |
1035 | include <windows.h> | |
54d47324 | 1036 | #endif |
32341684 | 1037 | ]] |
507ca601 | 1038 | ) |
29759678 FC |
1039 | AC_CHECK_HEADERS( \ |
1040 | net/if_arp.h \ | |
9603207d | 1041 | net/route.h, |
29759678 FC |
1042 | [], [], [[ |
1043 | #include <sys/types.h> | |
1044 | #include <sys/socket.h> | |
1045 | ]]) | |
1046 | ||
43c1320a AJ |
1047 | # OpenBSD, FreeBSD and NetBSD requires sys/param.h to be included before sysctl.h and net/if_dl.h |
1048 | AC_CHECK_HEADERS( \ | |
1049 | net/if_dl.h \ | |
1050 | sys/sysctl.h, | |
1051 | [], [], [[ | |
54d47324 | 1052 | #if HAVE_SYS_PARAM_H |
29759678 FC |
1053 | #include <sys/param.h> |
1054 | #endif | |
1055 | ]]) | |
195ec847 | 1056 | SQUID_STATE_ROLLBACK(LIBEUI) |
a1c22363 | 1057 | ]) |
2ef664d8 | 1058 | AC_SUBST(EUILIB) |
1a6b111a | 1059 | AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui]) |
0067eb06 | 1060 | SQUID_DEFINE_BOOL(USE_SQUID_EUI,$enable_eui, |
1a6b111a | 1061 | [Define this to include code which lets you use ethernet addresses. This code uses API initially defined in 4.4-BSD.]) |
8aafbbc1 | 1062 | AM_CONDITIONAL(ENABLE_EUI, [test "x$enable_eui" = "xyes" ]) |
1a6b111a | 1063 | |
e5f4e1b0 | 1064 | |
74075210 | 1065 | AC_ARG_ENABLE(htcp, |
47d80734 | 1066 | AS_HELP_STRING([--disable-htcp],[Disable HTCP protocol support]), [ |
ec308e40 | 1067 | SQUID_YESNO([$enableval],[--enable-htcp]) |
74075210 | 1068 | ]) |
0f658b5b | 1069 | SQUID_DEFINE_BOOL(USE_HTCP,${enable_htcp:=yes}, |
47d80734 | 1070 | [Define this to include code for the Hypertext Cache Protocol (HTCP)]) |
fcabe077 | 1071 | AM_CONDITIONAL(ENABLE_HTCP, [test "x$enable_htcp" = "xyes"]) |
1a6b111a FC |
1072 | AC_MSG_NOTICE([HTCP support enabled: $enable_htcp]) |
1073 | ||
09cd7204 | 1074 | # Cryptograhic libraries |
24531401 | 1075 | SQUID_AUTO_LIB(nettle,[Nettle crypto],[LIBNETTLE]) |
a3bc98c3 | 1076 | SQUID_CHECK_LIB_WORKS(nettle,[ |
b12b66cd AJ |
1077 | SQUID_STATE_SAVE(squid_nettle_state) |
1078 | PKG_CHECK_MODULES([LIBNETTLE],[nettle >= 3.4],[],[ | |
1079 | CPPFLAGS="$LIBNETTLE_CFLAGS $CPPFLAGS" | |
1080 | AC_CHECK_LIB(nettle,[nettle_md5_init],[LIBNETTLE_LIBS="-lnettle"]) | |
1081 | ]) | |
1082 | AC_CHECK_HEADERS(nettle/base64.h nettle/md5.h) | |
1083 | SQUID_CHECK_NETTLE_BASE64 | |
1084 | SQUID_STATE_ROLLBACK(squid_nettle_state) | |
a1c22363 | 1085 | ]) |
a9dfcab8 | 1086 | |
e59a64d7 AJ |
1087 | dnl Check for libcrypt |
1088 | CRYPTLIB= | |
1089 | dnl Some of our helpers use crypt(3) which may be in libc, or in | |
1090 | dnl libcrypt (eg FreeBSD) | |
1091 | AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"]) | |
1092 | dnl Solaris10 provides MD5 natively through libmd5 | |
1093 | AC_CHECK_LIB(md5, MD5Init, [CRYPTLIB="$CRYPTLIB -lmd5"]) | |
1094 | AC_SUBST(CRYPTLIB) | |
1095 | ||
b4f805f6 AJ |
1096 | SSLLIB="" |
1097 | ||
24531401 | 1098 | SQUID_AUTO_LIB(gnutls,[GnuTLS crypto],[LIBGNUTLS]) |
b4f805f6 | 1099 | AH_TEMPLATE(USE_GNUTLS,[GnuTLS support is available]) |
a3bc98c3 | 1100 | SQUID_CHECK_LIB_WORKS(gnutls,[ |
7c760558 | 1101 | SQUID_STATE_SAVE(squid_gnutls_state) |
b4f805f6 AJ |
1102 | |
1103 | # User may have provided a custom location for GnuTLS. Otherwise... | |
24531401 | 1104 | CPPFLAGS="$LIBGNUTLS_CFLAGS $CPPFLAGS" |
b4f805f6 AJ |
1105 | LIBS="$LIBS $LIBGNUTLS_PATH" |
1106 | ||
1107 | # auto-detect using pkg-config | |
516ec633 | 1108 | PKG_CHECK_MODULES([LIBGNUTLS],[gnutls >= 3.4.0],[ |
7c760558 FC |
1109 | CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" |
1110 | ],[ | |
b4f805f6 | 1111 | ## find the package without pkg-config |
c113986e | 1112 | ## check that the library is actually new enough. |
516ec633 AJ |
1113 | ## by testing for a 3.4.0+ function which we use |
1114 | AC_CHECK_LIB(gnutls,gnutls_pcert_export_x509,[LIBGNUTLS_LIBS="-lgnutls"]) | |
b4f805f6 | 1115 | ]) |
580160fb FC |
1116 | # if any of the required headers is not found, signal we can't support gnutls |
1117 | AC_CHECK_HEADERS([gnutls/gnutls.h gnutls/x509.h gnutls/abstract.h], [], [LIBGNUTLS_LIBS=""]) | |
b4f805f6 AJ |
1118 | |
1119 | SQUID_STATE_ROLLBACK(squid_gnutls_state) #de-pollute LIBS | |
1120 | ||
a1c22363 | 1121 | AS_IF([test "x$LIBGNUTLS_LIBS" != "x"],[ |
b4f805f6 AJ |
1122 | SSLLIB="$LIBGNUTLS_PATH $LIBGNUTLS_LIBS $SSLLIB" |
1123 | AC_DEFINE(USE_GNUTLS,1,[GnuTLS support is available]) | |
a1c22363 AJ |
1124 | ]) |
1125 | ]) | |
b4f805f6 | 1126 | |
3d4022fa | 1127 | dnl User may specify OpenSSL is needed from a non-standard location |
24531401 | 1128 | SQUID_OPTIONAL_LIB(openssl,[OpenSSL],[LIBOPENSSL]) |
cb4f4424 | 1129 | AH_TEMPLATE(USE_OPENSSL,[OpenSSL support is available]) |
c41db002 | 1130 | ## OpenSSL is default disable due to licensing issues on some OS |
a1c22363 | 1131 | AS_IF([test "x$with_openssl" = "xyes"],[ |
24531401 | 1132 | CPPFLAGS="$LIBOPENSSL_CFLAGS $CPPFLAGS" |
c41db002 | 1133 | AC_CHECK_HEADERS( \ |
24b30fdc | 1134 | openssl/asn1.h \ |
8693472e | 1135 | openssl/bio.h \ |
24b30fdc | 1136 | openssl/bn.h \ |
eacc1666 | 1137 | openssl/crypto.h \ |
742236c7 | 1138 | openssl/decoder.h \ |
24b30fdc | 1139 | openssl/dh.h \ |
c41db002 | 1140 | openssl/err.h \ |
24b30fdc EQ |
1141 | openssl/evp.h \ |
1142 | openssl/lhash.h \ | |
c41db002 AJ |
1143 | openssl/md5.h \ |
1144 | openssl/opensslv.h \ | |
24b30fdc | 1145 | openssl/rsa.h \ |
c41db002 | 1146 | openssl/ssl.h \ |
24b30fdc | 1147 | openssl/x509.h \ |
c41db002 AJ |
1148 | openssl/x509v3.h \ |
1149 | openssl/engine.h \ | |
1150 | openssl/txt_db.h \ | |
a7b75c64 | 1151 | openssl/pem.h \ |
c41db002 AJ |
1152 | ) |
1153 | ||
e0b98074 | 1154 | # User may have provided a custom location for OpenSSL. Otherwise... |
84c3fc14 AJ |
1155 | SQUID_STATE_SAVE(squid_openssl_state) |
1156 | LIBS="$LIBS $LIBOPENSSL_PATH" | |
1157 | ||
1158 | # auto-detect using pkg-config | |
1159 | PKG_CHECK_MODULES([LIBOPENSSL],[openssl],,[ | |
1160 | ## For some OS pkg-config is broken or unavailable. | |
1161 | ## Detect libraries the hard way. | |
1162 | ||
1163 | # Windows MinGW has some special libraries ... | |
a1c22363 | 1164 | AS_IF([test "x$squid_host_os" = "xmingw"],[ |
84c3fc14 AJ |
1165 | LIBOPENSSL_LIBS='-lssleay32 -leay32 -lgdi32 $LIBOPENSSL_LIBS' |
1166 | AC_MSG_NOTICE([Windows OpenSSL library support: yes -lssleay32 -leay32 -lgdi32]) | |
a1c22363 | 1167 | ]) |
e0b98074 | 1168 | |
84c3fc14 AJ |
1169 | AC_CHECK_LIB(crypto,[CRYPTO_new_ex_data],[LIBOPENSSL_LIBS="-lcrypto $LIBOPENSSL_LIBS"],[ |
1170 | AC_MSG_ERROR([library 'crypto' is required for OpenSSL]) | |
37a20074 | 1171 | ],$LIBOPENSSL_LIBS) |
403c4682 | 1172 | AC_CHECK_LIB(ssl,[SSL_CTX_new],[LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS"],[ |
84c3fc14 | 1173 | AC_MSG_ERROR([library 'ssl' is required for OpenSSL]) |
37a20074 | 1174 | ],$LIBOPENSSL_LIBS) |
84c3fc14 | 1175 | ]) |
e0b98074 | 1176 | |
84c3fc14 | 1177 | # This is a workaround for RedHat 9 brain damage.. |
a1c22363 | 1178 | AS_IF([test -d /usr/kerberos/include -a -f /usr/include/openssl/kssl.h],[ |
84c3fc14 AJ |
1179 | AC_MSG_NOTICE([OpenSSL depends on Kerberos]) |
1180 | LIBOPENSSL_LIBS="-L/usr/kerberos/lib $LIBOPENSSL_LIBS" | |
1181 | CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" | |
a1c22363 | 1182 | ]) |
84c3fc14 | 1183 | SQUID_STATE_ROLLBACK(squid_openssl_state) #de-pollute LIBS |
1f7c9178 | 1184 | |
a1c22363 | 1185 | AS_IF([test "x$LIBOPENSSL_LIBS" != "x"],[ |
c41db002 | 1186 | CXXFLAGS="$LIBOPENSSL_CFLAGS $CXXFLAGS" |
84c3fc14 | 1187 | SSLLIB="$LIBOPENSSL_PATH $LIBOPENSSL_LIBS $SSLLIB" |
cb4f4424 | 1188 | AC_DEFINE(USE_OPENSSL,1,[OpenSSL support is available]) |
c41db002 | 1189 | |
b8649ee4 | 1190 | # check for API functions |
17e98f24 AJ |
1191 | SQUID_CHECK_LIBCRYPTO_API |
1192 | SQUID_CHECK_LIBSSL_API | |
8d56fe55 | 1193 | SQUID_CHECK_OPENSSL_TLS_METHODS |
b8649ee4 CT |
1194 | SQUID_STATE_SAVE(check_SSL_CTX_get0_certificate) |
1195 | LIBS="$LIBS $SSLLIB" | |
1196 | AC_CHECK_LIB(ssl, SSL_CTX_get0_certificate, [ | |
1197 | AC_DEFINE(HAVE_SSL_CTX_GET0_CERTIFICATE, 1, [SSL_CTX_get0_certificate is available]) | |
1198 | ], [ | |
1199 | missing_SSL_CTX_get0_certificate=yes | |
1200 | ]) | |
1201 | SQUID_STATE_ROLLBACK(check_SSL_CTX_get0_certificate) | |
1202 | ||
c41db002 | 1203 | # check for other specific broken implementations |
a1c22363 | 1204 | AS_IF([test "x$missing_SSL_CTX_get0_certificate" = "xyes"],SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS) |
c41db002 | 1205 | SQUID_CHECK_OPENSSL_CONST_SSL_METHOD |
7d841344 AJ |
1206 | SQUID_CHECK_OPENSSL_CONST_CRYPTO_EX_DATA |
1207 | SQUID_CHECK_OPENSSL_CONST_SSL_SESSION_CB_ARG | |
70cfe22f | 1208 | SQUID_CHECK_OPENSSL_CONST_X509_GET0_SIGNATURE_ARGS |
c41db002 | 1209 | SQUID_CHECK_OPENSSL_TXTDB |
a1c22363 AJ |
1210 | ]) |
1211 | AS_IF([test "x$SSLLIB" = "x"],[AC_MSG_ERROR([Required OpenSSL library not found])]) | |
1212 | ]) | |
84c3fc14 | 1213 | AC_MSG_NOTICE([OpenSSL library support: ${with_openssl:=no} ${LIBOPENSSL_PATH} ${LIBOPENSSL_LIBS}]) |
c41db002 | 1214 | AM_CONDITIONAL(ENABLE_SSL,[ test "x$with_openssl" = "xyes" ]) |
1f7c9178 | 1215 | AC_SUBST(SSLLIB) |
1216 | ||
1a22a39e | 1217 | dnl User may specify MIT Kerberos is needed from a non-standard location |
24531401 | 1218 | SQUID_AUTO_LIB(mit-krb5,[MIT Kerberos],[LIB_KRB5]) |
75f3c557 | 1219 | AH_TEMPLATE(USE_APPLE_KRB5,[Apple Kerberos support is available]) |
1a22a39e MM |
1220 | AH_TEMPLATE(USE_MIT_KRB5,[MIT Kerberos support is available]) |
1221 | AH_TEMPLATE(USE_SOLARIS_KRB5,[Solaris Kerberos support is available]) | |
1222 | ||
75c5f82b | 1223 | ## find out if pkg-config or krb5-config will work |
a1c22363 | 1224 | AS_IF([test "x$with_mit_krb5" != "xno"],[ |
24531401 AJ |
1225 | CXXFLAGS="$LIB_KRB5_CFLAGS $CXXFLAGS" |
1226 | krb5confpath="$with_mit_krb5/bin" | |
1a22a39e | 1227 | # find installed libs via pkg-config or krb5-config |
75c5f82b | 1228 | squid_pc_krb5_name= |
7c664dbc AJ |
1229 | PKG_CHECK_EXISTS(mit-krb5-gssapi mit-krb5, [squid_pc_krb5_name="mit-krb5-gssapi mit-krb5"],[ |
1230 | PKG_CHECK_EXISTS(gssapi-krb5 krb5, [squid_pc_krb5_name="gssapi-krb5 krb5"]) | |
1231 | ]) | |
a1c22363 | 1232 | AS_IF([test "x$squid_pc_krb5_name" = "x" -a "$cross_compiling" = "no"],[ |
77f4953d | 1233 | # Look for krb5-config (unless cross-compiling) |
c4b12583 | 1234 | AC_PATH_PROG(krb5_config,krb5-config,no,$krb5confpath) |
a1c22363 | 1235 | AS_IF([test "x$ac_cv_path_krb5_config" != "xno"],[ |
1a22a39e MM |
1236 | krb5confpath="`dirname $ac_cv_path_krb5_config`" |
1237 | ac_heimdal="`$ac_cv_path_krb5_config --version 2>/dev/null | grep -c -i heimdal`" | |
1238 | ac_solaris="`$ac_cv_path_krb5_config --version 2>/dev/null | grep -c -i solaris`" | |
75f3c557 | 1239 | ac_apple="`$ac_cv_path_krb5_config --vendor 2>/dev/null | grep -c -i apple`" |
a1c22363 AJ |
1240 | AS_IF([test $ac_solaris -gt 0],[with_solaris_krb5=yes], |
1241 | [test $ac_apple -gt 0],[with_apple_krb5=yes], | |
1242 | [test $ac_heimdal -gt 0],[with_mit_krb5=no] | |
1243 | ) | |
1244 | ],[ | |
1245 | AS_IF([test "x$with_mit_krb5" = "xyes"],[ | |
75c5f82b | 1246 | AC_MSG_ERROR([Could not find krb5-config in path]) |
a1c22363 | 1247 | ],[ |
75c5f82b | 1248 | with_mit_krb5=no |
a1c22363 AJ |
1249 | ]) |
1250 | ]) | |
1251 | ]) | |
1252 | ]) | |
1a22a39e | 1253 | |
ed3a42d0 | 1254 | # detect MIT Kerberos dependencies (except on Solaris) |
a1c22363 | 1255 | AS_IF([test "x$with_mit_krb5" != "xno" -a "x$with_solaris_krb5" != "xyes"],[ |
1a22a39e MM |
1256 | SQUID_STATE_SAVE([squid_krb5_save]) |
1257 | LIBS="$LIBS $LIB_KRB5_PATH" | |
1258 | ||
1259 | # auto-detect using pkg-config | |
75c5f82b | 1260 | PKG_CHECK_MODULES([LIB_KRB5], $squid_pc_krb5_name,,[ |
77f4953d | 1261 | # look for krb5-config (unless cross-compiling) |
a1c22363 AJ |
1262 | AS_IF([test "$cross_compiling" = "no"],[ |
1263 | AS_IF([test "x$krb5confpath" = "x"],[ | |
77f4953d | 1264 | AC_PATH_PROG(krb5_config,krb5-config,no) |
a1c22363 AJ |
1265 | AS_IF([test "x$ac_cv_path_krb5_config" != "xno"],[ac_krb5_config="$ac_cv_path_krb5_config"]) |
1266 | ],[ | |
77f4953d | 1267 | ac_krb5_config="$krb5confpath/krb5-config" |
a1c22363 AJ |
1268 | ]) |
1269 | ]) | |
1270 | AS_IF([test "x$ac_krb5_config" != "x" -a -x "$ac_krb5_config"],[ | |
1a22a39e MM |
1271 | # Get libs, etc |
1272 | AC_MSG_NOTICE([Use krb5-config to get CXXFLAGS and LIBS]) | |
1273 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags krb5 2>/dev/null`" | |
1274 | LIB_KRB5_LIBS="`$ac_krb5_config --libs krb5 2>/dev/null`" | |
1275 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags gssapi 2>/dev/null` $LIB_KRB5_CFLAGS" | |
1276 | LIB_KRB5_LIBS="`$ac_krb5_config --libs gssapi 2>/dev/null` $LIB_KRB5_LIBS" | |
a1c22363 | 1277 | ],[ |
1a22a39e MM |
1278 | ## For some OS pkg-config is broken or unavailable. |
1279 | ## Detect libraries the hard way. | |
1280 | ||
b2bdde72 | 1281 | SQUID_STATE_SAVE([squid_mit_save]) |
ff78f3c3 | 1282 | missing_required= |
1a22a39e MM |
1283 | AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) |
1284 | AC_CHECK_LIB(com_err, [main], [LIB_KRB5_LIBS="-lcom_err $LIB_KRB5_LIBS"],[ | |
ff78f3c3 AJ |
1285 | AC_MSG_WARN([library 'com_err' is required for MIT Kerberos]) |
1286 | missing_required=yes | |
1a22a39e | 1287 | ]) |
b2bdde72 | 1288 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1289 | AC_CHECK_LIB(k5crypto, [main], [LIB_KRB5_LIBS="-lk5crypto $LIB_KRB5_LIBS"],[ |
ff78f3c3 AJ |
1290 | AC_MSG_WARN([library 'k5crypto' is required for MIT Kerberos]) |
1291 | missing_required=yes | |
1a22a39e | 1292 | ]) |
b2bdde72 | 1293 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1294 | AC_CHECK_LIB(krb5, [main], [LIB_KRB5_LIBS="-lkrb5 $LIB_KRB5_LIBS"],[ |
ff78f3c3 AJ |
1295 | AC_MSG_WARN([library 'krb5' is required for MIT Kerberos]) |
1296 | missing_required=yes | |
1a22a39e | 1297 | ]) |
b2bdde72 | 1298 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1299 | AC_CHECK_LIB(gssapi_krb5, [main], [LIB_KRB5_LIBS="-lgssapi_krb5 $LIB_KRB5_LIBS"],[ |
ff78f3c3 AJ |
1300 | AC_MSG_WARN([library 'gssapi_krb5' is required for MIT Kerberos]) |
1301 | missing_required=yes | |
1a22a39e | 1302 | ]) |
b2bdde72 | 1303 | SQUID_STATE_ROLLBACK([squid_mit_save]) |
a1c22363 AJ |
1304 | AS_IF([test "x$missing_required" = "xyes"],[LIB_KRB5_LIBS=""]) |
1305 | ]) | |
1a22a39e MM |
1306 | ]) |
1307 | ||
a1c22363 AJ |
1308 | AS_IF([test "x$LIB_KRB5_LIBS" != "x"],[ |
1309 | AS_IF([test "x$with_apple_krb5" = "xyes"],[ | |
75f3c557 | 1310 | AC_DEFINE(USE_APPLE_KRB5,1,[Apple Kerberos support is available]) |
9603207d | 1311 | KRB5_FLAVOUR="Apple" |
a1c22363 | 1312 | ],[ |
75f3c557 | 1313 | AC_DEFINE(USE_MIT_KRB5,1,[MIT Kerberos support is available]) |
9603207d | 1314 | KRB5_FLAVOUR="MIT" |
a1c22363 | 1315 | ]) |
1a22a39e MM |
1316 | KRB5LIBS="$LIB_KRB5_PATH $LIB_KRB5_LIBS $KRB5LIBS" |
1317 | KRB5INCS="$LIB_KRB5_CFLAGS" | |
9603207d | 1318 | |
1a22a39e MM |
1319 | # check for other specific broken implementations |
1320 | CXXFLAGS="$CXXFLAGS $KRB5INCS" | |
1321 | LIBS="$LIBS $KRB5LIBS" | |
1322 | ||
1323 | AC_MSG_NOTICE([Try to find Kerberos headers in given path]) | |
1324 | AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_krb5.h) | |
1325 | AC_CHECK_HEADERS(gssapi/gssapi_generic.h) | |
1326 | AC_CHECK_HEADERS(krb5.h com_err.h et/com_err.h) | |
1327 | AC_CHECK_HEADERS(profile.h) | |
1328 | ||
1a22a39e | 1329 | SQUID_CHECK_KRB5_FUNCS |
a1c22363 AJ |
1330 | ]) |
1331 | AS_IF([test "x$with_mit_krb5" = "xyes" -a "x$KRB5LIBS" = "x"],[ | |
1a22a39e | 1332 | AC_MSG_ERROR([Required Kerberos library not found]) |
a1c22363 | 1333 | ],[test "x$KRB5LIBS" = "x"],[ |
75c5f82b AJ |
1334 | with_mit_krb5=no |
1335 | with_apple_krb5=no | |
a1c22363 | 1336 | ]) |
1a22a39e | 1337 | SQUID_STATE_ROLLBACK([squid_krb5_save]) |
a1c22363 | 1338 | ]) |
1a22a39e | 1339 | |
75c5f82b | 1340 | # detect Solaris Kerberos dependencies |
a1c22363 | 1341 | AS_IF([test "x$with_solaris_krb5" = "xyes" -a "x$KRB5LIBS" = "x"],[ |
1a22a39e MM |
1342 | SQUID_STATE_SAVE([squid_krb5_save]) |
1343 | LIBS="$LIBS $LIB_KRB5_PATH" | |
1344 | ||
1345 | # no pkg-config for solaris native Kerberos | |
77f4953d | 1346 | # look for krb5-config (unless cross-compiling) |
a1c22363 AJ |
1347 | AS_IF([test "$cross_compiling" = "no"],[ |
1348 | AS_IF([test "x$krb5confpath" = "x"],[ | |
77f4953d | 1349 | AC_PATH_PROG(krb5_config,krb5-config,no) |
a1c22363 AJ |
1350 | AS_IF([test "x$ac_cv_path_krb5_config" != "xno"],[ac_krb5_config="$ac_cv_path_krb5_config"]) |
1351 | ],[ | |
77f4953d | 1352 | ac_krb5_config="$krb5confpath/krb5-config" |
a1c22363 AJ |
1353 | ]) |
1354 | ]) | |
1355 | AS_IF([test "x$ac_krb5_config" != "x" -a -x "$ac_krb5_config"],[ | |
1a22a39e MM |
1356 | # Get libs, etc |
1357 | AC_MSG_NOTICE([Use krb5-config to get CXXFLAGS and LIBS]) | |
1358 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags krb5 2>/dev/null`" | |
1359 | LIB_KRB5_LIBS="`$ac_krb5_config --libs krb5 2>/dev/null`" | |
b2da83da AJ |
1360 | # Solaris 10 Update 11 patches the krb5-config tool to produce stderr messages on stdout. |
1361 | SOLARIS_BROKEN_KRB5CONFIG_GSSAPI="`$ac_krb5_config --libs gssapi 2>/dev/null | grep "krb5-config"`" | |
a1c22363 | 1362 | AS_IF([test "x$SOLARIS_BROKEN_KRB5CONFIG_GSSAPI" = "x"],[ |
b2da83da AJ |
1363 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags gssapi 2>/dev/null` $LIB_KRB5_CFLAGS" |
1364 | LIB_KRB5_LIBS="`$ac_krb5_config --libs gssapi 2>/dev/null` $LIB_KRB5_LIBS" | |
a1c22363 AJ |
1365 | ]) |
1366 | ],[ | |
1a22a39e MM |
1367 | ## For some OS pkg-config is broken or unavailable. |
1368 | ## Detect libraries the hard way. | |
1369 | ||
1370 | CXXFLAGS="-I/usr/include/kerberosv5 $CXXFLAGS" | |
1371 | ||
b2bdde72 | 1372 | SQUID_STATE_SAVE([squid_solaris_save]) |
ff78f3c3 | 1373 | missing_required= |
1a22a39e MM |
1374 | AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) |
1375 | AC_CHECK_LIB(krb5, [main], [LIB_KRB5_LIBS="-lkrb5 $LIB_KRB5_LIBS"],[ | |
ff78f3c3 AJ |
1376 | AC_MSG_WARN([library 'krb5' is required for Solaris Kerberos]) |
1377 | missing_required=yes | |
1a22a39e | 1378 | ]) |
b2bdde72 | 1379 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1380 | AC_CHECK_LIB(gss, [main], [LIB_KRB5_LIBS="-lgss $LIB_KRB5_LIBS"],[ |
ff78f3c3 AJ |
1381 | AC_MSG_WARN([library 'gss' is required for Solaris Kerberos]) |
1382 | missing_required=yes | |
1a22a39e | 1383 | ]) |
b2bdde72 | 1384 | SQUID_STATE_ROLLBACK([squid_solaris_save]) |
a1c22363 AJ |
1385 | AS_IF([test "x$missing_required" = "xyes"],[LIB_KRB5_LIBS=""]) |
1386 | ]) | |
1a22a39e | 1387 | |
a1c22363 | 1388 | AS_IF([test "x$LIB_KRB5_LIBS" != "x"],[ |
1a22a39e MM |
1389 | KRB5LIBS="$LIB_KRB5_PATH $LIB_KRB5_LIBS $KRB5LIBS" |
1390 | KRB5INCS="$LIB_KRB5_CFLAGS" | |
1391 | AC_DEFINE(USE_SOLARIS_KRB5,1,[Solaris Kerberos support is available]) | |
9603207d | 1392 | KRB5_FLAVOUR="Solaris" |
1393 | ||
1a22a39e MM |
1394 | # check for other specific broken implementations |
1395 | CXXFLAGS="$CXXFLAGS $KRB5INCS" | |
1396 | LIBS="$LIBS $KRB5LIBS" | |
1397 | ||
1398 | AC_MSG_NOTICE([Try to find Kerberos headers in given path]) | |
1399 | AC_CHECK_HEADERS(gssapi/gssapi.h gssapi/gssapi_ext.h) | |
1400 | AC_CHECK_HEADERS(krb5.h com_err.h) | |
1401 | ||
1402 | SQUID_CHECK_KRB5_SOLARIS_BROKEN_KRB5_H | |
a1c22363 | 1403 | AS_IF([test "x$squid_cv_broken_krb5_h" = "xyes"],[ |
1a22a39e MM |
1404 | AC_DEFINE(HAVE_BROKEN_SOLARIS_KRB5_H, 1, [Define to 1 if Solaris krb5.h is broken for C++]) |
1405 | AC_MSG_WARN([You have a broken Solaris <krb5.h> system include.]) | |
1406 | AC_MSG_WARN([Please see http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6837512]) | |
1407 | AC_MSG_WARN([If you need Kerberos support you will have to patch]) | |
1408 | AC_MSG_WARN([your system. See contrib/solaris/solaris-krb5-include.patch]) | |
a1c22363 | 1409 | ]) |
1a22a39e | 1410 | SQUID_CHECK_KRB5_FUNCS |
a1c22363 AJ |
1411 | ]) |
1412 | AS_IF([test "x$with_mit_krb5" = "xyes" -a "x$KRB5LIBS" = "x"],[ | |
75c5f82b | 1413 | # Error only if Solaris flavour was detected while looking for required MIT Kerberos |
1a22a39e | 1414 | AC_MSG_ERROR([Required Kerberos library not found]) |
a1c22363 | 1415 | ],[test "x$KRB5LIBS" = "x"],[ |
75c5f82b AJ |
1416 | with_solaris_krb5=no |
1417 | with_mit_krb5=no | |
a1c22363 | 1418 | ]) |
1a22a39e | 1419 | SQUID_STATE_ROLLBACK([squid_krb5_save]) |
a1c22363 | 1420 | ]) |
1a22a39e | 1421 | |
75c5f82b | 1422 | dnl User may specify Heimdal Kerberos is needed from a non-standard location |
24531401 | 1423 | SQUID_AUTO_LIB(heimdal-krb5,[Heimdal Kerberos],[LIB_KRB5]) |
75c5f82b | 1424 | AH_TEMPLATE(USE_HEIMDAL_KRB5,[Heimdal Kerberos support is available]) |
a1c22363 | 1425 | AS_IF([test "x$with_heimdal_krb5" != "xno" -a "x$KRB5LIBS" = "x"],[ |
24531401 AJ |
1426 | CXXFLAGS="$LIB_KRB5_CFLAGS $CXXFLAGS" |
1427 | krb5confpath="$with_heimdal_krb5/bin" | |
75c5f82b AJ |
1428 | # find installed libs via pkg-config or krb5-config |
1429 | PKG_CHECK_EXISTS(heimdal-krb5, [squid_pc_krb5_name="heimdal-krb5"]) | |
a1c22363 | 1430 | AS_IF([test "x$squid_pc_krb5_name" = "x"],[ |
75c5f82b | 1431 | PKG_CHECK_EXISTS(heimdal-gssapi, [squid_pc_krb5_name="heimdal-gssapi"]) |
a1c22363 AJ |
1432 | ]) |
1433 | AS_IF([test "x$squid_pc_krb5_name" = "x" -a "$cross_compiling" = "no"],[ | |
75c5f82b | 1434 | # Look for krb5-config (unless cross-compiling) |
c4b12583 | 1435 | AC_PATH_PROG(krb5_config,krb5-config,no,$krb5confpath) |
a1c22363 | 1436 | AS_IF([test "x$ac_cv_path_krb5_config" != "xno"],[ |
75c5f82b AJ |
1437 | krb5confpath="`dirname $ac_cv_path_krb5_config`" |
1438 | ac_heimdal="`$ac_cv_path_krb5_config --version 2>/dev/null | grep -c -i heimdal`" | |
a1c22363 | 1439 | AS_IF([test "x$with_heimdal_krb5" = "xyes" -a $ac_heimdal = 0],[ |
75c5f82b | 1440 | AC_MSG_ERROR([Could not find pkg-config or krb5-config for Heimdal Kerberos]) |
a1c22363 AJ |
1441 | ]) |
1442 | ],[ | |
1443 | AS_IF([test "x$with_heimdal_krb5" = "xyes"],[ | |
75c5f82b | 1444 | AC_MSG_ERROR([Could not find krb5-config in path]) |
a1c22363 | 1445 | ],[ |
75c5f82b AJ |
1446 | AC_MSG_WARN([Could not find krb5-config in path]) |
1447 | with_heimdal_krb5=no | |
a1c22363 AJ |
1448 | ]) |
1449 | ]) | |
1450 | ]) | |
1451 | ]) | |
1452 | AS_IF([test "x$with_heimdal_krb5" != "xno" -a "x$KRB5LIBS" = "x"],[ | |
1a22a39e MM |
1453 | SQUID_STATE_SAVE([squid_krb5_save]) |
1454 | LIBS="$LIBS $LIB_KRB5_PATH" | |
1455 | ||
1456 | # auto-detect using pkg-config | |
75c5f82b | 1457 | PKG_CHECK_MODULES([LIB_KRB5], $squid_pc_krb5_name,,[ |
77f4953d | 1458 | # look for krb5-config (unless cross-compiling) |
a1c22363 AJ |
1459 | AS_IF([test "$cross_compiling" = "no"],[ |
1460 | AS_IF([test "x$krb5confpath" = "x"],[ | |
77f4953d | 1461 | AC_PATH_PROG(krb5_config,krb5-config,no) |
a1c22363 AJ |
1462 | AS_IF([test "x$ac_cv_path_krb5_config" != "xno"],[ac_krb5_config="$ac_cv_path_krb5_config"]) |
1463 | ],[ | |
77f4953d | 1464 | ac_krb5_config="$krb5confpath/krb5-config" |
a1c22363 AJ |
1465 | ]) |
1466 | ]) | |
1467 | AS_IF([test "x$ac_krb5_config" != "x" -a -x "$ac_krb5_config"],[ | |
1a22a39e MM |
1468 | # Get libs, etc |
1469 | AC_MSG_NOTICE([Use krb5-config to get CXXFLAGS and LIBS]) | |
1470 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags krb5 2>/dev/null`" | |
1471 | LIB_KRB5_LIBS="`$ac_krb5_config --libs krb5 2>/dev/null`" | |
1472 | LIB_KRB5_CFLAGS="`$ac_krb5_config --cflags gssapi 2>/dev/null` $LIB_KRB5_CFLAGS" | |
1473 | LIB_KRB5_LIBS="`$ac_krb5_config --libs gssapi 2>/dev/null` $LIB_KRB5_LIBS" | |
a1c22363 | 1474 | ],[ |
1a22a39e MM |
1475 | ## For some OS pkg-config is broken or unavailable. |
1476 | ## Detect libraries the hard way. | |
b2bdde72 | 1477 | SQUID_STATE_SAVE([squid_heimdal_save]) |
87a4a80f | 1478 | missing_required= |
1a22a39e MM |
1479 | AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) |
1480 | AC_CHECK_LIB(resolv, [main], [LIB_KRB5_LIBS="-lresolv $LIB_KRB5_LIBS"],[ | |
87a4a80f AJ |
1481 | AC_MSG_WARN([library 'resolv' is required for Heimdal Kerberos]) |
1482 | missing_required=yes | |
1a22a39e | 1483 | ]) |
b2bdde72 | 1484 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1485 | AC_CHECK_LIB(crypt, [main], [LIB_KRB5_LIBS="-lcrypt $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1486 | AC_MSG_WARN([library 'crypt' is required for Heimdal Kerberos]) |
1487 | missing_required=yes | |
1a22a39e | 1488 | ]) |
b2bdde72 | 1489 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1490 | AC_CHECK_LIB(roken, [main], [LIB_KRB5_LIBS="-lroken $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1491 | AC_MSG_WARN([library 'roken' is required for Heimdal Kerberos]) |
1492 | missing_required=yes | |
1a22a39e | 1493 | ]) |
b2bdde72 | 1494 | LIBS=$LIB_KRB5_LIBS |
1a22a39e MM |
1495 | AC_CHECK_LIB(heimbase, [main], [LIB_KRB5_LIBS="-lheimbase $LIB_KRB5_LIBS"],[ |
1496 | AC_MSG_WARN([library 'heimbase' may be required for Heimdal Kerberos]) | |
1497 | ]) | |
b2bdde72 | 1498 | LIBS=$LIB_KRB5_LIBS |
1a22a39e MM |
1499 | AC_CHECK_LIB(wind, [main], [LIB_KRB5_LIBS="-lwind $LIB_KRB5_LIBS"],[ |
1500 | AC_MSG_WARN([library 'wind' may be required for Heimdal Kerberos]) | |
1501 | ]) | |
b2bdde72 | 1502 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1503 | AC_CHECK_LIB(crypto, [main], [LIB_KRB5_LIBS="-lcrypto $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1504 | AC_MSG_WARN([library 'crypto' is required for Heimdal Kerberos]) |
1505 | missing_required=yes | |
1a22a39e | 1506 | ]) |
b2bdde72 | 1507 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1508 | AC_CHECK_LIB(com_err, [main], [LIB_KRB5_LIBS="-lcom_err $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1509 | AC_MSG_WARN([library 'com_err' is required for Heimdal Kerberos]) |
1510 | missing_required=yes | |
1a22a39e | 1511 | ]) |
b2bdde72 | 1512 | LIBS=$LIB_KRB5_LIBS |
1a22a39e MM |
1513 | AC_CHECK_LIB(hx509, [main], [LIB_KRB5_LIBS="-lhx509 $LIB_KRB5_LIBS"],[ |
1514 | AC_MSG_WARN([library 'hx509' may be required for Heimdal Kerberos]) | |
1515 | ]) | |
b2bdde72 | 1516 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1517 | AC_CHECK_LIB(asn1, [main], [LIB_KRB5_LIBS="-lasn1 $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1518 | AC_MSG_WARN([library 'asn1' is required for Heimdal Kerberos]) |
1519 | missing_required=yes | |
1a22a39e | 1520 | ]) |
b2bdde72 | 1521 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1522 | AC_CHECK_LIB(krb5, [main], [LIB_KRB5_LIBS="-lkrb5 $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1523 | AC_MSG_WARN([library 'krb5' is required for Heimdal Kerberos]) |
1524 | missing_required=yes | |
1a22a39e | 1525 | ]) |
b2bdde72 | 1526 | LIBS=$LIB_KRB5_LIBS |
1a22a39e MM |
1527 | AC_CHECK_LIB(heimntlm, [main], [LIB_KRB5_LIBS="-lheimntlm $LIB_KRB5_LIBS"],[ |
1528 | AC_MSG_WARN([library 'heimntlm' may be required for Heimdal Kerberos]) | |
1529 | ]) | |
b2bdde72 | 1530 | LIBS=$LIB_KRB5_LIBS |
1a22a39e | 1531 | AC_CHECK_LIB(gssapi, [main], [LIB_KRB5_LIBS="-lgssapi $LIB_KRB5_LIBS"],[ |
87a4a80f AJ |
1532 | AC_MSG_WARN([library 'gssapi' is required for Heimdal Kerberos]) |
1533 | missing_required=yes | |
1a22a39e | 1534 | ]) |
b2bdde72 | 1535 | SQUID_STATE_ROLLBACK([squid_heimdal_save]) |
a1c22363 AJ |
1536 | AS_IF([test "x$missing_required" = "xyes"],[LIB_KRB5_LIBS=""]) |
1537 | ]) | |
1a22a39e | 1538 | ]) |
a1c22363 | 1539 | AS_IF([test "x$LIB_KRB5_LIBS" != "x"],[ |
1a22a39e MM |
1540 | KRB5LIBS="$LIB_KRB5_PATH $LIB_KRB5_LIBS $KRB5LIBS" |
1541 | KRB5INCS="$LIB_KRB5_CFLAGS" | |
1542 | AC_DEFINE(USE_HEIMDAL_KRB5,1,[Heimdal Kerberos support is available]) | |
9603207d | 1543 | KRB5_FLAVOUR="Heimdal" |
1544 | ||
1a22a39e MM |
1545 | # check for other specific broken implementations |
1546 | CXXFLAGS="$CXXFLAGS $KRB5INCS" | |
1547 | LIBS="$LIBS $KRB5LIBS" | |
1548 | ||
1549 | AC_MSG_NOTICE([Try to find Kerberos headers in given path]) | |
1550 | AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_krb5.h) | |
1551 | AC_CHECK_HEADERS(krb5.h com_err.h et/com_err.h) | |
1552 | ||
1553 | SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H | |
a1c22363 | 1554 | AS_IF([test "x$squid_cv_broken_heimdal_krb5_h" = "xyes"],[ |
1a22a39e | 1555 | AC_DEFINE(HAVE_BROKEN_HEIMDAL_KRB5_H, 1, [Define to 1 if Heimdal krb5.h is broken for C++]) |
a1c22363 | 1556 | ]) |
1a22a39e | 1557 | SQUID_CHECK_KRB5_FUNCS |
a1c22363 AJ |
1558 | ]) |
1559 | AS_IF([test "x$KRB5LIBS" = "x"],[ | |
1560 | AS_IF([test "x$with_heimdal_krb5" = "xyes"],[ | |
75c5f82b | 1561 | AC_MSG_ERROR([Required Heimdal Kerberos library not found]) |
a1c22363 | 1562 | ],[ |
75c5f82b | 1563 | AC_MSG_WARN([Heimdal Kerberos library not found]) |
a1c22363 AJ |
1564 | ]) |
1565 | ]) | |
1a22a39e | 1566 | SQUID_STATE_ROLLBACK([squid_krb5_save]) |
a1c22363 | 1567 | ]) |
1a22a39e | 1568 | |
75c5f82b | 1569 | dnl User may specify GNU gss is needed from a non-standard location |
24531401 | 1570 | SQUID_AUTO_LIB(gnugss,[GNU gss],[LIB_KRB5]) |
75c5f82b | 1571 | AH_TEMPLATE(USE_GNUGSS,[GNU gss support is available]) |
a1c22363 | 1572 | AS_IF([test "x$with_gnugss" != "xno" -a "x$KRB5LIBS" = "x"],[ |
24531401 AJ |
1573 | CXXFLAGS="$LIB_KRB5_CFLAGS $CXXFLAGS" |
1574 | krb5confpath= | |
1a22a39e MM |
1575 | SQUID_STATE_SAVE([squid_krb5_save]) |
1576 | LIBS="$LIBS $LIB_KRB5_PATH" | |
1577 | ||
1578 | # auto-detect using pkg-config | |
1579 | PKG_CHECK_MODULES([LIB_KRB5],[gss],,[ | |
1580 | ## For some OS pkg-config is broken or unavailable. | |
1581 | ## Detect libraries the hard way. | |
1582 | ||
1583 | AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) | |
1584 | AC_CHECK_LIB(gss, [main], [LIB_KRB5_LIBS="-lgss $LIB_KRB5_LIBS"],[ | |
75c5f82b | 1585 | AC_MSG_WARN([library 'com_err' is required for GNU Kerberos]) |
1a22a39e | 1586 | ]) |
1a22a39e MM |
1587 | ]) |
1588 | ||
a1c22363 | 1589 | AS_IF([test "x$LIB_KRB5_LIBS" != "x"],[ |
1a22a39e MM |
1590 | KRB5LIBS="$LIB_KRB5_PATH $LIB_KRB5_LIBS $KRB5LIBS" |
1591 | KRB5INCS="$LIB_KRB5_CFLAGS" | |
1592 | AC_DEFINE(USE_GNUGSS,1,[GNU Kerberos support is available]) | |
9603207d | 1593 | KRB5_FLAVOUR="GNU GSS" |
1a22a39e MM |
1594 | |
1595 | # check for other specific broken implementations | |
1596 | CXXFLAGS="$CXXFLAGS $KRB5INCS" | |
1597 | LIBS="$LIBS $KRB5LIBS" | |
1598 | ||
1599 | AC_MSG_NOTICE([Try to find Kerbeors headers in given path]) | |
1600 | AC_CHECK_HEADERS(gss.h) | |
1601 | ||
1602 | SQUID_CHECK_WORKING_GSSAPI | |
1603 | SQUID_DEFINE_BOOL(HAVE_GSSAPI,$squid_cv_working_gssapi,[GSSAPI support]) | |
1604 | ||
1605 | SQUID_CHECK_SPNEGO_SUPPORT | |
1606 | SQUID_DEFINE_BOOL(HAVE_SPNEGO,$squid_cv_have_spnego,[SPNEGO support]) | |
1607 | ||
1608 | SQUID_CHECK_WORKING_KRB5 | |
1609 | SQUID_DEFINE_BOOL(HAVE_KRB5,$squid_cv_working_krb5,[KRB5 support]) | |
a1c22363 AJ |
1610 | ]) |
1611 | AS_IF([test "x$KRB5LIBS" = "x"],[ | |
1612 | AS_IF([test "x$with_gnugss" = "xyes"],[ | |
75c5f82b | 1613 | AC_MSG_ERROR([Required GNU GSS Kerberos library not found]) |
a1c22363 | 1614 | ],[ |
75c5f82b | 1615 | AC_MSG_WARN([GNU GSS Kerberos library not found]) |
a1c22363 AJ |
1616 | ]) |
1617 | ]) | |
1a22a39e | 1618 | SQUID_STATE_ROLLBACK([squid_krb5_save]) |
a1c22363 | 1619 | ]) |
75c5f82b | 1620 | |
a1c22363 | 1621 | AS_IF([test "x$KRB5LIBS" != "x"],[with_krb5=yes]) |
1a22a39e MM |
1622 | AC_MSG_NOTICE([$KRB5_FLAVOUR Kerberos library support: ${with_krb5:=no} ${LIB_KRB5_PATH} ${LIB_KRB5_LIBS}]) |
1623 | AC_SUBST(KRB5INCS) | |
1624 | AC_SUBST(KRB5LIBS) | |
1a22a39e | 1625 | |
0d57ed2e | 1626 | SQUID_AUTO_LIB(ldap,[LDAP],[LIBLDAP]) |
a3bc98c3 | 1627 | SQUID_CHECK_LIB_WORKS(ldap,[ |
0d57ed2e AJ |
1628 | dnl On MinGW OpenLDAP is not available, so LDAP helpers can be linked |
1629 | dnl only with Windows LDAP libraries using -lwldap32 | |
1630 | AS_IF([test "$squid_host_os" = "mingw"],[ | |
1631 | LIBLDAP_LIBS="-lwldap32" | |
a1c22363 | 1632 | ],[ |
0d57ed2e AJ |
1633 | SQUID_STATE_SAVE(squid_ldap_state) |
1634 | LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS" | |
1635 | PKG_CHECK_MODULES([LIBLDAP],[ldap],[],[ | |
1636 | AC_CHECK_LIB(lber, ber_init, [LIBLBER="-llber"]) | |
1637 | AC_CHECK_LIB(ldap, ldap_init, [LIBLDAP_LIBS="-lldap $LIBLBER"]) | |
1638 | dnl if no ldap lib found check for mozilla version | |
1639 | AS_IF([test "x$ac_cv_lib_ldap_ldap_init" != "xyes"],[ | |
1640 | SQUID_STATE_SAVE(squid_ldap_mozilla) | |
1641 | LIBS="$LIBLDAP_PATH $LIBPTHREADS" | |
1642 | AC_CHECK_LIB(ldap60, ldap_init, [LIBLDAP_LIBS="-lldap60 $LIBLBER"]) | |
1643 | LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS" | |
1644 | AC_CHECK_LIB(prldap60, prldap_init, [LIBLDAP_LIBS="-lprldap60 $LIBLDAP_LIBS"]) | |
1645 | LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS" | |
1646 | AC_CHECK_LIB(ssldap60, ldapssl_init, [LIBLDAP_LIBS="-lssldap60 $LIBLDAP_LIBS"]) | |
1647 | SQUID_STATE_ROLLBACK(squid_ldap_mozilla) | |
1648 | ]) | |
1649 | ]) | |
1650 | AC_CHECK_HEADERS(ldap.h lber.h) | |
1651 | AC_CHECK_HEADERS(mozldap/ldap.h) | |
1652 | SQUID_CHECK_LDAP_API | |
a1c22363 | 1653 | ]) |
a1c22363 | 1654 | ]) |
1a22a39e | 1655 | |
6c025870 | 1656 | SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD]) |
6fa8c664 | 1657 | AH_TEMPLATE(USE_SYSTEMD,[systemd support is available]) |
a3bc98c3 | 1658 | SQUID_CHECK_LIB_WORKS(systemd,[ |
6fa8c664 | 1659 | SQUID_STATE_SAVE(squid_systemd_state) |
6c025870 AJ |
1660 | LIBS="$LIBS $LIBSYSTEMD_PATH" |
1661 | PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd],,[ | |
6fa8c664 | 1662 | # systemd < 209 |
6c025870 | 1663 | PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd-daemon],,[:]) |
6fa8c664 | 1664 | ]) |
6fa8c664 | 1665 | AC_CHECK_HEADERS(systemd/sd-daemon.h) |
6c025870 | 1666 | SQUID_STATE_ROLLBACK(squid_systemd_state) |
6fa8c664 | 1667 | |
6c025870 | 1668 | AS_IF([test "x$LIBSYSTEMD_LIBS" != "x"],[ |
6fa8c664 | 1669 | AC_DEFINE(USE_SYSTEMD,1,[systemd support is available]) |
a1c22363 AJ |
1670 | ]) |
1671 | ]) | |
6fa8c664 | 1672 | |
02749868 | 1673 | AC_ARG_ENABLE(forw-via-db, |
47d80734 | 1674 | AS_HELP_STRING([--enable-forw-via-db],[Enable Forw/Via database]), [ |
ec308e40 | 1675 | SQUID_YESNO([$enableval],[--enable-forw-via-db]) |
02749868 | 1676 | ]) |
21f6708d | 1677 | SQUID_DEFINE_BOOL(USE_FORW_VIA_DB,${enable_forw_via_db:=no}, |
9676633b FC |
1678 | [Enable Forw/Via database]) |
1679 | AC_MSG_NOTICE([Forw/Via database enabled: $enable_forw_via_db]) | |
02749868 | 1680 | |
6cfa8966 | 1681 | AC_ARG_ENABLE(cache-digests, |
47d80734 | 1682 | AS_HELP_STRING([--enable-cache-digests], |
7409131e | 1683 | [Use Cache Digests. See https://wiki.squid-cache.org/SquidFaq/CacheDigests]),[ |
ec308e40 | 1684 | SQUID_YESNO([$enableval],[--enable-cache-digests]) |
484f2ebc | 1685 | ]) |
0067eb06 | 1686 | SQUID_DEFINE_BOOL(USE_CACHE_DIGESTS,${enable_cache_digests:=no}, |
47d80734 | 1687 | [Use Cache Digests for locating objects in neighbor caches.]) |
9676633b | 1688 | AC_MSG_NOTICE([Cache Digests enabled: $enable_cache_digests]) |
47d80734 | 1689 | |
484f2ebc | 1690 | |
9676633b FC |
1691 | ################################ |
1692 | # check for netio plugin stuff # | |
1693 | ################################ | |
1694 | dnl order of these options handling is relevant in case the user | |
1695 | dnl supplies more than one --enable option. Options handled later | |
1696 | dnl override those handled earlier for io loop method manual override | |
1697 | AC_ARG_ENABLE(select, | |
a1c22363 | 1698 | AS_HELP_STRING([--disable-select],[Disable select(2) support.]),[ |
ec308e40 | 1699 | SQUID_YESNO([$enableval],[--enable-select]) |
91a04222 | 1700 | AS_IF([test "x$enableval" = "xyes"],[squid_opt_io_loop_engine="select"]) |
9676633b FC |
1701 | ]) |
1702 | AC_MSG_NOTICE([enabling select syscall for net I/O: ${enable_select:=auto}]) | |
cd748f27 | 1703 | |
9bb83c8b | 1704 | AC_ARG_ENABLE(poll, |
a1c22363 | 1705 | AS_HELP_STRING([--disable-poll],[Disable poll(2) support.]),[ |
ec308e40 | 1706 | SQUID_YESNO([$enableval],[--enable-poll]) |
8ff06f2a | 1707 | AS_IF([test "x$enableval" = "xyes"],[squid_opt_io_loop_engine="poll"]) |
9bb83c8b | 1708 | ]) |
9676633b | 1709 | AC_MSG_NOTICE([enabling poll syscall for net I/O: ${enable_poll:=auto}]) |
9bb83c8b | 1710 | |
1b3db6d9 | 1711 | AC_ARG_ENABLE(kqueue, |
26d50fd2 AJ |
1712 | AS_HELP_STRING([--disable-kqueue], |
1713 | [Disable kqueue(2) support.]), [ | |
ec308e40 | 1714 | SQUID_YESNO([$enableval],[--enable-kqueue]) |
1b3db6d9 | 1715 | ]) |
a1c22363 | 1716 | AS_IF([test "x${enable_kqueue:=auto}" != "xno"],[ |
26d50fd2 | 1717 | AC_CHECK_HEADERS([sys/event.h],[],[ |
a1c22363 | 1718 | AS_IF([test "x${enable_kqueue}" = "xyes"],[ |
26d50fd2 | 1719 | AC_MSG_ERROR([kqueue support requires sys/event.h header file.]) |
a1c22363 | 1720 | ]) |
26d50fd2 AJ |
1721 | ]) |
1722 | AC_CHECK_FUNCS(kqueue,[],[ | |
a1c22363 | 1723 | AS_IF([test "x${enable_kqueue}" = "xyes"],[ |
26d50fd2 | 1724 | AC_MSG_ERROR([kqueue support missing in libc library.]) |
a1c22363 | 1725 | ]) |
26d50fd2 | 1726 | ]) |
a1c22363 | 1727 | AS_IF([test "x$ac_cv_func_kqueue" = "xyes" -a "x$ac_cv_header_sys_event_h" = "xyes"],[ |
26d50fd2 | 1728 | squid_opt_io_loop_engine="kqueue" |
a1c22363 | 1729 | ],[ |
26d50fd2 | 1730 | enable_kqueue="no" |
a1c22363 AJ |
1731 | ]) |
1732 | ]) | |
26d50fd2 | 1733 | AC_MSG_NOTICE([enabling kqueue for net I/O: ${enable_kqueue:=auto}]) |
1b3db6d9 | 1734 | |
a46d2c0e | 1735 | dnl Enable epoll() |
a46d2c0e | 1736 | AC_ARG_ENABLE(epoll, |
62979ab1 | 1737 | AS_HELP_STRING([--disable-epoll],[Disable Linux epoll(2) support.]), |
a46d2c0e | 1738 | [ |
ec308e40 | 1739 | SQUID_YESNO([$enableval],[--enable-epoll]) |
a1c22363 | 1740 | AS_IF([test "x$enableval" = "xyes"],[squid_opt_io_loop_engine="epoll"]) |
a46d2c0e | 1741 | ]) |
9676633b | 1742 | AC_MSG_NOTICE([enabling epoll syscall for net I/O: ${enable_epoll:=auto}]) |
2ca8b332 | 1743 | |
9676633b FC |
1744 | # auto-detect and verify epoll header and library present and working |
1745 | # logic mapping and loop method selection are performed later | |
a1c22363 | 1746 | AS_IF([test "x$enable_epoll" != "xno"],[ |
9676633b | 1747 | # check if libs are needed to support epoll |
af1e01a8 | 1748 | SQUID_STATE_SAVE(squid_epoll_state) |
9676633b | 1749 | AC_SEARCH_LIBS(epoll_ctl,[epoll]) |
a1c22363 AJ |
1750 | AS_IF([test "x$ac_cv_search_epoll_ctl" = "xno"],[enable_epoll=no], |
1751 | [test "x$ac_cv_search_epoll_ctl" = "xnone required"],[EPOLL_LIBS=""], | |
1752 | [EPOLL_LIBS=$ac_cv_search_epoll_ctl] | |
1753 | ) | |
9676633b FC |
1754 | AC_SUBST(EPOLL_LIBS) |
1755 | SQUID_STATE_ROLLBACK(squid_epoll_state) #de-pollute LIBS | |
a46d2c0e | 1756 | |
9676633b | 1757 | # epoll requires sys/epoll.h |
98d13964 | 1758 | AC_CHECK_HEADERS([sys/epoll.h]) |
ad32c661 AJ |
1759 | |
1760 | dnl Verify that epoll really works | |
a1c22363 | 1761 | AS_IF([test "x$ac_cv_search_epoll_ctl" != "xno"], SQUID_CHECK_EPOLL) |
2ca8b332 | 1762 | |
a1c22363 | 1763 | AS_IF([test "x$enable_epoll" = "xyes" -a "x$squid_cv_epoll_works" = "xno"],[ |
2ca8b332 | 1764 | AC_MSG_ERROR([Epoll does not work. Force-enabling it is not going to help.]) |
a1c22363 AJ |
1765 | ]) |
1766 | ]) | |
a46d2c0e | 1767 | |
a1ad2f9b AJ |
1768 | dnl Enable /dev/poll |
1769 | AC_ARG_ENABLE(devpoll, | |
a1c22363 | 1770 | AS_HELP_STRING([--disable-devpoll],[Disable Solaris /dev/poll support.]),[ |
ec308e40 | 1771 | SQUID_YESNO([$enableval],[--enable-devpoll]) |
a1c22363 | 1772 | AS_IF([test "x$enableval" = "xyes"],[squid_opt_io_loop_engine="devpoll"]) |
a1ad2f9b AJ |
1773 | ]) |
1774 | AC_MSG_NOTICE([enabling /dev/poll for net I/O: ${enable_devpoll:=auto}]) | |
1775 | ||
1776 | ## auto-detect and verify devpoll header and library present and working | |
a1c22363 | 1777 | AS_IF([test "x$enable_devpoll" != "xno"],[ |
a1ad2f9b AJ |
1778 | # /dev/poll requires ioctl() and write() |
1779 | AC_CHECK_FUNCS(ioctl) | |
1780 | AC_CHECK_FUNCS(write) | |
1781 | ||
1782 | # /dev/poll requires sys/devpoll.h | |
1783 | AC_CHECK_HEADERS([sys/devpoll.h],,[ | |
a1c22363 AJ |
1784 | AS_IF([test "x$enable_devpoll" = "xyes"],[ |
1785 | AC_MSG_ERROR([--enable-devpoll specified but /dev/poll headers not found]) | |
1786 | ]) | |
1787 | enable_devpoll=no | |
1788 | ]) | |
a1ad2f9b AJ |
1789 | |
1790 | # Verify that /dev/poll really works | |
a1c22363 | 1791 | AS_IF([test "x$enable_devpoll" != "xno"], SQUID_CHECK_DEVPOLL) |
a1ad2f9b | 1792 | |
a1c22363 | 1793 | AS_IF([test "x$enable_devpoll" = "xyes" -a "x$squid_cv_devpoll_works" = "xno"],[ |
a1ad2f9b | 1794 | AC_MSG_ERROR([/dev/poll does not work. Force-enabling it is not going to help.]) |
a1c22363 AJ |
1795 | ]) |
1796 | ]) | |
9676633b | 1797 | |
72fd085a | 1798 | AC_ARG_ENABLE(http-violations, |
af1e01a8 FC |
1799 | AS_HELP_STRING([--disable-http-violations], |
1800 | [This allows you to remove code which is known to | |
47d80734 | 1801 | violate the HTTP protocol specification.]), [ |
ec308e40 | 1802 | SQUID_YESNO([$enableval],[--enable-http-violations]) |
72fd085a | 1803 | ]) |
626096be | 1804 | SQUID_DEFINE_BOOL(USE_HTTP_VIOLATIONS, ${enable_http_violations:=yes}, |
47d80734 | 1805 | [Define to enable code which volates the HTTP standard specification]) |
9676633b | 1806 | AC_MSG_NOTICE([HTTP violations support enabled: $enable_http_violations]) |
72fd085a | 1807 | |
47d80734 | 1808 | # IPFW Transparent Proxy |
68075fad | 1809 | AC_ARG_ENABLE(ipfw-transparent, |
1d26e252 FC |
1810 | AS_HELP_STRING([--enable-ipfw-transparent], |
1811 | [Enable Transparent Proxy support for systems | |
47d80734 | 1812 | using FreeBSD IPFW-style firewalling.]), [ |
ec308e40 | 1813 | SQUID_YESNO([$enableval],[--enable-ipfw-transparent]) |
68075fad | 1814 | ]) |
0067eb06 | 1815 | SQUID_DEFINE_BOOL(IPFW_TRANSPARENT,${enable_ipfw_transparent:=no}, |
2277004e | 1816 | [Enable support for Transparent Proxy on systems using FreeBSD IPFW-style firewalling.]) |
1d26e252 | 1817 | AC_MSG_NOTICE([FreeBSD IPFW-based transparent proxying enabled: $enable_ipfw_transparent]) |
68075fad | 1818 | |
47d80734 | 1819 | # IP-Filter Transparent Proxy |
5cafc1d6 | 1820 | AC_ARG_ENABLE(ipf-transparent, |
2277004e | 1821 | AS_HELP_STRING([--enable-ipf-transparent], |
1d26e252 | 1822 | [Enable Transparent Proxy support using IPFilter-style firewalling]), [ |
ec308e40 | 1823 | SQUID_YESNO([$enableval],[--enable-ipf-transparent]) |
5cafc1d6 | 1824 | ]) |
be0c7ff0 | 1825 | #will be AC_DEFINEd later, after checking for appropriate infrastructure |
4bd144d2 FC |
1826 | #IPF currently broken. Default-disabled for now. |
1827 | AC_MSG_NOTICE([IPF-based transparent proxying requested: ${enable_ipf_transparent:=no}]) | |
5cafc1d6 | 1828 | |
2b0dd4ac | 1829 | dnl Enable PF Transparent Proxy |
1830 | AC_ARG_ENABLE(pf-transparent, | |
2277004e | 1831 | AS_HELP_STRING([--enable-pf-transparent], |
47d80734 | 1832 | [Enable Transparent Proxy support for systems using PF network address redirection.]), [ |
ec308e40 | 1833 | SQUID_YESNO([$enableval],[--enable-pf-transparent]) |
2b0dd4ac | 1834 | ]) |
be0c7ff0 | 1835 | #will be AC_DEFINEd later, after checking for appropriate infrastructure |
b2192042 AJ |
1836 | AC_MSG_NOTICE([PF-based transparent proxying requested: ${enable_pf_transparent:=no}]) |
1837 | ||
1838 | dnl Enable /dev/pf support for older PF Transparent Proxy systems (OpenBSD 4.x and older) | |
1839 | AC_ARG_WITH(nat-devpf, | |
1840 | AS_HELP_STRING([--with-nat-devpf], | |
1841 | [Enable /dev/pf support for NAT on older OpenBSD and FreeBSD kernels.]), [ | |
ec308e40 | 1842 | SQUID_YESNO([$withval],[--with-nat-devpf]) |
b2192042 AJ |
1843 | ]) |
1844 | #will be AC_DEFINEd later, after checking for appropriate infrastructure | |
1845 | AC_MSG_NOTICE([NAT lookups via /dev/pf: ${with_nat_devpf:=no}]) | |
2b0dd4ac | 1846 | |
4bd144d2 | 1847 | # Linux Netfilter Transparent Proxy |
d852fbad | 1848 | AC_ARG_ENABLE(linux-netfilter, |
20ad76ab | 1849 | AS_HELP_STRING([--enable-linux-netfilter], |
96f08e2d | 1850 | [Enable Transparent Proxy support for Linux (Netfilter)]), [ |
ec308e40 | 1851 | SQUID_YESNO([$enableval],[--enable-linux-netfilter]) |
d852fbad | 1852 | ]) |
4bd144d2 | 1853 | AC_MSG_NOTICE([Linux Netfilter support requested: ${enable_linux_netfilter:=auto}]) |
be0c7ff0 | 1854 | #will be AC_DEFINEd later, after checking for appropriate infrastructure |
d852fbad | 1855 | |
425de4c8 AJ |
1856 | |
1857 | dnl Look for libnetfilter_conntrack options (needed for QOS netfilter marking) | |
24531401 | 1858 | SQUID_AUTO_LIB(netfilter-conntrack,[Netfilter conntrack],[LIBNETFILTER_CONNTRACK]) |
a3bc98c3 | 1859 | SQUID_CHECK_LIB_WORKS(netfilter-conntrack,[ |
a1c22363 AJ |
1860 | LDFLAGS="$LIBNETFILTER_CONNTRACK_PATH $LDFLAGS" |
1861 | CPPFLAGS="$LIBNETFILTER_CONNTRACK_CFLAGS $CPPFLAGS" | |
a3bc98c3 | 1862 | AC_SEARCH_LIBS([nfct_query],[netfilter_conntrack],[LIBNETFILTER_CONNTRACK_LIBS="-lnetfilter_conntrack"]) |
a1c22363 AJ |
1863 | AC_CHECK_HEADERS([ \ |
1864 | libnetfilter_conntrack/libnetfilter_conntrack.h \ | |
1865 | libnetfilter_conntrack/libnetfilter_conntrack_tcp.h | |
a3bc98c3 | 1866 | ],,[LIBNETFILTER_CONNTRACK_LIBS=""]) |
a1c22363 | 1867 | ]) |
425de4c8 | 1868 | |
bb7b5fd0 | 1869 | dnl Enable Large file support |
2df6213e | 1870 | buildmodel="" |
2df6213e | 1871 | |
1872 | AC_ARG_WITH(large-files, | |
507ca601 | 1873 | AS_HELP_STRING([--with-large-files],[Enable support for large files (logs etc).]), [ |
ec308e40 | 1874 | SQUID_YESNO([$withval],[--with-large-files]) |
a1c22363 | 1875 | squid_opt_enable_large_files=$withval |
bb7b5fd0 | 1876 | ]) |
1877 | ||
2df6213e | 1878 | dnl UNIX Build environment |
be0c7ff0 | 1879 | dnl AS_HELP_STRING is not suited here because it cannot to specify newlines |
2df6213e | 1880 | AC_ARG_WITH(build-environment, |
507ca601 | 1881 | AS_HELP_STRING([--with-build-environment=model], |
9603207d | 1882 | [The build environment to use. Normally one of |
507ca601 FC |
1883 | POSIX_V6_ILP32_OFF32 (32 bits), |
1884 | POSIX_V6_ILP32_OFFBIG (32 bits with large file support), | |
1885 | POSIX_V6_LP64_OFF64 (64 bits), | |
1886 | POSIX_V6_LPBIG_OFFBIG (large pointers and files), | |
1887 | XBS5_ILP32_OFF32 i(legacy, 32 bits), | |
1888 | XBS5_ILP32_OFFBIG (legacy, 32 bits with large file support), | |
1889 | XBS5_LP64_OFF64 (legacy, 64 bits), | |
1890 | XBS5_LPBIG_OFFBIG (legacy, large pointers and files) | |
1891 | or default (The default for your OS)]), [ | |
a1c22363 AJ |
1892 | AS_CASE(["$withval"], |
1893 | [yes|no],[AC_MSG_FAILURE([--with-build-environment expects a build environment string as used by getconf])], | |
1894 | [buildmodel="$withval"] | |
1895 | ) | |
2df6213e | 1896 | ]) |
1897 | ||
228332d3 FC |
1898 | #hack. Let's early-detect sizeof(long) |
1899 | AC_CHECK_SIZEOF(long) | |
1900 | ||
a1c22363 | 1901 | AS_IF([test "x$squid_opt_enable_large_files" = "xyes" -a "x$buildmodel" = "x"],[ |
2277004e | 1902 | for model in POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG; do |
a1c22363 | 1903 | AS_IF([test "`getconf _$model 2>/dev/null || true`" = 1 -o "`getconf $model 2>/dev/null || true`"],[ |
2277004e FC |
1904 | buildmodel=$model |
1905 | break | |
a1c22363 | 1906 | ]) |
2277004e | 1907 | done |
a1c22363 | 1908 | AS_IF([test "x$buildmodel" = "x"],[ |
2277004e | 1909 | AC_MSG_WARN([No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64]) |
a1c22363 AJ |
1910 | ]) |
1911 | ]) | |
1912 | AS_IF([test "x$buildmodel" = "xdefault" -o "x$buildmodel" = "x"],[ | |
228332d3 | 1913 | # define _FILE_OFFSET_BITS if requested and needed |
a1c22363 | 1914 | AS_IF([test "x$squid_opt_enable_large_files" = "xyes" -a $ac_cv_sizeof_long -le 4],[ |
507ca601 FC |
1915 | AC_MSG_NOTICE([Enabling -D_FILE_OFFSET_BITS=64]) |
1916 | CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS" | |
1917 | CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS" | |
a1c22363 AJ |
1918 | ]) |
1919 | ],[ | |
507ca601 | 1920 | AC_MSG_NOTICE([Using $buildmodel build environment]) |
a1c22363 AJ |
1921 | AS_IF([ ! test "`getconf _$buildmodel 2>/dev/null || true`" = 1 -o "`getconf $buildmodel 2>/dev/null || true`"],[ |
1922 | AC_MSG_ERROR([Build environment $buildmodel not known to getconf.]) | |
1923 | ]) | |
507ca601 FC |
1924 | CFLAGS="`getconf ${buildmodel}_CFLAGS` $CFLAGS" |
1925 | CXXFLAGS="`getconf ${buildmodel}_CFLAGS` $CXXFLAGS" | |
1926 | LIBS="`getconf ${buildmodel}_LIBS` $LIBS" | |
1927 | LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS" | |
2277004e | 1928 | |
a1c22363 | 1929 | AS_IF([test "x$squid_host_os" = "xsolaris"],[ |
2277004e FC |
1930 | # On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and |
1931 | # for LDFLAGS -xarch=generic64, but: | |
1932 | # "-Xa" is supported only by Sun cc, so we need to remove it when using gcc | |
1933 | # For gcc "-xarch=generic64" must be replaced with "-m64" | |
1934 | # The 'sun' define is needed by ipfilter includes, so we must remove "-Usun" | |
a1c22363 | 1935 | AS_IF([test "x$GCC" = "xyes"],[ |
2277004e FC |
1936 | AC_MSG_NOTICE([Removing -Xa for gcc/g++ on $host]) |
1937 | CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`" | |
1938 | CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`" | |
1939 | AC_MSG_NOTICE([Replacing -xarch=generic64 with -m64 for gcc/g++ on $host]) | |
1940 | CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`" | |
1941 | CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`" | |
1942 | LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`" | |
a1c22363 | 1943 | ]) |
2277004e FC |
1944 | AC_MSG_NOTICE([Removing -Usun on $host]) |
1945 | CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`" | |
1946 | CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Usun//'`" | |
a1c22363 AJ |
1947 | ]) |
1948 | ]) | |
2df6213e | 1949 | |
3d674977 | 1950 | AC_ARG_ENABLE(follow-x-forwarded-for, |
6c83720b AR |
1951 | AS_HELP_STRING([--disable-follow-x-forwarded-for], |
1952 | [Do not follow the X-Forwarded-For | |
19b4777c FC |
1953 | HTTP header to try to find the IP address of the |
1954 | original or indirect client when a request has | |
8075a4da | 1955 | been forwarded through other proxies.]), [ |
ec308e40 | 1956 | SQUID_YESNO([$enableval],[--enable-follow-x-forwarded-for]) |
8075a4da | 1957 | ]) |
6ec005b5 | 1958 | AC_MSG_NOTICE([Support for X-Forwarded-For enabled: ${enable_follow_x_forwarded_for:=yes}]) |
3a5af257 | 1959 | SQUID_DEFINE_BOOL(FOLLOW_X_FORWARDED_FOR,$enable_follow_x_forwarded_for, |
47d80734 | 1960 | [Enable following X-Forwarded-For headers]) |
3d674977 | 1961 | |
3898f57f | 1962 | AC_ARG_ENABLE(ident-lookups, |
8075a4da | 1963 | AS_HELP_STRING([--disable-ident-lookups], |
47d80734 | 1964 | [Remove code that supports performing Ident (RFC 931) lookups.]), [ |
ec308e40 | 1965 | SQUID_YESNO([$enableval],[--enable-ident-lookups]) |
8075a4da | 1966 | ]) |
6c5dc16a FC |
1967 | AC_MSG_NOTICE([Support for Ident lookups enabled: ${enable_ident_lookups:=yes}]) |
1968 | SQUID_DEFINE_BOOL(USE_IDENT,$enable_ident_lookups,[Support for Ident (RFC 931) lookups]) | |
3898f57f | 1969 | |
9d798391 | 1970 | dnl Select Default hosts file location |
1971 | AC_ARG_ENABLE(default-hostsfile, | |
8ea232f5 FC |
1972 | AS_HELP_STRING([--enable-default-hostsfile=path], |
1973 | [Select default location for hosts file. | |
75eaac6c | 1974 | See hosts_file directive in squid.conf for details]), [ |
a1c22363 AJ |
1975 | # TODO: handle the "yes" case cleanly |
1976 | AS_CASE(["$enableval"], | |
1977 | [no|none],[squid_opt_default_hosts="none"], | |
1978 | [ | |
1979 | squid_opt_default_hosts=$enableval | |
1980 | AS_IF([ ! test -f "$enableval"],[ | |
1981 | AC_MSG_WARN([Unable to find file $enableval. I hope you know what you are doing.]) | |
1982 | ]) | |
1983 | ]) | |
75eaac6c FC |
1984 | ]) |
1985 | AC_MSG_NOTICE([Default hosts file set to: ${squid_opt_default_hosts:=/etc/hosts}]) | |
1986 | DEFAULT_HOSTS=$squid_opt_default_hosts | |
1987 | AC_SUBST(DEFAULT_HOSTS) | |
9d798391 | 1988 | |
47d80734 | 1989 | # Select auth schemes modules to build |
94439e4e | 1990 | AC_ARG_ENABLE(auth, |
6c83720b AR |
1991 | AS_HELP_STRING([--disable-auth], |
1992 | [Do not support authentication. When supported, the list of schemes | |
26ffc057 | 1993 | and helpers to be enabled is defined elsewhere]), [ |
ec308e40 | 1994 | SQUID_YESNO([$enableval],[--enable-auth]) |
94439e4e | 1995 | ]) |
26ffc057 | 1996 | AC_MSG_NOTICE([Authentication support enabled: ${enable_auth:=yes}]) |
2f1431ea AJ |
1997 | SQUID_DEFINE_BOOL(USE_AUTH,$enable_auth,[Enable support for authentication]) |
1998 | AM_CONDITIONAL(ENABLE_AUTH, test "x$enable_auth" != "xno") | |
26ffc057 | 1999 | AUTH_MODULES="" |
dcbfe1a3 | 2000 | require_smblib="no" |
b9ce9676 | 2001 | require_sspi="no" |
26ffc057 FC |
2002 | |
2003 | AC_ARG_ENABLE(auth-basic, | |
2004 | AS_HELP_STRING([--enable-auth-basic="list of helpers"], | |
2005 | [Enable the basic authentication scheme, and build the specified helpers. | |
2006 | Not providing an explicit list of helpers will attempt build of | |
2007 | all possible helpers. Default is to do so. | |
2008 | To disable the basic authentication scheme, use --disable-auth-basic. | |
d9655720 | 2009 | To enable but build no helpers, specify "none". |
03901cf8 | 2010 | To see available helpers, see the src/auth/basic/ directory. ]),[ |
26ffc057 FC |
2011 | #nothing to do really |
2012 | ]) | |
03901cf8 | 2013 | m4_include([src/auth/basic/helpers.m4]) |
94439e4e | 2014 | |
12daeef6 AJ |
2015 | AC_ARG_ENABLE(auth-digest, |
2016 | AS_HELP_STRING([--enable-auth-digest="list of helpers"], | |
2017 | [Enable the Digest authentication scheme, and build the specified helpers. | |
26ffc057 FC |
2018 | Not providing an explicit list of helpers will attempt build of |
2019 | all possible helpers. Default is to do so. | |
12daeef6 | 2020 | To disable the Digest authentication scheme, use --disable-auth-digest. |
26ffc057 | 2021 | To enable but build no helpers, specify "none". |
d4d7f6dd | 2022 | To see available helpers, see the src/auth/digest/ directory. ]),[ |
12daeef6 | 2023 | #nothing to do, really |
380f0a87 | 2024 | ]) |
d4d7f6dd | 2025 | m4_include([src/auth/digest/helpers.m4]) |
94439e4e | 2026 | |
26ffc057 FC |
2027 | AC_ARG_ENABLE(auth-negotiate, |
2028 | AS_HELP_STRING([--enable-auth-negotiate="list of helpers"], | |
16c02b14 | 2029 | [Enable the Negotiate authentication scheme, and build the specified |
26ffc057 FC |
2030 | helpers. |
2031 | Not providing an explicit list of helpers will attempt build of | |
2032 | all possible helpers. Default is to do so. | |
16c02b14 | 2033 | To disable the Negotiate authentication scheme, |
26ffc057 FC |
2034 | use --disable-auth-negotiate. |
2035 | To enable but build no helpers, specify "none". | |
16c02b14 | 2036 | To see available helpers, see the src/auth/negotiate/ directory. ]),[ |
26ffc057 | 2037 | #nothing to do, really |
6e785d85 | 2038 | ]) |
16c02b14 | 2039 | m4_include([src/auth/negotiate/helpers.m4]) |
6e785d85 | 2040 | |
12daeef6 AJ |
2041 | AC_ARG_ENABLE(auth-ntlm, |
2042 | AS_HELP_STRING([--enable-auth-ntlm="list of helpers"], | |
2043 | [Enable the NTLM authentication scheme, and build the specified helpers. | |
26ffc057 FC |
2044 | Not providing an explicit list of helpers will attempt build of |
2045 | all possible helpers. Default is to do so. | |
12daeef6 | 2046 | To disable the NTLM authentication scheme, use --disable-auth-ntlm. |
1a22a39e | 2047 | To enable but build no helpers, specify "none". |
b817c20f | 2048 | To see available helpers, see the src/auth/ntlm/ directory. ]),[ |
1a22a39e | 2049 | ]) |
b817c20f | 2050 | m4_include([src/auth/ntlm/helpers.m4]) |
c8093f05 | 2051 | |
1a22a39e MM |
2052 | dnl Authentication libraries to build |
2053 | dnl This list will not be needed when each auth library has its own Makefile | |
2054 | dnl this is to be placed AFTER each auth module's handler | |
2055 | AUTH_LIBS_TO_BUILD= | |
2056 | for module in $AUTH_MODULES; do | |
2057 | AUTH_LIBS_TO_BUILD="$AUTH_LIBS_TO_BUILD ${module}/lib${module}.la" | |
2058 | done | |
2059 | AC_SUBST(AUTH_MODULES) | |
2060 | AC_SUBST(AUTH_LIBS_TO_BUILD) | |
dcbfe1a3 | 2061 | AM_CONDITIONAL(ENABLE_SMBLIB, test "x$require_smblib" = "xyes") |
b9ce9676 | 2062 | AM_CONDITIONAL(ENABLE_SSPI, test "x$require_sspi" = "xyes") |
3d62cc61 | 2063 | |
1a22a39e MM |
2064 | dnl Select logging daemon helpers to build |
2065 | AC_ARG_ENABLE(log-daemon-helpers, | |
2066 | AS_HELP_STRING([--enable-log-daemon-helpers="list of helpers"], | |
4d5dd85a | 2067 | [This option selects which logging daemon helpers to |
1a22a39e | 2068 | build and install as part of the normal build process |
4d5dd85a | 2069 | For a list of available helpers see the src/log/ |
1a22a39e MM |
2070 | directory.]),[ |
2071 | #nothing to do, really | |
2072 | ]) | |
4d5dd85a | 2073 | m4_include([src/log/helpers.m4]) |
9ca29d23 | 2074 | |
c6588c68 | 2075 | AC_ARG_ENABLE(external-acl-helpers, |
f2d9a578 | 2076 | AS_HELP_STRING([--enable-external-acl-helpers="list of helpers"], |
e046643f | 2077 | [Enable external_acl helpers support and the helpers themselves. |
d9655720 | 2078 | Default is to build all buildable helpers and enable support. |
8ea232f5 | 2079 | To disable support, use --disable-external-acl-helpers. |
d9655720 | 2080 | To build no helpers, specify "none". |
e046643f | 2081 | To see available helpers, see the src/acl/external/ |
8ea232f5 | 2082 | directory]), [ |
d9655720 | 2083 | #nothing to do, really |
c6588c68 | 2084 | ]) |
e046643f | 2085 | m4_include([src/acl/external/helpers.m4]) |
d9655720 | 2086 | |
fdbb3b19 | 2087 | dnl Select url_rewrite helpers to build |
fdbb3b19 | 2088 | AC_ARG_ENABLE(url-rewrite-helpers, |
081863f3 | 2089 | AS_HELP_STRING([--enable-url-rewrite-helpers="list of helpers"], |
fdbb3b19 AJ |
2090 | [This option selects which url_rewrite helpers to |
2091 | build and install as part of the normal build | |
8ea232f5 FC |
2092 | process. The default is to attempt the build of all possible |
2093 | helpers. Use --disable-url-rewrite-helpers to build none. | |
2094 | For a list of available helpers see the | |
d6d6203a | 2095 | src/http/url_rewriters/ directory.]),[ |
fdbb3b19 | 2096 | ]) |
d6d6203a | 2097 | m4_include([src/http/url_rewriters/helpers.m4]) |
fdbb3b19 | 2098 | |
a27cfbe0 | 2099 | dnl Select security helpers to build |
8732ea9d AJ |
2100 | AC_ARG_ENABLE(security-cert-validators, |
2101 | AS_HELP_STRING([--enable-security-cert-validators="list of helpers"], | |
bbf79f12 AJ |
2102 | [This option selects which security certificate validator |
2103 | helpers to build and install as part of the normal build | |
a27cfbe0 | 2104 | process. The default is to attempt the build of all possible |
8732ea9d | 2105 | helpers. Use --disable-security-cert-validators to |
bbf79f12 AJ |
2106 | build none. For a list of available helpers see the |
2107 | src/security/cert_validators/ directory.]),[ | |
a27cfbe0 | 2108 | ]) |
4d5dd85a | 2109 | m4_include([src/security/cert_validators/helpers.m4]) |
a27cfbe0 | 2110 | |
cb0b3d63 AJ |
2111 | AC_ARG_ENABLE(security-cert-generators, |
2112 | AS_HELP_STRING([--enable-security-cert-generators="list of helpers"], | |
2113 | [This option selects which security certificate validator | |
2114 | helpers to build and install as part of the normal build | |
2115 | process. The default is to attempt the build of all possible | |
2116 | helpers. Use --disable-security-cert-genrators to | |
2117 | build none. For a list of available helpers see the | |
2118 | src/security/cert_generators/ directory.]),[ | |
2119 | ]) | |
2120 | m4_include([src/security/cert_generators/helpers.m4]) | |
2121 | ||
0d5ee502 AM |
2122 | dnl Select storeid_rewrite helpers to build |
2123 | AC_ARG_ENABLE(storeid-rewrite-helpers, | |
2124 | AS_HELP_STRING([--enable-storeid-rewrite-helpers="list of helpers"], | |
2125 | [This option selects which Store-ID rewrite helpers to | |
2126 | build and install as part of the normal build | |
2127 | process. The default is to attempt the build of all possible | |
2128 | helpers. Use --disable-storeid-rewrite-helpers to build none. | |
2129 | For a list of available helpers see the | |
0c1f8b9b | 2130 | src/store/id_rewriters/ directory.]),[ |
0d5ee502 | 2131 | ]) |
0c1f8b9b | 2132 | m4_include([src/store/id_rewriters/helpers.m4]) |
0d5ee502 | 2133 | |
3a125142 | 2134 | AC_ARG_WITH(valgrind-debug, |
0f705e3b FC |
2135 | AS_HELP_STRING([--with-valgrind-debug], |
2136 | [Include debug instrumentation for use with valgrind]), | |
4e26f472 | 2137 | [ |
ec308e40 | 2138 | SQUID_YESNO([$withval],[--with-valgrind-debug]) |
a1c22363 | 2139 | AS_IF([test "x$withval" != "xno"],[ |
4e26f472 FC |
2140 | AC_CHECK_HEADERS(valgrind/memcheck.h,[],[ |
2141 | AC_MSG_ERROR([Valgrind support requested, needed headers not found.]) | |
2142 | ]) | |
a1c22363 | 2143 | ]) |
b4bab919 | 2144 | ]) |
4e26f472 FC |
2145 | SQUID_DEFINE_BOOL(WITH_VALGRIND,${with_valgrind_debug:=no}, |
2146 | [Valgrind memory debugger support]) | |
2147 | AC_MSG_NOTICE([Valgrind debug support enabled: $with_valgrind_debug]) | |
b4bab919 | 2148 | |
0e657244 | 2149 | dnl Enable WIN32 Service compile mode |
2150 | AC_ARG_ENABLE(win32-service, | |
054a4caa | 2151 | AS_HELP_STRING([--enable-win32-service], |
0f705e3b | 2152 | [Compile Squid as a WIN32 Service. |
b284c470 | 2153 | Works only on MS-Windows platforms]), [ |
ec308e40 | 2154 | SQUID_YESNO([$enableval],[--enable-win32-service]) |
0e657244 | 2155 | ]) |
b284c470 FC |
2156 | SQUID_DEFINE_BOOL(USE_WIN32_SERVICE,${enable_win32_service:=no}, |
2157 | [Enable code supporting MS Windows service mode]) | |
2158 | AC_MSG_NOTICE([MS Windows service mode enabled: $enable_win32_service]) | |
0e657244 | 2159 | |
b1485ff8 | 2160 | |
29f22442 | 2161 | # Disable "unlinkd" code |
fe0810ac | 2162 | AC_ARG_ENABLE(unlinkd, |
0a081cb0 | 2163 | AS_HELP_STRING([--disable-unlinkd],[Do not use unlinkd]), [ |
ec308e40 | 2164 | SQUID_YESNO([$enableval],[--enable-unlinkd]) |
fe0810ac | 2165 | ]) |
0f658b5b | 2166 | SQUID_DEFINE_BOOL(USE_UNLINKD,${enable_unlinkd:=yes}, |
0f705e3b | 2167 | [Enable useage of unlinkd]) |
fcabe077 | 2168 | AM_CONDITIONAL(ENABLE_UNLINKD,test "x$enable_unlinkd" = "xyes") |
fbc04c0a | 2169 | AC_MSG_NOTICE([unlinkd enabled: $enable_unlinkd]) |
fe0810ac | 2170 | |
0f705e3b | 2171 | # Enable backtraces on fatal errors |
ce3d30fb | 2172 | AC_ARG_ENABLE(stacktraces, |
0f705e3b FC |
2173 | AS_HELP_STRING([--enable-stacktraces], |
2174 | [Enable automatic call backtrace on fatal errors]), [ | |
ec308e40 | 2175 | SQUID_YESNO([$enableval],[--enable-stacktraces]) |
ce3d30fb | 2176 | ]) |
0f658b5b | 2177 | SQUID_DEFINE_BOOL(PRINT_STACK_TRACE,${enable_stacktraces:=no}, |
0f705e3b | 2178 | [Print stack traces on fatal errors]) |
78614cd4 | 2179 | AC_MSG_NOTICE([Automatically print stack trace on fatal errors: $enable_stacktraces]) |
0a081cb0 | 2180 | |
904676a2 | 2181 | # Enable X-Accelerator-Vary for Vary support within an accelerator setup |
2092c67d | 2182 | AC_ARG_ENABLE(x-accelerator-vary, |
904676a2 FC |
2183 | AS_HELP_STRING([--enable-x-accelerator-vary], |
2184 | [Enable support for the X-Accelerator-Vary | |
e702812e FC |
2185 | HTTP header. Can be used to indicate |
2186 | variance within an accelerator setup. | |
2187 | Typically used together with other code | |
904676a2 | 2188 | that adds custom HTTP headers to the requests.]), [ |
ec308e40 | 2189 | SQUID_YESNO([$enableval],[--enable-x-accelerator-vary]) |
f66a9ef4 | 2190 | ]) |
0f658b5b | 2191 | SQUID_DEFINE_BOOL(X_ACCELERATOR_VARY,${enable_x_accelerator_vary:=no}, |
904676a2 | 2192 | [Enable support for the X-Accelerator-Vary HTTP header]) |
78614cd4 | 2193 | AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary]) |
f66a9ef4 | 2194 | |
24531401 | 2195 | SQUID_AUTO_LIB(cppunit,[cppunit test framework],[LIBCPPUNIT]) |
a3bc98c3 | 2196 | SQUID_CHECK_LIB_WORKS(cppunit,[ |
24531401 | 2197 | LIBCPPUNIT_LIBS="$LIBCPPUNIT_PATH -lcppunit" |
d93bf055 | 2198 | PKG_CHECK_MODULES([LIBCPPUNIT],[cppunit],[ |
f30eb8f7 | 2199 | squid_cv_cppunit_version="`pkg-config --modversion cppunit`" |
d93bf055 AJ |
2200 | AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version]) |
2201 | AS_UNSET(squid_cv_cppunit_version) | |
2202 | ||
2203 | SQUID_STATE_SAVE(squid_cppunit_state) | |
e77b66af FC |
2204 | CXXFLAGS="${CXXFLAGS} ${LIBCPPUNIT_CFLAGS}" |
2205 | LIBS="${LIBS} ${LIBCPPUNIT_LIBS}" | |
d93bf055 AJ |
2206 | AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h) |
2207 | SQUID_STATE_ROLLBACK(squid_cppunit_state) | |
2208 | ],[ | |
2209 | AC_MSG_WARN([cppunit does not appear to be installed. Squid does not require this, but code testing with 'make check' will fail.]) | |
2210 | ]) | |
f5691f9c | 2211 | ]) |
f5691f9c | 2212 | |
090089c4 | 2213 | dnl Check for headers |
db40ae20 | 2214 | AC_CHECK_HEADERS( \ |
3680cc44 FC |
2215 | arpa/inet.h \ |
2216 | arpa/nameser.h \ | |
2217 | assert.h \ | |
2218 | bstring.h \ | |
3680cc44 | 2219 | crypt.h \ |
3680cc44 | 2220 | ctype.h \ |
ee4d4e85 | 2221 | direct.h \ |
a1c22363 | 2222 | dirent.h \ |
3680cc44 FC |
2223 | errno.h \ |
2224 | execinfo.h \ | |
2225 | fcntl.h \ | |
2226 | fnmatch.h \ | |
2227 | getopt.h \ | |
2228 | glob.h \ | |
2229 | gnumalloc.h \ | |
2230 | grp.h \ | |
3680cc44 | 2231 | ipl.h \ |
3680cc44 FC |
2232 | libc.h \ |
2233 | limits.h \ | |
2234 | linux/posix_types.h \ | |
2235 | linux/types.h \ | |
3680cc44 | 2236 | malloc.h \ |
3680cc44 FC |
2237 | math.h \ |
2238 | memory.h \ | |
2239 | mount.h \ | |
2240 | netdb.h \ | |
2241 | netinet/in.h \ | |
2242 | netinet/in_systm.h \ | |
3680cc44 | 2243 | netinet/tcp.h \ |
3680cc44 FC |
2244 | paths.h \ |
2245 | poll.h \ | |
321223fe | 2246 | priv.h \ |
3680cc44 | 2247 | pwd.h \ |
c2afddd8 | 2248 | regex.h \ |
3680cc44 | 2249 | sched.h \ |
2ccf2eb2 | 2250 | siginfo.h \ |
3680cc44 | 2251 | signal.h \ |
3680cc44 FC |
2252 | stdarg.h \ |
2253 | stddef.h \ | |
3680cc44 FC |
2254 | stdio.h \ |
2255 | stdlib.h \ | |
3680cc44 FC |
2256 | string.h \ |
2257 | strings.h \ | |
2258 | sys/bitypes.h \ | |
3680cc44 FC |
2259 | sys/file.h \ |
2260 | sys/ioctl.h \ | |
d440d5a4 | 2261 | sys/ipc.cc \ |
3680cc44 FC |
2262 | sys/param.h \ |
2263 | sys/prctl.h \ | |
321223fe | 2264 | sys/procctl.h \ |
3680cc44 | 2265 | sys/md5.h \ |
c975f532 | 2266 | sys/mman.h \ |
3680cc44 FC |
2267 | sys/msg.h \ |
2268 | sys/resource.h \ | |
2ccf2eb2 | 2269 | sys/select.h \ |
d440d5a4 | 2270 | sys/shm.h \ |
3680cc44 FC |
2271 | sys/socket.h \ |
2272 | sys/stat.h \ | |
3680cc44 FC |
2273 | syscall.h \ |
2274 | sys/syscall.h \ | |
2275 | sys/time.h \ | |
2276 | sys/types.h \ | |
2277 | sys/uio.h \ | |
2278 | sys/un.h \ | |
2279 | sys/vfs.h \ | |
2280 | sys/wait.h \ | |
2281 | syslog.h \ | |
2282 | time.h \ | |
2283 | unistd.h \ | |
2284 | utime.h \ | |
2285 | varargs.h \ | |
2286 | byteswap.h \ | |
2287 | glib.h \ | |
2288 | stdint.h \ | |
2289 | inttypes.h \ | |
cdb86165 | 2290 | wchar.h |
db40ae20 | 2291 | ) |
3c586e38 | 2292 | |
ee80a919 AR |
2293 | AC_CHECK_HEADERS( \ |
2294 | linux/netfilter_ipv4.h \ | |
2295 | linux/netfilter_ipv6/ip6_tables.h \ | |
fc68f6b1 | 2296 | ,,, |
dcd1dc78 | 2297 | SQUID_DEFAULT_INCLUDES |
2298 | #if HAVE_LIMITS_H | |
2299 | #include <limits.h> | |
2300 | #endif | |
a74968c2 AJ |
2301 | /* Netfilter ip(6)tables v1.4.0 has broken headers */ |
2302 | #if HAVE_NETINET_IN_H | |
2303 | #include <netinet/in.h> | |
2304 | #endif | |
dcd1dc78 | 2305 | ) |
2306 | ||
61beade2 | 2307 | dnl *BSD do not include the dependencies for all their net/ and netinet/ files |
c92b4732 | 2308 | dnl We must include a few basic type headers for them to work. |
d1e5191e | 2309 | AC_CHECK_HEADERS( \ |
0c0d381b FC |
2310 | net/if.h \ |
2311 | netinet/if_ether.h\ | |
2312 | netinet/icmp6.h \ | |
2313 | netinet/in.h \ | |
2314 | netinet/ip.h \ | |
2315 | netinet/ip6.h \ | |
0c0d381b FC |
2316 | netinet/ip_icmp.h \ |
2317 | netinet/ipl.h \ | |
0c0d381b FC |
2318 | net/pf/pfvar.h \ |
2319 | net/pfvar.h \ | |
2320 | sys/mount.h\ | |
2321 | resolv.h \ | |
d1e5191e AJ |
2322 | ,,, |
2323 | SQUID_BSDNET_INCLUDES) | |
5a3237b0 | 2324 | |
aee0606f | 2325 | AC_C_CONST |
d57288d2 | 2326 | AC_C_BIGENDIAN |
aee0606f | 2327 | |
6a9f6389 | 2328 | AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ |
a1c22363 | 2329 | #if HAVE_TIME_H |
6a9f6389 | 2330 | #include <time.h> |
2331 | #endif | |
5c51415d | 2332 | ]) |
46c883ed | 2333 | |
a186e0d9 | 2334 | AC_CHECK_TYPE(struct rusage,AC_DEFINE(HAVE_STRUCT_RUSAGE,1,[The system provides struct rusage]),,[ |
8ff51bba | 2335 | #if HAVE_SYS_TIME_H |
2336 | #include <sys/time.h> | |
2337 | #endif | |
b54a6789 | 2338 | #if HAVE_SYS_RESOURCE_H |
2339 | #include <sys/resource.h> | |
a1c22363 | 2340 | #endif |
a1c22363 | 2341 | ]) |
b54a6789 | 2342 | |
6a9f6389 | 2343 | AC_CHECK_MEMBERS([struct iphdr.ip_hl],,,[ |
2344 | #if HAVE_SYS_TYPES_H | |
2345 | #include <sys/types.h> | |
2346 | #endif | |
a025a745 | 2347 | #include <netinet/in.h> |
2348 | #include <netinet/in_systm.h> | |
6ad85e8a | 2349 | #include <netinet/ip.h> |
b05490a8 | 2350 | #if defined (__linux__) || defined (__CYGWIN__) |
6ad85e8a | 2351 | #define ip_hl ihl |
2352 | #endif | |
2353 | #ifndef __linux__ | |
b05490a8 | 2354 | #ifndef __CYGWIN__ |
6ad85e8a | 2355 | #define iphdr ip |
b05490a8 | 2356 | #endif |
6a9f6389 | 2357 | #endif]) |
a025a745 | 2358 | |
090089c4 | 2359 | dnl Check for typedefs |
77d6bd88 | 2360 | AC_CHECK_SIZEOF(void *) |
090089c4 | 2361 | |
41aa7d00 FC |
2362 | # check for a bunch of types |
2363 | AC_TYPE_INT8_T | |
2364 | AC_TYPE_UINT8_T | |
2365 | AC_TYPE_INT16_T | |
2366 | AC_TYPE_UINT16_T | |
2367 | AC_TYPE_INT32_T | |
2368 | AC_TYPE_UINT32_T | |
2369 | AC_TYPE_INT64_T | |
2370 | AC_TYPE_UINT64_T | |
2371 | AC_TYPE_PID_T | |
2372 | AC_TYPE_SIZE_T | |
2373 | AC_TYPE_SSIZE_T | |
2374 | AC_TYPE_OFF_T | |
2375 | AC_TYPE_UID_T | |
59a09b98 | 2376 | AC_CHECK_TYPE([bool]) |
41aa7d00 FC |
2377 | #need the defines for PRId64 |
2378 | AC_CHECK_SIZEOF(int64_t) | |
2379 | AC_CHECK_SIZEOF(long) | |
50f9c873 AR |
2380 | #need the define for overflow checks |
2381 | AC_CHECK_SIZEOF(off_t) | |
46e172d9 | 2382 | AC_CHECK_SIZEOF(size_t) |
6a9f6389 | 2383 | |
588e71df | 2384 | dnl On Solaris 9 x86, gcc may includes a "fixed" set of old system include files |
2385 | dnl that is incompatible with the updated Solaris header files. | |
2386 | dnl For this reason, we must check if pad128_t and upad128_t are defined. | |
2387 | AC_CHECK_TYPE(pad128_t, | |
2388 | AC_DEFINE(HAVE_PAD128_T,1,[pad128_t is defined in system headers]), | |
2389 | ,SQUID_DEFAULT_INCLUDES) | |
2390 | ||
2391 | AC_CHECK_TYPE(upad128_t, | |
2392 | AC_DEFINE(HAVE_UPAD128_T,1,[upad128_t is defined in system headers]), | |
2393 | ,SQUID_DEFAULT_INCLUDES) | |
2394 | ||
6a9f6389 | 2395 | AC_CHECK_TYPE(mode_t, AC_DEFINE(HAVE_MODE_T,1,[mode_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) |
2396 | AC_CHECK_TYPE(fd_mask, AC_DEFINE(HAVE_FD_MASK,1,[fd_mask is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) | |
adcceb47 | 2397 | |
6a9f6389 | 2398 | AC_CHECK_TYPE(socklen_t,AC_DEFINE(HAVE_SOCKLEN_T,1,[socklen_t is defined by the system headers]),,[ |
2399 | #include <sys/types.h> | |
6637e3a5 | 2400 | #include <sys/socket.h> |
6637e3a5 | 2401 | #include <stdlib.h> |
2402 | #include <stddef.h> | |
a1c22363 | 2403 | ]) |
6637e3a5 | 2404 | |
cdb352bb FC |
2405 | AC_CHECK_TYPE(mtyp_t,AC_DEFINE(HAVE_MTYP_T,1, |
2406 | [mtyp_t is defined by the system headers]),,[#include <sys/types.h> | |
2407 | #include <sys/ipc.h> | |
2408 | #include <sys/msg.h>]) | |
2409 | ||
f367e6af AJ |
2410 | AC_CHECK_TYPE(cpu_set_t, |
2411 | AC_DEFINE(HAVE_CPU_SET_T,1,[cpu_set_t is defined by the system headers]),,[ | |
2412 | #if HAVE_SCHED_H | |
2413 | #include <sched.h> | |
2414 | #endif | |
2415 | ]) | |
2416 | ||
cdb352bb FC |
2417 | dnl Check for special functions |
2418 | AC_FUNC_ALLOCA | |
2419 | ||
59eac907 | 2420 | SQUID_AUTO_LIB(cap,[Linux capabilities],[LIBCAP]) |
a3bc98c3 | 2421 | SQUID_CHECK_LIB_WORKS(cap,[ |
59eac907 | 2422 | SQUID_STATE_SAVE(squid_libcap_state) |
24531401 AJ |
2423 | CXXFLAGS="$LIBCAP_CFLAGS $CXXFLAGS" |
2424 | LDFLAGS="$LIBCAP_PATH $LDFLAGS" | |
59eac907 AJ |
2425 | PKG_CHECK_MODULES([LIBCAP],[libcap >= 2.09],[],[ |
2426 | # cap_clear_flag is the most recent libcap function we require | |
2427 | AC_CHECK_LIB([cap],[cap_clear_flag],[LIBCAP_LIBS="$LIBCAP_LIBS -lcap"]) | |
2428 | ]) | |
45c41a07 | 2429 | SQUID_CHECK_FUNCTIONAL_LIBCAP2 |
59eac907 AJ |
2430 | AC_MSG_NOTICE([libcap headers are ok: $squid_cv_sys_capability_works]) |
2431 | AS_IF([test "x$squid_cv_sys_capability_works" = "xno"],[LIBCAP_LIBS=""]) | |
2432 | SQUID_STATE_ROLLBACK(squid_libcap_state) | |
2433 | ||
2434 | AS_IF([test "x$LIBCAP_LIBS" != "x"],[ | |
59eac907 | 2435 | AC_DEFINE(USE_LIBCAP,1,[Linux capabilities library support]) |
a1c22363 AJ |
2436 | ]) |
2437 | ]) | |
b64b6030 | 2438 | |
090089c4 | 2439 | dnl Check for needed libraries |
54c95954 | 2440 | AC_SEARCH_LIBS([gethostbyname],[nsl resolv bind]) |
819656da AJ |
2441 | AC_SEARCH_LIBS([res_init],[resolv]) |
2442 | AC_SEARCH_LIBS([__res_search],[resolv]) | |
54c95954 FC |
2443 | AC_SEARCH_LIBS([bind],[socket]) |
2444 | AC_SEARCH_LIBS([opcom_stack_trace],[opcom_stack]) | |
85cd85f3 | 2445 | AC_SEARCH_LIBS([yp_match], [nsl nss_nis nss_nisplus]) |
94d48591 | 2446 | |
46f50de9 FC |
2447 | # check that we have unix sockets |
2448 | SQUID_CHECK_UNIX_SOCKET | |
2449 | SQUID_DEFINE_BOOL(HAVE_UNIXSOCKET,$squid_cv_unixsocket,[System supports unix sockets]) | |
2450 | ||
2451 | AC_CHECK_LIB(gnumalloc, malloc) | |
a1c22363 | 2452 | AS_IF([test "x$ac_cv_lib_gnumalloc_malloc" = "xyes"],[ |
ef7ece58 | 2453 | AC_MSG_NOTICE([Disabling extended malloc functions when using bundled gnumalloc]) |
46f50de9 FC |
2454 | ac_cv_func_mallocblksize=no |
2455 | ac_cv_func_mallopt=no | |
a1c22363 AJ |
2456 | ],[ |
2457 | AS_CASE(["$squid_host_os"], | |
2458 | [solaris],[AC_MSG_NOTICE([skipping libmalloc check for $host])], | |
2459 | [freebsd],[AC_MSG_NOTICE([skipping libmalloc check for $host])], | |
2460 | [AC_CHECK_LIB(malloc, main)] | |
2461 | ) | |
2462 | ]) | |
2463 | ||
2464 | AS_IF([test "$squid_host_os" = "mingw"],[ | |
2465 | AC_MSG_NOTICE([Use MSVCRT for math functions.]) | |
2466 | ],[ | |
2467 | dnl log() are only used in old C code for now. | |
2468 | AC_LANG_PUSH([C]) | |
2469 | AC_SEARCH_LIBS([log],[m]) | |
2470 | AC_LANG_POP([C]) | |
2471 | ]) | |
090089c4 | 2472 | |
f467f578 FC |
2473 | dnl --with-maxfd present for compatibility with Squid-2. |
2474 | dnl undocumented in ./configure --help to encourage using the Squid-3 directive | |
a1c22363 AJ |
2475 | AC_ARG_WITH(maxfd,,[ |
2476 | AS_CASE([$withval], | |
c881e2b1 | 2477 | [@<:@0-9@:>@*],[ |
f467f578 | 2478 | squid_filedescriptors_num=$withval |
acea95af | 2479 | AC_MSG_NOTICE([forcing default of $squid_filedescriptors_num filedescriptors (user-forced)]) |
a1c22363 AJ |
2480 | ], |
2481 | [AC_MSG_ERROR(--with-maxfd expects a numeric argument)] | |
2482 | ) | |
055421ee | 2483 | ]) |
001ad4cc | 2484 | |
f467f578 FC |
2485 | AC_ARG_WITH(filedescriptors, |
2486 | AS_HELP_STRING([--with-filedescriptors=NUMBER], | |
c881e2b1 | 2487 | [Force squid to support NUMBER filedescriptors]),[ |
a1c22363 | 2488 | AS_CASE([$withval], |
c881e2b1 | 2489 | [@<:@0-9@:>@*],[ |
f467f578 | 2490 | squid_filedescriptors_num=$withval |
a1c22363 AJ |
2491 | AC_MSG_NOTICE([forcing default of $squid_filedescriptors_num filedescriptors (user-forced)])], |
2492 | [AC_MSG_ERROR([--with-filedescriptors expects a numeric argument])] | |
2493 | ) | |
c881e2b1 | 2494 | ]) |
f467f578 FC |
2495 | |
2496 | SQUID_CHECK_DEFAULT_FD_SETSIZE | |
acea95af | 2497 | SQUID_CHECK_MAXFD |
001ad4cc | 2498 | |
f467f578 | 2499 | |
001ad4cc AJ |
2500 | dnl Enable IPv6 support |
2501 | AC_MSG_CHECKING([whether to enable IPv6]) | |
001ad4cc | 2502 | AC_ARG_ENABLE(ipv6, |
af494bc8 | 2503 | AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support. The default is to probe system capabilities on startup.]), [ |
ec308e40 | 2504 | SQUID_YESNO([$enableval],[--enable-ipv6]) |
001ad4cc | 2505 | ]) |
7d927f1f AJ |
2506 | AC_MSG_RESULT(${enable_ipv6:=yes}) |
2507 | SQUID_DEFINE_BOOL(USE_IPV6,$enable_ipv6,[Enable support for IPv6 ]) | |
001ad4cc | 2508 | |
a1c22363 | 2509 | AS_IF([test "x$enable_ipv6" = "xyes"],[SQUID_CHECK_SIN6_LEN_IN_SAI]) |
7d553ad9 AJ |
2510 | SQUID_CHECK_SS_LEN_IN_SOCKADDR_STORAGE |
2511 | SQUID_CHECK_SIN_LEN_IN_SOCKADDR_IN | |
001ad4cc | 2512 | |
77f675ad | 2513 | dnl System-specific library modifications |
a1c22363 AJ |
2514 | AH_TEMPLATE(GETTIMEOFDAY_NO_TZP,[Whether gettimeofday takes only one argument]) |
2515 | AS_CASE(["$host"], | |
2516 | [*-pc-sco3.2*],[ | |
2517 | # -lintl is needed on SCO version 3.2v4.2 for strftime() | |
2518 | # Robert Side <rside@aiinc.bc.ca> | |
2519 | # Mon, 18 Jan 1999 17:48:00 GMT | |
2520 | AC_CHECK_LIB(intl, strftime) | |
2521 | ], | |
2522 | ||
2523 | [i386-*-solaris2.*],[ | |
2524 | AS_IF([test "x$GCC" = "xyes"],[ | |
fcabe077 | 2525 | AC_MSG_NOTICE([Removing -O for gcc on $host]) |
d0441961 | 2526 | CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9g]]*//'`" |
a1c22363 AJ |
2527 | ]) |
2528 | ], | |
141eb4a6 | 2529 | |
a1c22363 | 2530 | [*-sgi-irix*],[ |
fcabe077 FC |
2531 | AC_MSG_NOTICE([Removing -lsocket for IRIX...]) |
2532 | LIBS=`echo $LIBS | sed -e s/-lsocket//` | |
2533 | AC_MSG_NOTICE([Removing -lnsl for IRIX...]) | |
2534 | LIBS=`echo $LIBS | sed -e s/-lnsl//` | |
2535 | ac_cv_lib_nsl_main=no | |
a1c22363 AJ |
2536 | ], |
2537 | ||
2538 | [*-ibm-aix*],[ | |
3e1ce596 KB |
2539 | SQUID_CC_REQUIRE_ARGUMENT([ac_cv_require_rtti],[-rtti],[[ |
2540 | #include <assert.h> | |
2541 | #ifndef NULL | |
2542 | #define NULL 0 | |
2543 | #endif | |
2544 | class Foo{ | |
2545 | public:virtual ~Foo(){} | |
2546 | }; | |
2547 | class Bar:public Foo{ | |
2548 | public:Bar():Foo(){} | |
2549 | }; | |
2550 | ]],[[ | |
2551 | Foo * myFoo=new Bar(); | |
2552 | Bar * myBar=dynamic_cast<Bar *>(myFoo); | |
2553 | assert(myBar != NULL); | |
2554 | ]]) | |
a1c22363 | 2555 | AS_IF([test "$ac_cv_require_rtti" = "yes"],[ |
3e1ce596 KB |
2556 | SQUID_CFLAGS="-rtti $SQUID_CFLAGS" |
2557 | SQUID_CXXFLAGS="-rtti $SQUID_CXXFLAGS" | |
a1c22363 | 2558 | ]) |
3e1ce596 KB |
2559 | |
2560 | AC_LANG_PUSH([C]) | |
2561 | SQUID_CC_REQUIRE_ARGUMENT([ac_cv_require_qcpluscmt],[-qcpluscmt],[[]],[[//c++ cmt]]) | |
fcabe077 | 2562 | AC_LANG_POP([C]) |
a1c22363 | 2563 | AS_IF([test "$ac_cv_require_qcpluscmt" = "yes"],[ |
3e1ce596 | 2564 | SQUID_CFLAGS="-qcpluscmt $SQUID_CFLAGS" |
a1c22363 AJ |
2565 | ]) |
2566 | ], | |
2567 | ||
2568 | [*-*-solaris2.[[0-4]]],[AC_DEFINE(GETTIMEOFDAY_NO_TZP,1)], | |
3e1ce596 | 2569 | |
a1c22363 AJ |
2570 | [*-sony-newsos[[56]]*],[AC_DEFINE(GETTIMEOFDAY_NO_TZP,1)] |
2571 | ) | |
090089c4 | 2572 | |
84cecfd2 | 2573 | dnl This has to be before AC_CHECK_FUNCS |
2574 | # Disable poll() on certain platforms. Override by setting ac_cv_func_poll | |
2575 | # when running configure. | |
a1c22363 AJ |
2576 | AS_IF([test "x$ac_cv_func_poll" = "x"],[ |
2577 | AS_CASE(["$host"], | |
2578 | [*-hp-hpux*.*],[ | |
fcabe077 FC |
2579 | # Duane Wessels |
2580 | AC_MSG_NOTICE([disabling poll for $host...]) | |
2581 | ac_cv_func_poll='no' | |
a1c22363 AJ |
2582 | ], |
2583 | ||
2584 | [*-linux-*],[ | |
fcabe077 FC |
2585 | # Henrik Nordstrom (hno@squid-cache.org) 19980817 |
2586 | # poll is problematic on Linux. We disable it | |
2587 | # by default until Linux gets it right. | |
2588 | rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'` | |
a1c22363 | 2589 | AS_IF([test $rev -lt 002002],[ |
fcabe077 FC |
2590 | AC_MSG_NOTICE([disabling poll for $host < 2.2...]) |
2591 | ac_cv_func_poll='no' | |
a1c22363 AJ |
2592 | ]) |
2593 | ], | |
2594 | ||
2595 | [powerpc-ibm-aix4.1.*],[ | |
fcabe077 FC |
2596 | # Mike Laster (mlaster@metavillage.com) 19981021 |
2597 | AC_MSG_NOTICE([disabling poll for $host...]) | |
2598 | ac_cv_func_poll='no' | |
a1c22363 AJ |
2599 | ] |
2600 | ) | |
2601 | ]) | |
176d10ee | 2602 | |
6716b242 | 2603 | dnl Check for library functions |
2604 | AC_CHECK_FUNCS(\ | |
ce3d30fb | 2605 | backtrace_symbols_fd \ |
3a144521 | 2606 | bcopy \ |
4de1e2da | 2607 | eui64_aton \ |
4ac29a5b | 2608 | fchmod \ |
6716b242 | 2609 | getdtablesize \ |
8505e57b | 2610 | getpagesize \ |
230c091c | 2611 | getpass \ |
30a4f2a8 | 2612 | getrusage \ |
9c1d8929 | 2613 | getspnam \ |
379d5751 | 2614 | gettimeofday \ |
52303a3d | 2615 | glob \ |
0f5efab0 | 2616 | mallocblksize \ |
6716b242 | 2617 | mallopt \ |
2ae6b9b0 | 2618 | memcpy \ |
30a4f2a8 | 2619 | memmove \ |
ee4d4e85 | 2620 | memrchr \ |
dac27377 | 2621 | memset \ |
b99a6dec | 2622 | mkstemp \ |
1812b6c7 | 2623 | mktime \ |
88738790 | 2624 | mstats \ |
84cecfd2 | 2625 | poll \ |
62ae0622 | 2626 | prctl \ |
321223fe | 2627 | procctl \ |
3a144521 | 2628 | pthread_attr_setschedparam \ |
cd748f27 | 2629 | pthread_attr_setscope \ |
2630 | pthread_setschedparam \ | |
42b51993 | 2631 | pthread_sigmask \ |
c68e9c6b | 2632 | putenv \ |
c2afddd8 AJ |
2633 | regcomp \ |
2634 | regexec \ | |
2635 | regfree \ | |
819656da AJ |
2636 | res_init \ |
2637 | __res_init \ | |
4915be3b | 2638 | rint \ |
96c2bb61 AR |
2639 | sched_getaffinity \ |
2640 | sched_setaffinity \ | |
3a144521 | 2641 | select \ |
234967c9 | 2642 | seteuid \ |
c415c128 | 2643 | setgroups \ |
321223fe | 2644 | setpflags \ |
30a4f2a8 | 2645 | setpgrp \ |
30a4f2a8 | 2646 | setsid \ |
2647 | sigaction \ | |
11430c03 | 2648 | snprintf \ |
1ccc0d40 | 2649 | socketpair \ |
6716b242 | 2650 | sysconf \ |
2651 | syslog \ | |
234967c9 | 2652 | timegm \ |
28da5e0d | 2653 | vsnprintf \ |
6716b242 | 2654 | ) |
f5e5c4cf | 2655 | dnl ... and some we provide local replacements for |
2656 | AC_REPLACE_FUNCS(\ | |
f5e5c4cf | 2657 | initgroups \ |
2ccf2eb2 | 2658 | psignal \ |
f5e5c4cf | 2659 | strerror \ |
585cddda | 2660 | strtoll \ |
f5e5c4cf | 2661 | tempnam \ |
2662 | ) | |
6716b242 | 2663 | |
9676633b FC |
2664 | # Magic which checks whether we are forcing a type of comm loop we |
2665 | # are actually going to (ab)use. | |
2666 | # Mostly ripped from squid-commloops, thanks to adrian and benno | |
1b3db6d9 | 2667 | |
a1c22363 AJ |
2668 | AS_IF([test "x$squid_opt_io_loop_engine" != "x"], |
2669 | AC_MSG_NOTICE([choosing user-specified net I/O API $squid_opt_io_loop_engine]), | |
2670 | [test "x$enable_epoll" != "xno" -a "x$squid_cv_epoll_works" = "xyes"], | |
2671 | squid_opt_io_loop_engine="epoll", | |
2672 | [test "x$enable_kqueue" != "xno"], | |
2673 | squid_opt_io_loop_engine="kqueue", | |
2674 | [test "x$enable_devpoll" != "xno"], | |
2675 | squid_opt_io_loop_engine="devpoll", | |
2676 | [test "x$enable_poll" != "xno" -a "x$ac_cv_func_poll" = "xyes"], | |
2677 | squid_opt_io_loop_engine="poll", | |
2678 | [test "x$enable_select" != "xno" -a "x$ac_cv_func_select" = "xyes"], | |
2679 | squid_opt_io_loop_engine="select", | |
a1c22363 AJ |
2680 | [ |
2681 | AC_MSG_WARN([Eep! Cannot find epoll, kqueue, /dev/poll, poll or select!]) | |
2682 | AC_MSG_WARN([Will try select and hope for the best.]) | |
2683 | squid_opt_io_loop_engine="select" | |
2684 | ] | |
2685 | ) | |
d474c7a6 | 2686 | |
8075a4da | 2687 | AC_MSG_NOTICE([Using ${squid_opt_io_loop_engine} for the IO loop.]) |
d474c7a6 | 2688 | |
8aafbbc1 AJ |
2689 | AM_CONDITIONAL(ENABLE_POLL, test "x$squid_opt_io_loop_engine" = "xpoll") |
2690 | AM_CONDITIONAL(ENABLE_EPOLL, test "x$squid_opt_io_loop_engine" = "xepoll") | |
2691 | AM_CONDITIONAL(ENABLE_SELECT, test "x$squid_opt_io_loop_engine" = "xselect") | |
8aafbbc1 AJ |
2692 | AM_CONDITIONAL(ENABLE_KQUEUE, test "x$squid_opt_io_loop_engine" = "xkqueue") |
2693 | AM_CONDITIONAL(ENABLE_DEVPOLL, test "x$squid_opt_io_loop_engine" = "xdevpoll") | |
d474c7a6 | 2694 | |
a1c22363 AJ |
2695 | AS_CASE([$squid_opt_io_loop_engine], |
2696 | [epoll],[AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop])], | |
2697 | [devpoll],[AC_DEFINE(USE_DEVPOLL,1,[Use /dev/poll for the IO loop])], | |
2698 | [poll],[AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop])], | |
2699 | [kqueue],[AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop])], | |
a1c22363 AJ |
2700 | [select],[AC_DEFINE(USE_SELECT,1,[Use select() for the IO loop])], |
2701 | ) | |
1b3db6d9 | 2702 | |
a1c22363 | 2703 | AS_IF([test "x$ac_cv_func_sched_getaffinity" = "xyes" -a "x$ac_cv_func_sched_setaffinity" = "xyes"],[ |
96c2bb61 | 2704 | AC_DEFINE(HAVE_CPU_AFFINITY,1,[Support setting CPU affinity for workers]) |
a1c22363 | 2705 | ]) |
96c2bb61 | 2706 | |
91983da0 | 2707 | SQUID_CHECK_SETRESUID_WORKS |
a1c22363 | 2708 | AS_IF([test "x$squid_cv_resuid_works" = "xyes"],[ |
be0c7ff0 | 2709 | AC_DEFINE(HAVE_SETRESUID,1,[Yay! Another Linux brokenness. Knowing that setresuid() exists is not enough, because RedHat 5.0 declares setresuid() but does not implement it.]) |
a1c22363 | 2710 | ]) |
60939927 | 2711 | |
2ff9dfaa | 2712 | AC_CHECK_HEADERS(mswsock.h) |
14c0d3ab DK |
2713 | AC_MSG_CHECKING([for constant CMSG_SPACE]) |
2714 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | |
2715 | #if HAVE_SYS_SOCKET_H | |
2716 | #include <sys/socket.h> | |
2717 | #endif | |
2ff9dfaa AJ |
2718 | #if HAVE_MSWSOCK_H |
2719 | #include <mswsock.h> | |
2720 | #endif | |
14c0d3ab DK |
2721 | |
2722 | int a[CMSG_SPACE(int)]; | |
2723 | ]])], [ | |
2724 | AC_MSG_RESULT(yes) | |
2725 | AC_DEFINE(HAVE_CONSTANT_CMSG_SPACE, 1, [Define to 1 if CMSG_SPACE is constant]) | |
2726 | ], [ | |
2727 | AC_MSG_RESULT(no) | |
2728 | ]) | |
2729 | ||
ecd8516d | 2730 | AC_CHECK_TYPE(struct cmsghdr,AC_DEFINE(HAVE_CMSGHDR,1,[The system provides struct cmsghdr]),,[ |
c72f8c2e AJ |
2731 | #if HAVE_SYS_SOCKET_H |
2732 | #include <sys/socket.h> | |
2733 | #endif | |
2ff9dfaa AJ |
2734 | #if HAVE_MSWSOCK_H |
2735 | #include <mswsock.h> | |
2736 | #endif | |
c72f8c2e AJ |
2737 | #if HAVE_WINSOCK2_H |
2738 | #include <winsock2.h> | |
2739 | #endif | |
2740 | ]) | |
2741 | ||
ecd8516d | 2742 | AC_CHECK_TYPE(struct iovec,AC_DEFINE(HAVE_IOVEC,1,[The system provides struct iovec]),,[ |
c72f8c2e AJ |
2743 | #if HAVE_SYS_SOCKET_H |
2744 | #include <sys/socket.h> | |
2745 | #endif | |
2746 | #if HAVE_WINSOCK2_H | |
2747 | #include <winsock2.h> | |
2748 | #endif | |
9ac84dcf FC |
2749 | #if HAVE_SYS_UIO_H |
2750 | #include <sys/uio.h> | |
2751 | #endif | |
c72f8c2e AJ |
2752 | ]) |
2753 | ||
ecd8516d | 2754 | AC_CHECK_TYPE(struct msghdr,AC_DEFINE(HAVE_MSGHDR,1,[The system provides struct msghdr]),,[ |
c72f8c2e AJ |
2755 | #if HAVE_SYS_SOCKET_H |
2756 | #include <sys/socket.h> | |
2757 | #endif | |
2ff9dfaa AJ |
2758 | #if HAVE_MSWSOCK_H |
2759 | #include <mswsock.h> | |
2760 | #endif | |
c72f8c2e AJ |
2761 | #if HAVE_WINSOCK2_H |
2762 | #include <winsock2.h> | |
2763 | #endif | |
2764 | ]) | |
2765 | ||
ecd8516d | 2766 | AC_CHECK_TYPE(struct sockaddr_un,AC_DEFINE(HAVE_SOCKADDR_UN,1,[The system provides sockaddr_un]),,[ |
c72f8c2e AJ |
2767 | #if HAVE_SYS_UN_H |
2768 | #include <sys/un.h> | |
2769 | #endif | |
2770 | #if HAVE_SYS_SOCKET_H | |
2771 | #include <sys/socket.h> | |
2772 | #endif | |
2773 | #if HAVE_WINSOCK2_H | |
2774 | #include <winsock2.h> | |
2775 | #endif | |
2776 | ]) | |
2777 | ||
0abb39dd | 2778 | SQUID_CHECK_FUNC_STRNSTR |
cee08cbc | 2779 | |
5cafc1d6 | 2780 | dnl IP-Filter support requires ipf header files. These aren't |
2781 | dnl installed by default, so we need to check for them | |
a1c22363 AJ |
2782 | AS_IF([test "x$enable_ipf_transparent" != "xno"],[ |
2783 | SQUID_CHECK_BROKEN_SOLARIS_IPFILTER | |
2784 | AC_MSG_CHECKING(for availability of IP-Filter header files) | |
2785 | # hold on to your hats... | |
2786 | AS_IF( | |
2787 | [test "x$ac_cv_header_ip_compat_h" = "xyes" -o \ | |
2788 | "x$ac_cv_header_ip_fil_compat_h" = "xyes" -o \ | |
2789 | "x$ac_cv_header_netinet_ip_compat_h" = "xyes" -o \ | |
2790 | "x$ac_cv_header_netinet_ip_fil_compat_h" = "xyes"], | |
2791 | [have_ipfilter_compat_header="yes"]) | |
2792 | ||
2793 | AS_IF( | |
2794 | [test "x$have_ipfilter_compat_header" = "xyes" -a \ | |
2795 | "x$ac_cv_header_ip_fil_h" = "xyes" -a \ | |
2796 | "x$ac_cv_header_ip_nat_h" = "xyes"],[enable_ipf_transparent="yes"], | |
2797 | ||
2798 | [test "x$have_ipfilter_compat_header" = "xyes" -a \ | |
2799 | "x$ac_cv_header_netinet_ip_fil_h" = "xyes" -a \ | |
2800 | "x$ac_cv_header_netinet_ip_nat_h" = "xyes"],[enable_ipf_transparent="yes"], | |
2801 | [enable_ipf_transparent="no"]) | |
2802 | ||
2803 | AC_MSG_RESULT($IPF_TRANSPARENT) | |
d25bbe26 AJ |
2804 | |
2805 | ## On Solaris Ipfilter includes expect that SOLARIS2 is defined with the | |
2806 | ## Solaris minor version (8, 9, 10, ...) | |
a1c22363 | 2807 | AS_IF([test "x$enable_ipf_transparent" = "xyes" -a "x$squid_host_os" = "xsolaris"],[ |
d25bbe26 AJ |
2808 | solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'` |
2809 | CFLAGS="-DSOLARIS2=$solrev $CFLAGS" | |
2810 | CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS" | |
a1c22363 AJ |
2811 | ]) |
2812 | ]) | |
1d26e252 | 2813 | AC_MSG_NOTICE([IPF-based transparent proxying enabled: $enable_ipf_transparent]) |
0f658b5b | 2814 | SQUID_DEFINE_BOOL(IPF_TRANSPARENT,$enable_ipf_transparent, |
1d26e252 FC |
2815 | [Enable support for IPF-style transparent proxying]) |
2816 | ||
b2192042 | 2817 | dnl PF /dev/pf support requires a header file. |
a1c22363 AJ |
2818 | AS_IF([test "x$with_nat_devpf" != "xno"],[ |
2819 | AS_IF([test "x$ac_cv_header_net_pfvar_h" = "xyes" -o \ | |
2820 | "x$ac_cv_header_net_pf_pfvar_h" = "xyes"],[ | |
2821 | AS_IF([test "x$with_nat_devpf" = "xauto"],[with_nat_devpf="no"]) | |
2822 | ],[ | |
2823 | AS_IF([test "x$with_nat_devpf" = "xyes"],[ | |
b2192042 | 2824 | AC_MSG_ERROR([PF /dev/pf based NAT requested but needed header not found]) |
a1c22363 | 2825 | ]) |
b2192042 | 2826 | with_nat_devpf="no" |
a1c22363 AJ |
2827 | ]) |
2828 | ]) | |
b2192042 | 2829 | SQUID_DEFINE_BOOL(PF_TRANSPARENT,${enable_pf_transparent:=no}, |
38ff0a40 | 2830 | [Enable support for PF-style transparent proxying]) |
b2192042 AJ |
2831 | SQUID_DEFINE_BOOL(USE_NAT_DEVPF,${with_nat_devpf:=no}, |
2832 | [Enable support for /dev/pf NAT lookups]) | |
2b0dd4ac | 2833 | |
a1c22363 AJ |
2834 | AS_IF([test "x$enable_linux_netfilter" != "xno"],[ |
2835 | AS_IF([test "x$ac_cv_header_linux_netfilter_ipv4_h" = "xyes"],[ | |
2836 | AS_IF([test "x$enable_linux_netfilter" = "xauto"],[enable_linux_netfilter=yes]) | |
2837 | ],[ | |
2838 | AS_IF([test "x$enable_linux_netfilter" = "xauto"],[ | |
4bd144d2 | 2839 | enable_linux_netfilter=no |
a1c22363 | 2840 | ],[ |
4bd144d2 | 2841 | AC_MSG_ERROR([Linux Netfilter support requested but needed headers not found]) |
a1c22363 AJ |
2842 | ]) |
2843 | ]) | |
2844 | ]) | |
0f658b5b | 2845 | SQUID_DEFINE_BOOL(LINUX_NETFILTER,$enable_linux_netfilter, |
969d4051 | 2846 | [Enable support for Transparent Proxy on Linux via Netfilter]) |
20ad76ab | 2847 | |
b50f1b2b | 2848 | dnl Netfilter TPROXY depends on libcap but the NAT parts can still work. |
4bd144d2 | 2849 | AC_MSG_NOTICE([Support for Netfilter-based interception proxy requested: $enable_linux_netfilter]) |
59eac907 | 2850 | AS_IF([test "x$enable_linux_netfilter" = "xyes" -a "x$with_cap" != "xyes"],[ |
a1c22363 AJ |
2851 | AC_MSG_WARN([Missing needed capabilities (libcap 2.09+) for TPROXY]) |
2852 | AC_MSG_WARN([Linux Transparent Proxy (version 4+) support WILL NOT be enabled]) | |
2853 | AC_MSG_WARN([Reduced support to NAT Interception Proxy]) | |
2854 | # AC_DEFINEd later | |
2855 | ]) | |
59eac907 | 2856 | AS_IF([test "x$with_netfilter_conntrack" = "xyes" -a "x$with_cap" != "xyes"],[ |
a1c22363 AJ |
2857 | AC_MSG_WARN([Missing needed capabilities (libcap 2.09+) for netfilter mark support]) |
2858 | AC_MSG_WARN([Linux netfilter marking support WILL NOT be enabled]) | |
2859 | with_netfilter_conntrack=no | |
2860 | ]) | |
24531401 | 2861 | AC_MSG_NOTICE([Linux Netfilter Conntrack support enabled: ${with_netfilter_conntrack}]) |
11e8cfe3 AB |
2862 | |
2863 | ||
2864 | AC_ARG_ENABLE(zph-qos, | |
6c83720b | 2865 | AS_HELP_STRING([--disable-zph-qos],[Disable ZPH QOS support]), [ |
ec308e40 | 2866 | SQUID_YESNO([$enableval],[--enable-zph-qos]) |
11e8cfe3 AB |
2867 | ]) |
2868 | SQUID_DEFINE_BOOL(USE_QOS_TOS,${enable_zph_qos:=yes}, | |
2869 | [Enable Zero Penalty Hit QOS. When set, Squid will alter the | |
2870 | TOS field of HIT responses to help policing network traffic]) | |
2871 | AC_MSG_NOTICE([ZPH QOS enabled: $enable_zph_qos]) | |
a1c22363 AJ |
2872 | AS_IF(test "x$enable_zph_qos" = "xyes"],[ |
2873 | AC_MSG_NOTICE([QOS netfilter mark preservation enabled: $with_netfilter_conntrack]) | |
2874 | SQUID_DEFINE_BOOL(USE_LIBNETFILTERCONNTRACK,${with_netfilter_conntrack:=no}, | |
2875 | [Enable support for QOS netfilter mark preservation]) | |
2876 | ]) | |
c2afddd8 AJ |
2877 | |
2878 | AC_CHECK_LIB(regex, regexec, [REGEXLIB="-lregex"],[REGEXLIB='']) | |
c2afddd8 AJ |
2879 | AC_SUBST(REGEXLIB) |
2880 | ||
8e0acaf5 FC |
2881 | SQUID_DETECT_UDP_SND_BUFSIZE |
2882 | SQUID_DETECT_UDP_RECV_BUFSIZE | |
2883 | SQUID_DETECT_TCP_SND_BUFSIZE | |
2884 | SQUID_DETECT_TCP_RECV_BUFSIZE | |
6bf65235 | 2885 | |
5c3c56fa FC |
2886 | SQUID_CHECK_NEED_SYS_ERRLIST |
2887 | SQUID_CHECK_MAXPATHLEN | |
cc192b50 | 2888 | |
819656da AJ |
2889 | SQUID_CHECK_LIBRESOLV_DNS_TTL_HACK |
2890 | SQUID_CHECK_RESOLVER_FIELDS | |
2891 | ||
615540cd | 2892 | AC_CHECK_HEADERS(sys/statvfs.h) |
a1c22363 AJ |
2893 | AS_IF([test "x$ac_cv_header_sys_statvfs_h" = "xyes"],[SQUID_CHECK_WORKING_STATVFS]) |
2894 | AS_IF([test "x$ac_cv_func_statvfs" != "xyes"],[ | |
615540cd AJ |
2895 | AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/vfs.h sys/statfs.h) |
2896 | AC_CHECK_FUNCS(statfs) | |
2897 | SQUID_CHECK_F_FRSIZE_IN_STATFS | |
a1c22363 | 2898 | ]) |
c68e9c6b | 2899 | |
4eb85b7a | 2900 | dnl Squid will not usually attempt to translate templates when building |
461b8219 | 2901 | AC_ARG_ENABLE(translation, |
4eb85b7a | 2902 | AS_HELP_STRING([--enable-translation],[Generate the localized error page templates and manuals. |
9603207d | 2903 | Which can also be downloaded from http://www.squid-cache.org/Versions/langpack/.]), [ |
ec308e40 | 2904 | SQUID_YESNO([$enableval],[--enable-translation]) |
461b8219 | 2905 | ]) |
a1c22363 | 2906 | AS_IF([test "x${enable_translation:=no}" = "xyes"],[ |
461b8219 | 2907 | AX_WITH_PROG([PO2HTML],[po2html]) |
02259ff8 | 2908 | AX_WITH_PROG([PO2TEXT],[po2txt]) |
a1c22363 | 2909 | ],[ |
461b8219 | 2910 | PO2HTML="off" |
02259ff8 | 2911 | PO2TEXT="off" |
a1c22363 | 2912 | ]) |
461b8219 | 2913 | AC_SUBST(PO2HTML) |
02259ff8 | 2914 | AC_SUBST(PO2TEXT) |
d146da3b | 2915 | AM_CONDITIONAL(ENABLE_TRANSLATION, test "x${enable_translation:=no}" = "xyes") |
ee1a8ac2 | 2916 | |
43000484 AJ |
2917 | dnl Squid now has limited locale handling ... |
2918 | dnl on error pages | |
2919 | AC_ARG_ENABLE(auto-locale, | |
62979ab1 | 2920 | AS_HELP_STRING([--disable-auto-locale],[This prevents Squid providing localized error pages based on the |
21d5413e | 2921 | clients request headers. |
fb46b778 | 2922 | When disabled Squid requires explicit language configuration.]), [ |
ec308e40 | 2923 | SQUID_YESNO([$enableval],[--enable-auto-locale]) |
8db7a54b | 2924 | ]) |
fb46b778 FC |
2925 | AC_MSG_NOTICE([Multi-Language support enabled: ${enable_auto_locale:=yes}]) |
2926 | SQUID_DEFINE_BOOL(USE_ERR_LOCALES,$enable_auto_locale, | |
2927 | [Use multi-language support on error pages]) | |
2928 | ||
43000484 | 2929 | |
090089c4 | 2930 | dnl Need the debugging version of malloc if available |
2931 | XTRA_OBJS='' | |
a1c22363 AJ |
2932 | AS_IF([test "x$ac_cv_lib_malloc_main" = "xyes"],[ |
2933 | AS_IF([test -r /usr/lib/debug/malloc.o],[XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"]) | |
2934 | AS_IF([test -r /usr/lib/debug/mallocmap.o],[XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"]); | |
2935 | ]) | |
090089c4 | 2936 | AC_SUBST(XTRA_OBJS) |
2937 | ||
a1c22363 AJ |
2938 | AS_IF([test "x$XTRA_LIBS" = "x"],[ |
2939 | XTRA_LIBS="$LIBS" | |
2940 | dnl minor cleanup | |
2941 | XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/ */ /g"` | |
2942 | LIBS='' | |
2943 | ]) | |
090089c4 | 2944 | AC_SUBST(XTRA_LIBS) |
2945 | ||
daed6927 FC |
2946 | AC_SUBST(SQUID_CFLAGS) |
2947 | AC_SUBST(SQUID_CXXFLAGS) | |
2948 | ||
09835feb | 2949 | # Prerequisite: CXXFLAGS have been finalized. |
b2f0a375 | 2950 | AC_ARG_VAR([BUILDCXXFLAGS],[C++ compiler flags for building compile-time tools. e.g. cf_gen]) |
a1c22363 | 2951 | AS_IF([test "x$BUILDCXXFLAGS" = "x"],[ |
b2f0a375 AJ |
2952 | # if we are NOT cross-compiling, use the default build flags for cf_gen and friends |
2953 | # otherwise rely on the user-provided value | |
a1c22363 | 2954 | AS_IF([test "x$squid_cv_check_marchnative" = "xyes"],[ |
b2f0a375 | 2955 | # always valid for the Build compiler. |
b3080eec | 2956 | BUILDCXXFLAGS="-march=native" |
a1c22363 | 2957 | ]) |
b2f0a375 | 2958 | BUILDCXXFLAGS="$BUILDCXXFLAGS $CXXFLAGS" |
a1c22363 | 2959 | ]) |
b2f0a375 AJ |
2960 | AC_SUBST(BUILDCXXFLAGS) |
2961 | ||
90b412dd AJ |
2962 | AC_MSG_NOTICE([BUILD LIBRARIES: $LIBS]) |
2963 | AC_MSG_NOTICE([BUILD EXTRA LIBRARIES: $XTRA_LIBS]) | |
2964 | AC_MSG_NOTICE([BUILD OBJECTS: $OBJS]) | |
2965 | AC_MSG_NOTICE([BUILD EXTRA OBJECTS: $XTRA_OBJS]) | |
2966 | AC_MSG_NOTICE([BUILD C FLAGS: $CFLAGS]) | |
2967 | AC_MSG_NOTICE([BUILD EXTRA C FLAGS: $SQUID_CFLAGS]) | |
2968 | AC_MSG_NOTICE([BUILD C++ FLAGS: $CXXFLAGS]) | |
2969 | AC_MSG_NOTICE([BUILD EXTRA C++ FLAGS: $SQUID_CXXFLAGS]) | |
b2f0a375 | 2970 | AC_MSG_NOTICE([BUILD Tools C++ FLAGS: $BUILDCXXFLAGS]) |
daed6927 | 2971 | |
090089c4 | 2972 | dnl Clean up after OSF/1 core dump bug |
9603207d | 2973 | rm -f core |
090089c4 | 2974 | |
7a03447c AJ |
2975 | AC_CONFIG_FILES([ |
2976 | Makefile | |
2977 | compat/Makefile | |
7a03447c | 2978 | contrib/Makefile |
7a03447c AJ |
2979 | doc/Makefile |
2980 | doc/manuals/Makefile | |
86b8d400 | 2981 | doc/release-notes/Makefile |
6b99776c | 2982 | errors/Makefile |
6b99776c AJ |
2983 | icons/Makefile |
2984 | lib/Makefile | |
2985 | lib/libTrie/Makefile | |
2986 | lib/libTrie/test/Makefile | |
2987 | lib/ntlmauth/Makefile | |
6b99776c AJ |
2988 | lib/rfcnb/Makefile |
2989 | lib/smblib/Makefile | |
2990 | lib/snmplib/Makefile | |
b9ce9676 | 2991 | lib/sspi/Makefile |
6b99776c AJ |
2992 | scripts/Makefile |
2993 | src/Makefile | |
2994 | src/acl/Makefile | |
e046643f AJ |
2995 | src/acl/external/Makefile |
2996 | src/acl/external/AD_group/Makefile | |
2997 | src/acl/external/delayer/Makefile | |
2998 | src/acl/external/eDirectory_userip/Makefile | |
2999 | src/acl/external/file_userip/Makefile | |
3000 | src/acl/external/kerberos_ldap_group/Makefile | |
4a544c9d | 3001 | src/acl/external/kerberos_sid_group/Makefile |
e046643f AJ |
3002 | src/acl/external/LDAP_group/Makefile |
3003 | src/acl/external/LM_group/Makefile | |
3004 | src/acl/external/session/Makefile | |
3005 | src/acl/external/SQL_session/Makefile | |
3006 | src/acl/external/unix_group/Makefile | |
3007 | src/acl/external/wbinfo_group/Makefile | |
3008 | src/acl/external/time_quota/Makefile | |
6b99776c AJ |
3009 | src/adaptation/Makefile |
3010 | src/adaptation/icap/Makefile | |
3011 | src/adaptation/ecap/Makefile | |
3012 | src/anyp/Makefile | |
3013 | src/auth/Makefile | |
3014 | src/auth/basic/Makefile | |
03901cf8 AJ |
3015 | src/auth/basic/DB/Makefile |
3016 | src/auth/basic/fake/Makefile | |
3017 | src/auth/basic/getpwnam/Makefile | |
3018 | src/auth/basic/LDAP/Makefile | |
3019 | src/auth/basic/NCSA/Makefile | |
3020 | src/auth/basic/NIS/Makefile | |
3021 | src/auth/basic/PAM/Makefile | |
3022 | src/auth/basic/POP3/Makefile | |
3023 | src/auth/basic/RADIUS/Makefile | |
3024 | src/auth/basic/SASL/Makefile | |
3025 | src/auth/basic/SMB/Makefile | |
3026 | src/auth/basic/SMB_LM/Makefile | |
3027 | src/auth/basic/SSPI/Makefile | |
6b99776c | 3028 | src/auth/digest/Makefile |
d4d7f6dd AJ |
3029 | src/auth/digest/eDirectory/Makefile |
3030 | src/auth/digest/file/Makefile | |
3031 | src/auth/digest/LDAP/Makefile | |
6b99776c | 3032 | src/auth/negotiate/Makefile |
16c02b14 AJ |
3033 | src/auth/negotiate/kerberos/Makefile |
3034 | src/auth/negotiate/SSPI/Makefile | |
3035 | src/auth/negotiate/wrapper/Makefile | |
6b99776c | 3036 | src/auth/ntlm/Makefile |
b817c20f AJ |
3037 | src/auth/ntlm/fake/Makefile |
3038 | src/auth/ntlm/SMB_LM/Makefile | |
3039 | src/auth/ntlm/SSPI/Makefile | |
6b99776c AJ |
3040 | src/base/Makefile |
3041 | src/clients/Makefile | |
3042 | src/comm/Makefile | |
675b8408 | 3043 | src/debug/Makefile |
4a3b98d7 | 3044 | src/dns/Makefile |
13d8c08c | 3045 | src/DiskIO/Makefile |
d9691f09 AJ |
3046 | src/DiskIO/AIO/Makefile |
3047 | src/DiskIO/Blocking/Makefile | |
3048 | src/DiskIO/DiskDaemon/Makefile | |
3049 | src/DiskIO/DiskThreads/Makefile | |
3050 | src/DiskIO/IpcIo/Makefile | |
3051 | src/DiskIO/Mmapped/Makefile | |
83b053a0 | 3052 | src/error/Makefile |
6b99776c AJ |
3053 | src/esi/Makefile |
3054 | src/eui/Makefile | |
3055 | src/format/Makefile | |
3056 | src/fs/Makefile | |
3057 | src/ftp/Makefile | |
3058 | src/helper/Makefile | |
1d0bc8ee | 3059 | src/html/Makefile |
6b99776c AJ |
3060 | src/http/Makefile |
3061 | src/http/one/Makefile | |
d6d6203a AJ |
3062 | src/http/url_rewriters/Makefile |
3063 | src/http/url_rewriters/fake/Makefile | |
3064 | src/http/url_rewriters/LFS/Makefile | |
6b99776c AJ |
3065 | src/icmp/Makefile |
3066 | src/ident/Makefile | |
3067 | src/ip/Makefile | |
3068 | src/ipc/Makefile | |
3069 | src/log/Makefile | |
4d5dd85a AJ |
3070 | src/log/DB/Makefile |
3071 | src/log/file/Makefile | |
6b99776c AJ |
3072 | src/mem/Makefile |
3073 | src/mgr/Makefile | |
3074 | src/parser/Makefile | |
36c774f7 | 3075 | src/proxyp/Makefile |
6b99776c | 3076 | src/repl/Makefile |
65e41a45 | 3077 | src/sbuf/Makefile |
7dcca85b | 3078 | src/security/Makefile |
cb0b3d63 AJ |
3079 | src/security/cert_generators/Makefile |
3080 | src/security/cert_generators/file/Makefile | |
bbf79f12 AJ |
3081 | src/security/cert_validators/Makefile |
3082 | src/security/cert_validators/fake/Makefile | |
6b99776c AJ |
3083 | src/servers/Makefile |
3084 | src/snmp/Makefile | |
3085 | src/ssl/Makefile | |
2745fea5 | 3086 | src/store/Makefile |
0c1f8b9b AJ |
3087 | src/store/id_rewriters/Makefile |
3088 | src/store/id_rewriters/file/Makefile | |
98cacedb | 3089 | src/time/Makefile |
6b99776c | 3090 | test-suite/Makefile |
94ab55b0 | 3091 | tools/Makefile |
3d276e1d | 3092 | tools/apparmor/Makefile |
33d1abfe | 3093 | tools/helper-mux/Makefile |
2ccf2eb2 | 3094 | tools/purge/Makefile |
422cb5da | 3095 | tools/systemd/Makefile |
a35a0ac7 | 3096 | tools/sysvinit/Makefile |
53cbe3e4 | 3097 | ]) |
43ae1d95 | 3098 | |
3e7b6055 | 3099 | # must configure libltdl subdir unconditionally for "make distcheck" to work |
081863f3 | 3100 | #AC_CONFIG_SUBDIRS(libltdl) |
3e7b6055 | 3101 | |
6a9f6389 | 3102 | AC_OUTPUT |