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