]> git.ipfire.org Git - thirdparty/squid.git/blame - configure.in
Added .cvsignore
[thirdparty/squid.git] / configure.in
CommitLineData
1b3db6d9 1
2877b8a9 2dnl Configuration input file for Squid
090089c4 3dnl
983061ed 4dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
090089c4 5dnl
8b5e106b 6dnl $Id: configure.in,v 1.416 2006/05/27 00:58:15 hno Exp $
090089c4 7dnl
8dnl
090089c4 9dnl
25b6a907 10AC_INIT(squid, 3.0-PRE3-CVS)
856e69c5 11AC_PREREQ(2.52)
e6ccf245 12AC_CONFIG_SRCDIR([src/main.cc])
71b12d7c 13AC_CONFIG_AUX_DIR(cfgaux)
25b6a907 14AM_INIT_AUTOMAKE([tar-ustar])
a2794549 15AM_CONFIG_HEADER(include/autoconf.h)
8b5e106b 16AC_REVISION($Revision: 1.416 $)dnl
a2794549 17AC_PREFIX_DEFAULT(/usr/local/squid)
246d7ffc 18AM_MAINTAINER_MODE
a2794549 19
20dnl Set default LDFLAGS
21if test -z "$LDFLAGS"; then
22 LDFLAGS="-g"
23fi
24
25PRESET_CFLAGS="$CFLAGS"
090089c4 26
a2794549 27dnl Check for GNU cc
28AC_PROG_CC
e6c4cdd6 29AM_PROG_CC_C_O
c4b0db82 30AC_LANG_C
29b8d8d6 31AC_PROG_CXX
88d50a22 32AC_CANONICAL_HOST
645aa936 33AC_DISABLE_SHARED
34AC_PROG_LIBTOOL
f5691f9c 35AC_LTDL_DLLIB
645aa936 36AC_PROG_RANLIB
88d50a22 37
a2794549 38
26675bf4 39CRYPTLIB=''
00fa2c12 40REGEXLIB='' # -lregex
41LIBREGEX='' # libregex.a
090089c4 42
a2794549 43dnl find out the exe extension for this platform. If it's not empty, use it for CGI's as well.
44AC_EXEEXT
45AC_OBJEXT
46
47if test -z "$EXEEXT"; then
48 CGIEXT=".cgi"
49else
7aeb8001 50 # automake automatically adds .exe when installing binaries
51 CGIEXT=""
a2794549 52fi
7aeb8001 53AC_SUBST(CGIEXT)
a2794549 54
0e6d05ef 55dnl this should be expanded to a list of platform sensible support requirements.
56dnl (adding an option like --enable-cygwin-support doesn't make sense :]) - R Collins 2001
df087e68 57case "$host_os" in
4b26fae9 58mingw|mingw32|cygwin|cygwin32)
a2794549 59 AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, true)
df087e68 60 ;;
61*)
a2794549 62 AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, false)
df087e68 63 ;;
64esac
df087e68 65
4b26fae9 66case "$host_os" in
67mingw|mingw32)
68 AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
69 CFLAGS="$CFLAGS -mthreads"
70 CXXFLAGS="$CXXFLAGS -mthreads"
71 if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
72 echo "PSAPI.DLL is recommended to run Squid on Windows NT Platform"
73 echo "Please see PSAPI.DLL section on doc/win32-relnotes.html."
74 else
75 AC_DEFINE(HAVE_WIN32_PSAPI,1,[Define if you have PSAPI.DLL on Windows systems])
76 LIBS="$LIBS -lpsapi"
77 fi
790ebe36 78 MINGW_LIBS="-lmingwex"
79 AC_SUBST(MINGW_LIBS)
4b26fae9 80 ;;
81esac
82
a26bdc75 83if test -z "$CACHE_HTTP_PORT"; then
84 CACHE_HTTP_PORT="3128"
85fi
86if test -z "$CACHE_ICP_PORT"; then
87 CACHE_ICP_PORT="3130"
88fi
a26bdc75 89
f4aaf39c 90dnl Substitutions
6a9f6389 91AC_DEFINE_UNQUOTED(CACHE_HTTP_PORT, $CACHE_HTTP_PORT,
92[What default TCP port to use for HTTP listening?])
58c1507a 93AC_SUBST(CACHE_HTTP_PORT)
6a9f6389 94AC_DEFINE_UNQUOTED(CACHE_ICP_PORT, $CACHE_ICP_PORT,
58c1507a 95AC_SUBST(CACHE_ICP_PORT)
6a9f6389 96[What default UDP port to use for ICP listening?])
090089c4 97
6a9f6389 98AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host",[Host type from configure])
30a4f2a8 99
6a9f6389 100AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args", [configure command line used to configure Squid])
090089c4 101
6ad85e8a 102dnl Gerben Wierda <Gerben_Wierda@RnA.nl>
103case "$host" in
104 mab-next-nextstep3)
105 CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
106 ;;
107esac
108
4c43504f 109if test "$GCC" = "yes"; then
110 GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
111 GCCVER2=`echo $GCCVER | awk '{print $1 * 100}'`
112 case "$host" in
113 i386-*-freebsd*)
114 if test $GCCVER2 -lt 300 ; then
115 echo "ERROR: GCC $GCCVER causes a coredump on $host"
116 echo "ERROR: Try a more recent GCC version"
dd81cb63 117 sleep 5
4c43504f 118 fi
119 ;;
120 esac
121 unset GCCVER
122 unset GCCVER2
123fi
124
30a4f2a8 125dnl Set Default CFLAGS
126if test -z "$PRESET_CFLAGS"; then
127 if test "$GCC" = "yes"; then
128 case "$host" in
97b12a5b 129 *-sun-sunos*)
30a4f2a8 130 # sunos has too many warnings for this to be useful
131 # motorola too
132 ;;
97b12a5b 133 *m88k*)
134 # Motorola cc/ld does not like -02 but is ok on -O
135 CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
136 ;;
30a4f2a8 137 *)
138 CFLAGS="$CFLAGS -Wall"
139 ;;
140 esac
81a820c6 141 else
142 case "$host" in
c415c128 143 *mips-sgi-irix6.*)
81a820c6 144 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
c415c128 145 CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
58dc050d 146 -woff 1009,1014,1110,1116,1185,1188,1204,1230,1233 \
81a820c6 147 -Wl,-woff,85,-woff,84,-woff,134 \
148 -nostdinc -I/usr/include -D_BSD_SIGNALS"
149 ;;
e8f5fb18 150 alpha-dec-osf4.*)
553c24ae 151 # Mogul says DEC compilers take both -g and -O2
b6a2f15e 152 CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
553c24ae 153 CFLAGS="$CFLAGS -O2"
154 ;;
81a820c6 155 *)
156 ;;
157 esac
30a4f2a8 158 fi
30a4f2a8 159fi
160
d2e3605e 161dnl set squid required flags
162if test "$GCC" = "yes"; then
163 SQUID_CFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
495b968e 164 SQUID_CXXFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments"
d2e3605e 165else
166 SQUID_CFLAGS=
167 SQUID_CXXFLAGS=
168fi
169AC_SUBST(SQUID_CFLAGS)
170AC_SUBST(SQUID_CXXFLAGS)
171
d7c59e37 172AC_TEST_CHECKFORHUGEOBJECTS
173SQUID_CXXFLAGS="$SQUID_CXXFLAGS $HUGE_OBJECT_FLAG"
174
30a4f2a8 175dnl Set LDFLAGS
176if test -z "$PRESET_LDFLAGS"; then
177 if test "$GCC" = "yes"; then
178 case "$host" in
179 *)
180 # nothing
181 ;;
182 esac
81a820c6 183 else
184 case "$host" in
c415c128 185 *mips-sgi-irix6.*)
81a820c6 186 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
c415c128 187 LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
81a820c6 188 ;;
189 esac
30a4f2a8 190 fi
191fi
2060fa9a 192
e5f4e1b0 193dnl Enable optional modules
194AC_ARG_ENABLE(dlmalloc,
94d48591 195[ --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea],
e5f4e1b0 196[
94d48591 197 case "$enableval" in
198 'yes')
029ce4ae 199 use_dlmalloc="yes"
94d48591 200 LIBDLMALLOC="libdlmalloc.a"
201 LIB_MALLOC="-L../lib -ldlmalloc"
029ce4ae 202 echo "dlmalloc enabled"
94d48591 203 ;;
204 'no')
029ce4ae 205 use_dlmalloc="no"
206 echo "dlmalloc disabled"
94d48591 207 ;;
029ce4ae 208 *) use_dlmalloc="yes"
209 LIB_MALLOC="$enableval"
210 echo "dlmalloc enabled with $LIB_MALLOC"
211 esac
212])
213if test "${use_dlmalloc-unset}" = unset; then
214 case "$host" in
215 i386-*-solaris2.*)
216 echo "Enabling dlmalloc for $host"
217 use_dlmalloc="yes"
d20b1cd0 218 LIBDLMALLOC="libdlmalloc.a"
219 LIB_MALLOC="-L../lib -ldlmalloc"
029ce4ae 220 ;;
e8dbaa90 221 *-sgi-irix*)
222 echo "Enabling dlmalloc for $host"
223 use_dlmalloc="yes"
224 LIBDLMALLOC="libdlmalloc.a"
225 LIB_MALLOC="-L../lib -ldlmalloc"
226 ;;
029ce4ae 227 esac
228fi
229if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
230 # Ok. dlmalloc was enabled before, but state may be changed.
231 # we have to test these again
232 unset ac_cv_func_mallinfo
233 unset ac_cv_func_mallocblksize
234 unset ac_cv_func_free
235 unset ac_cv_func_realloc
236 unset ac_cv_func_memalign
237 unset ac_cv_func_valloc
238 unset ac_cv_func_pvalloc
239 unset ac_cv_func_calloc
240 unset ac_cv_func_cfree
241 unset ac_cv_func_malloc_trim
242 unset ac_cv_func_malloc_usable_size
243 unset ac_cv_func_malloc_stats
244 unset ac_cv_func_mallinfo
245 unset ac_cv_func_mallopt
246 unset ac_cv_lib_gnumalloc
247 unset ac_cv_header_gnumalloc_h
248 unset ac_cv_lib_malloc
249 unset ac_cv_enabled_dlmalloc
250fi
251if test "$use_dlmalloc" = yes; then
94d48591 252 ac_cv_func_mallinfo="yes"
253 ac_cv_func_mallocblksize="no"
254 ac_cv_func_free="yes"
255 ac_cv_func_realloc="yes"
256 ac_cv_func_memalign="yes"
257 ac_cv_func_valloc="yes"
258 ac_cv_func_pvalloc="yes"
259 ac_cv_func_calloc="yes"
260 ac_cv_func_cfree="yes"
261 ac_cv_func_malloc_trim="yes"
262 ac_cv_func_malloc_usable_size="yes"
263 ac_cv_func_malloc_stats="yes"
94d48591 264 ac_cv_func_mallopt="yes"
265 ac_cv_lib_gnumalloc="no"
85efe3ec 266 ac_cv_header_gnumalloc_h="no"
94d48591 267 ac_cv_lib_malloc="no"
268 ac_cv_enabled_dlmalloc="yes"
6a9f6389 269 AC_DEFINE(USE_DLMALLOC, 1, [Compile & use the malloc package by Doug Lea])
029ce4ae 270fi
271
e5f4e1b0 272AC_SUBST(LIBDLMALLOC)
273AC_SUBST(LIB_MALLOC)
274
275AC_ARG_ENABLE(gnuregex,
2c5d82f9 276[ --enable-gnuregex Compile GNUregex. Unless you have reason to use this
2df6213e 277 option, you should not enable it. This library file
278 is usually only required on Windows and very old
279 Unix boxes which do not have their own regex library
280 built in.],
e5f4e1b0 281[USE_GNUREGEX=$enableval])
282
6c0c04db 283SquidInline="yes"
83079644 284
285AC_ARG_ENABLE(optimizations,
286[ --disable-optimizations Don't compile Squid with compiler optimizations enabled.
2df6213e 287 Optimization is good for production builds, but not
288 good for debugging. During development, use
289 --disable-optimizations to reduce compilation times
290 and allow easier debugging. This option implicitly
291 also enabled --disable-inline],
83079644 292[ if test "$enableval" = "no" ; then
293 echo "Disabling compiler optimizations (-O flag)"
294 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
295 CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`"
296 SquidInline="no"
297 fi
298])
299
6c0c04db 300AC_ARG_ENABLE(inline,
301[ --disable-inline Don't compile trivial methods as inline. Squid
2df6213e 302 is coded with much of the code able to be inlined.
303 Inlining is good for production builds, but not
304 good for development. During development, use
305 --disable-inline to reduce compilation times and
306 allow incremental builds to be quick. For
307 production builds, or load tests, use
308 --enable-inline to have squid make all trivial
309 methods inlinable by the compiler.],
6c0c04db 310[ if test "$enableval" = "no" ; then
311 SquidInline="no"
312 fi
313])
314
315if test "$SquidInline" = "yes" ; then
316 AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods])
317 AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file])
318else
83079644 319 echo "Inlining optimization disabled"
6c0c04db 320 AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
321fi
322
fa80a8ef 323AC_ARG_ENABLE(debug-cbdata,
324[ --enable-debug-cbdata Provide some debug information in cbdata],
325[ if test "$enableval" = "yes" ; then
326 echo "cbdata debugging enabled"
6a9f6389 327 AC_DEFINE(CBDATA_DEBUG,1,[Enable for cbdata debug information])
fa80a8ef 328 fi
329])
330
0961c811 331dnl This is a developer only option.. developers know how to set defines
332dnl
333dnl AC_ARG_ENABLE(xmalloc-debug,
334dnl [ --enable-xmalloc-debug Do some simple malloc debugging],
335dnl [ if test "$enableval" = "yes" ; then
336dnl echo "Malloc debugging enabled"
6a9f6389 337dnl AC_DEFINE(XMALLOC_DEBUG,1,[Define to do simple malloc debugging])
0961c811 338dnl fi
339dnl ])
340
341dnl This is a developer only option.. developers know how to set defines
342dnl
343dnl AC_ARG_ENABLE(xmalloc-debug-trace,
344dnl [ --enable-xmalloc-debug-trace
345dnl Detailed trace of memory allocations],
346dnl [ if test "$enableval" = "yes" ; then
347dnl echo "Malloc debug trace enabled"
6a9f6389 348dnl AC_DEFINE(XMALLOC_TRACE,1,[Define to have a detailed trace of memory allocations])
349dnl AC_DEFINE(XMALLOC_DEBUG,1)
0961c811 350dnl fi
351dnl ])
e5f4e1b0 352
d9180414 353AC_ARG_ENABLE(xmalloc-statistics,
e5f4e1b0 354[ --enable-xmalloc-statistics
355 Show malloc statistics in status page],
356[ if test "$enableval" = "yes" ; then
357 echo "Malloc statistics enabled"
6a9f6389 358 AC_DEFINE(XMALLOC_STATISTICS,1,[Define to have malloc statistics])
e5f4e1b0 359 fi
360])
361
14b32873 362use_carp=1
323fe0d4 363AC_ARG_ENABLE(carp,
f7c8dc02 364[ --disable-carp Disable CARP support],
365[ if test "$enableval" = "no" ; then
366 echo "CARP disabled"
14b32873 367 use_carp=0
323fe0d4 368 fi
f7c8dc02 369])
14b32873 370if test $use_carp = 1; then
371 AC_DEFINE(USE_CARP, 1, [Cache Array Routing Protocol])
14b32873 372fi
323fe0d4 373
cd748f27 374AC_ARG_ENABLE(async-io,
9bc73deb 375[ --enable-async-io[=N_THREADS]
cd748f27 376 Shorthand for
f85c88f3 377 --with-aufs-threads=N_THREADS
cd748f27 378 --with-pthreads
379 --enable-storeio=ufs,aufs],
380[ case $enableval in
9bc73deb 381 yes)
69144041 382 with_pthreads="yes"
cd748f27 383 STORE_MODULES="ufs aufs"
9bc73deb 384 ;;
385 no)
9bc73deb 386 ;;
387 *)
f85c88f3 388 aufs_io_threads=$enableval
69144041 389 with_pthreads="yes"
cd748f27 390 STORE_MODULES="ufs aufs"
9bc73deb 391 ;;
392 esac
393])
394
f85c88f3 395AC_ARG_WITH(aufs-threads,
396[ --with-aufs-threads=N_THREADS
cd748f27 397 Tune the number of worker threads for the aufs object
398 store.],
a3310b77 399[ case $withval in
400 [[0-9]]*)
401 aufs_io_threads=$withval
402 ;;
403 *)
404 echo "ERROR: Invalid --with-aufs-threads argument"
405 exit 1
406 ;;
407 esac
408])
f85c88f3 409if test "$aufs_io_threads"; then
410 echo "With $aufs_io_threads aufs threads"
6a9f6389 411 AC_DEFINE_UNQUOTED(AUFS_IO_THREADS,$aufs_io_threads,
412 [Defines how many threads aufs uses for I/O])
cd748f27 413fi
414
415AC_ARG_WITH(pthreads,
8154dd82 416[ --with-pthreads Use POSIX Threads])
417if test "$with_pthreads" = "yes"; then
cd748f27 418 echo "With pthreads"
9bc73deb 419fi
e5f4e1b0 420
f85c88f3 421AC_ARG_WITH(aio,
8154dd82 422[ --with-aio Use POSIX AIO])
423if test "$with_aio" = "yes"; then
f85c88f3 424 echo "With aio"
f85c88f3 425fi
8154dd82 426
427AC_ARG_WITH(dl,
428[ --with-dl Use dynamic linking])
429if test "$with_dl" = "yes"; then
430 echo "With dl"
431fi
f85c88f3 432
cd748f27 433AC_ARG_ENABLE(storeio,
434[ --enable-storeio=\"list of modules\"
435 Build support for the list of store I/O modules.
436 The default is only to build the "ufs" module.
437 See src/fs for a list of available modules, or
438 Programmers Guide section <not yet written>
439 for details on how to build your custom store module],
440[ case $enableval in
441 yes)
1c690e30 442 for dir in $srcdir/src/fs/*; do
443 module="`basename $dir`"
444 if test -d "$dir" && test "$module" != CVS; then
445 STORE_MODULES="$STORE_MODULES $module"
8154dd82 446 fi
cd748f27 447 done
448 ;;
449 no)
450 ;;
1c690e30 451 *)
452 STORE_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
cd748f27 453 ;;
454 esac
455],
456[ if test -z "$STORE_MODULES"; then
457 STORE_MODULES="ufs"
458 fi
459])
1c690e30 460if test -n "$STORE_MODULES"; then
461 for module in $STORE_MODULES; do
462 if test -d $srcdir/src/fs/$module; then
463 :
464 else
465 echo "ERROR: storeio $module does not exists"
466 exit 1
467 fi
468 done
469 echo "Store modules built: $STORE_MODULES"
59b2d47f 470 STORE_LINKOBJS=
471 for module in $STORE_MODULES; do
472 STORE_LINKOBJS="$STORE_LINKOBJS fs/${module}/StoreFS${module}.o"
473 done
1c690e30 474fi
a2794549 475dnl remove all but diskd - its the only module that needs to recurse
476dnl into the sub directory
d3b3ab85 477UFS_FOUND=
1c690e30 478NEED_UFS=
b9ae18aa 479NEED_BLOCKING=
480NEED_DISKDAEMON=
481NEED_DISKTHREADS=
482NEED_AIO=
082a5e7a 483STORE_TESTS=
a2794549 484for fs in $STORE_MODULES none; do
8154dd82 485 case "$fs" in
486 diskd)
1c690e30 487 NEED_UFS="true"
b9ae18aa 488 NEED_BLOCKING="true"
489 NEED_DISKDAEMON="true"
8154dd82 490 ;;
491 aufs)
1c690e30 492 NEED_UFS="true"
b9ae18aa 493 NEED_BLOCKING="true"
494 NEED_DISKTHREADS="true"
8154dd82 495 ;;
496 coss)
082a5e7a 497 NEED_AIO="true"
3256ae73 498 dnl
499 dnl Automake om MinGW needs explicit exe extension
500 dnl for STORE_TESTS substition
501 dnl
082a5e7a 502 STORE_TESTS="$STORE_TESTS tests/testCoss$EXEEXT"
503 ;;
504 null)
505 STORE_TESTS="$STORE_TESTS tests/testNull$EXEEXT"
8154dd82 506 ;;
d3b3ab85 507 ufs)
082a5e7a 508 UFS_FOUND="true"
509 STORE_TESTS="$STORE_TESTS tests/testUfs$EXEEXT"
8154dd82 510 esac
a2794549 511done
b9ae18aa 512STORE_OBJS=
513STORE_LIBS=
514dnl We have 'fake' modules - aufs and diskd - legacy.
515for fs in $STORE_MODULES; do
516 case "$fs" in
517 diskd);;
518 aufs);;
519 *)
520 STORE_OBJS="$STORE_OBJS fs/lib${fs}.a"
521 STORE_LIBS="$STORE_LIBS lib${fs}.a"
522 ;;
523 esac
524done
d3b3ab85 525
1c690e30 526if test -z "$UFS_FOUND" && test -n "$NEED_UFS"; then
3256ae73 527 echo "adding UFS, as it contains core logic for diskd and aufs"
528 STORE_OBJS="$STORE_OBJS fs/libufs.a"
529 STORE_LIBS="$STORE_LIBS libufs.a"
530 STORE_MODULES="$STORE_MODULES ufs"
531 STORE_LINKOBJS="$STORE_LINKOBJS fs/ufs/StoreFSufs.o"
532 dnl
533 dnl Automake om MinGW needs explicit exe extension
534 dnl for STORE_TESTS substition
535 dnl
536 STORE_TESTS="$STORE_TESTS tests/testUfs$EXEEXT"
d3b3ab85 537fi
538
1c690e30 539AC_SUBST(STORE_OBJS)
540AC_SUBST(STORE_LIBS)
59b2d47f 541AC_SUBST(STORE_LINKOBJS)
082a5e7a 542AC_SUBST(STORE_TESTS)
a2794549 543
b9ae18aa 544AC_ARG_ENABLE(disk-io,
545[ --enable-disk-io=\"list of modules\"
546 Build support for the list of disk I/O modules.
547 The default is only to build the "Blocking" module.
548 See src/DiskIO for a list of available modules, or
549 Programmers Guide section <not yet written>
550 for details on how to build your custom disk module],
551[ case $enableval in
552 yes)
553 for dir in $srcdir/src/DiskIO/*; do
554 module="`basename $dir`"
555 if test -d "$dir" && test "$module" != CVS; then
556 DISK_MODULES="$DISK_MODULES $module"
557 fi
558 done
559 ;;
560 no)
561 ;;
562 *)
563 DISK_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
564 ;;
565 esac
566],
567[ if test -z "$DISK_MODULES"; then
568 DISK_MODULES="Blocking"
569 fi
570])
571if test -n "$DISK_MODULES"; then
572 for module in $DISK_MODULES; do
573 if test -d $srcdir/src/DiskIO/$module; then
574 :
575 else
576 echo "ERROR: disk-io $module does not exists"
577 exit 1
578 fi
579 done
580 DISK_LIBS="lib`echo $DISK_MODULES|sed -e 's% %.a lib%g'`.a"
581 DISK_LINKOBJS=
582 for module in $DISK_MODULES; do
583 DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/${module}/${module}DiskIOModule.o"
584 done
585fi
586for fs in $DISK_MODULES none; do
587 case "$fs" in
588 DiskDaemon)
589 DISK_PROGRAMS="$DISK_PROGRAMS DiskIO/DiskDaemon/diskd"
590 FOUND_DISKDAEMON="true"
591 ;;
592 DiskThreads)
593 FOUND_DISKTHREADS="true"
594 ;;
595 AIO)
596 FOUND_AIO="true"
597 ;;
598 Blocking)
599 FOUND_BLOCKING="true"
600 esac
601done
602
603if test -z "$FOUND_BLOCKING" && test -n "$NEED_BLOCKING"; then
604 echo "adding Blocking, as it is used by an active, legacy Store Module"
605 DISK_LIBS="$DISK_LIBS libBlocking.a"
606 DISK_MODULES="$DISK_MODULES Blocking"
607 DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/Blocking/BlockingDiskIOModule.o"
608fi
609
610if test -z "$FOUND_DISKDAEMON" && test -n "$NEED_DISKDAEMON"; then
611 echo "adding DiskDaemon, as it is used by an active, legacy Store Module"
612 DISK_LIBS="$DISK_LIBS libDiskDaemon.a"
613 DISK_MODULES="$DISK_MODULES DiskDaemon"
614 DISK_PROGRAMS="$DISK_PROGRAMS DiskIO/DiskDaemon/diskd"
615 DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskDaemon/DiskDaemonDiskIOModule.o"
616fi
617
618if test -z "$FOUND_DISKTHREADS" && test -n "$NEED_DISKTHREADS"; then
619 echo "adding DiskThreads, as it is used by an active, legacy Store Module"
620 DISK_LIBS="$DISK_LIBS libDiskThreads.a"
621 DISK_MODULES="$DISK_MODULES DiskThreads"
622 DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/DiskThreads/DiskThreadsDiskIOModule.o"
623fi
624if test -z "$FOUND_AIO" && test -n "$NEED_AIO"; then
625 echo "adding AIO, as it is used by an active, legacy Store Module"
626 DISK_LIBS="$DISK_LIBS libAIO.a"
627 DISK_MODULES="$DISK_MODULES AIO"
628 DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/AIO/AIODiskIOModule.o"
629fi
630echo "IO Modules built: $DISK_MODULES"
631dnl we know what is being built. now add dependencies.
632for fs in $DISK_MODULES none; do
633 case "$fs" in
634 DiskThreads)
635 if test -z "$with_pthreads"; then
636 echo "DiskThreads IO Module used, pthreads support automatically enabled"
637 with_pthreads=yes
638 fi
639 ;;
640 AIO)
641 if test -z "$with_aio"; then
642 echo "Aio IO Module used, aio support automatically enabled"
643 with_aio=yes
644 fi
645 ;;
646 esac
647done
648
649AC_SUBST(DISK_LIBS)
650AC_SUBST(DISK_PROGRAMS)
651AC_SUBST(DISK_LINKOBJS)
652
d9180414 653AC_ARG_ENABLE(removal-policies,
6a566b9c 654[ --enable-removal-policies=\"list of policies\"
655 Build support for the list of removal policies.
656 The default is only to build the "lru" module.
657 See src/repl for a list of available modules, or
658 Programmers Guide section 9.9 for details on how
659 to build your custom policy],
660[ case $enableval in
661 yes)
1c690e30 662 for dir in $srcdir/src/repl/*; do
663 module="`basename $dir`"
664 if test -d "$dir" && test "$module" != CVS; then
665 REPL_POLICIES="$REPL_POLICIES $module"
6a566b9c 666 fi
667 done
668 ;;
669 no)
670 ;;
1c690e30 671 *)
672 REPL_POLICIES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
6a566b9c 673 ;;
674 esac
675],
676[ if test -z "$REPL_POLICIES"; then
677 REPL_POLICIES="lru"
678 fi
679])
1c690e30 680if test -n "$REPL_POLICIES"; then
681 for module in $REPL_POLICIES; do
682 if test -d $srcdir/src/repl/$module; then
683 :
684 else
685 echo "ERROR: Removal policy $module does not exists"
686 exit 1
687 fi
688 done
689 echo "Removal policies built: $REPL_POLICIES"
690 REPL_OBJS="repl/lib`echo $REPL_POLICIES|sed -e 's% %.a repl/lib%g'`.a"
691 REPL_LIBS="`echo $REPL_OBJS|sed -e 's%repl/%%g'`"
692fi
6a566b9c 693AC_SUBST(REPL_POLICIES)
6a566b9c 694AC_SUBST(REPL_OBJS)
f71946fc 695AC_SUBST(REPL_LIBS)
6a566b9c 696
d1da2d1f 697AM_CONDITIONAL(ENABLE_PINGER, false)
e5f4e1b0 698AC_ARG_ENABLE(icmp,
699[ --enable-icmp Enable ICMP pinging],
700[ if test "$enableval" = "yes" ; then
701 echo "ICMP enabled"
6a9f6389 702 AC_DEFINE(USE_ICMP,1,
703 [If you want to use Squid's ICMP features (highly recommended!) then
704 define this. When USE_ICMP is defined, Squid will send ICMP pings
705 to origin server sites. This information is used in numerous ways:
706 - Sent in ICP replies so neighbor caches know how close
707 you are to the source.
708 - For finding the closest instance of a URN.
709 - With the 'test_reachability' option. Squid will return
710 ICP_OP_MISS_NOFETCH for sites which it cannot ping.])
d1da2d1f 711 AM_CONDITIONAL(ENABLE_PINGER, true)
e5f4e1b0 712 fi
713])
714
a2794549 715AM_CONDITIONAL(USE_DELAY_POOLS, false)
d9180414 716AC_ARG_ENABLE(delay-pools,
76d83c52 717[ --enable-delay-pools Enable delay pools to limit bandwidth usage],
e5f4e1b0 718[ if test "$enableval" = "yes" ; then
95e36d02 719 echo "Delay pools enabled"
6a9f6389 720 AC_DEFINE([DELAY_POOLS],1,[Traffic management via "delay pools".])
721 AM_CONDITIONAL(USE_DELAY_POOLS, true,)
e5f4e1b0 722 fi
723])
724
43ae1d95 725AM_CONDITIONAL(USE_ESI, false)
726AC_ARG_ENABLE(esi,
727 AC_HELP_STRING([--enable-esi],[Enable ESI for accelerators. Requires libexpat. Enabling ESI will cause squid to follow the Edge Acceleration Specification (www.esi.org). This causes squid to IGNORE client Cache-Control headers. DO NOT use this in a squid configured as a web proxy, ONLY use it in a squid configured for webserver acceleration.]),
728 ac_cv_use_esi=$enableval, ac_cv_use_esi=no)
729AC_CACHE_CHECK(whether to enable ESI,ac_cv_use_esi, ac_cv_use_esi=no)
730if test "$ac_cv_use_esi" = "yes" ; then
731 AC_DEFINE(ESI,1,[Compile the ESI processor and Surrogate header support])
732 AM_CONDITIONAL(USE_ESI, true)
964b44c3 733 XTRA_LIBS="$XTRA_LIBS -lexpat -lxml2"
a787b56a 734else
735 AC_DEFINE(ESI,0,[Compile the ESI processor and Surrogate header support])
43ae1d95 736fi
737
51952383 738AM_CONDITIONAL(USE_ICAP_CLIENT, false)
739AC_ARG_ENABLE(icap-client,
740 AC_HELP_STRING([--enable-icap-client],[Enable the ICAP client.]),
741 ac_cv_use_icap_client=$enableval, ac_cv_use_icap_client=no)
742AC_CACHE_CHECK(whether to enable the ICAP client,ac_cv_use_icap_client, ac_cv_use_icap_client=no)
743if test "$ac_cv_use_icap_client" = "yes" ; then
744 AC_DEFINE(ICAP_CLIENT,1,[Enable ICAP client features in Squid])
745 AM_CONDITIONAL(USE_ICAP_CLIENT, true)
c21ad0f5 746 ICAP_LIBS="ICAP/libicap.a"
51952383 747else
748 AC_DEFINE(ICAP_CLIENT,0,[Enable ICAP client features in Squid])
c21ad0f5 749 ICAP_LIBS=""
51952383 750fi
c21ad0f5 751AC_SUBST(ICAP_LIBS)
51952383 752
0961c811 753dnl This is a developer only option. Developers know how to set defines
754dnl
755dnl AC_ARG_ENABLE(mem-gen-trace,
756dnl [ --enable-mem-gen-trace Do trace of memory stuff],
757dnl [ if test "$enableval" = "yes" ; then
758dnl echo "Memory trace (to file) enabled"
6a9f6389 759dnl AC_DEFINE(MEM_GEN_TRACE,1,[Define for log file trace of mem alloc/free])
0961c811 760dnl fi
761dnl ])
36a97e19 762
d9180414 763AC_ARG_ENABLE(useragent-log,
e5f4e1b0 764[ --enable-useragent-log Enable logging of User-Agent header],
765[ if test "$enableval" = "yes" ; then
766 echo "User-Agent logging enabled"
6a9f6389 767 AC_DEFINE(USE_USERAGENT_LOG,1,[If you want to log User-Agent request header values, define this.
768 By default, they are written to useragent.log in the Squid log
769 directory.])
e5f4e1b0 770 fi
771])
772
dfca7e1a 773AC_ARG_ENABLE(referer-log,
0961c811 774[ --enable-referer-log Enable logging of Referer header],
dfca7e1a 775[ if test "$enableval" = "yes" ; then
776 echo "Referer logging enabled"
6a9f6389 777 AC_DEFINE(USE_REFERER_LOG,1,[If you want to log Referer request header values, define this.
778 By default, they are written to referer.log in the Squid log
779 directory.])
dfca7e1a 780 fi
781])
782
14b32873 783use_wccp=1
320e9f36 784AC_ARG_ENABLE(wccp,
0961c811 785[ --disable-wccp Disable Web Cache Coordination Protocol],
eb824054 786[ if test "$enableval" = "no" ; then
787 echo "Web Cache Coordination Protocol disabled"
14b32873 788 use_wccp=0
320e9f36 789 fi
790])
14b32873 791if test $use_wccp = 1; then
792 AC_DEFINE(USE_WCCP, 1,[Define to enable WCCP])
793else
794 AC_DEFINE(USE_WCCP, 0)
795fi
320e9f36 796
d9180414 797AC_ARG_ENABLE(kill-parent-hack,
9fc0b4b8 798[ --enable-kill-parent-hack
799 Kill parent on shutdown],
e5f4e1b0 800[ if test "$enableval" = "yes" ; then
801 echo "Kill parent on shutdown"
6a9f6389 802 AC_DEFINE(KILL_PARENT_OPT,1,[A dangerous feature which causes Squid to kill its parent process
803 (presumably the RunCache script) upon receipt of SIGTERM or SIGINT.
804 Use with caution.])
e5f4e1b0 805 fi
806])
807
a2794549 808AM_CONDITIONAL(USE_SNMP, false)
e5f4e1b0 809AC_ARG_ENABLE(snmp,
810[ --enable-snmp Enable SNMP monitoring],
811[ if test "$enableval" = "yes" ; then
812 echo "SNMP monitoring enabled"
6a9f6389 813 AC_DEFINE(SQUID_SNMP,1,[Define to enable SNMP monitoring of Squid])
e5f4e1b0 814 SNMPLIB='-L../snmplib -lsnmp'
a2794549 815 AM_CONDITIONAL(USE_SNMP, true)
8a7f0105 816 SNMP_MAKEFILE=./snmplib/Makefile
e5f4e1b0 817 makesnmplib=snmplib
818 fi
819])
820AC_SUBST(SNMPLIB)
e5f4e1b0 821AC_SUBST(makesnmplib)
822
d9180414 823AC_ARG_ENABLE(cachemgr-hostname,
e5f4e1b0 824[ --enable-cachemgr-hostname[=hostname]
825 Make cachemgr.cgi default to this host],
826[ case $enableval in
827 yes)
6a9f6389 828 AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()],
829 [If you are upset that the cachemgr.cgi form comes up with the hostname field blank, then define this to getfullhostname()])
e5f4e1b0 830 echo "Cachemgr default hostname == host where cachemgr runs"
831 ;;
832 no)
833 : # Nothing to do..
834 ;;
835 *)
836 AC_DEFINE_UNQUOTED(CACHEMGR_HOSTNAME,"${enableval}")
837 echo "Cachemgr default hostname set to ${enableval}"
838 ;;
839 esac
840])
841
b0dd28ba 842AM_CONDITIONAL(ENABLE_ARP_ACL, false)
d9180414 843AC_ARG_ENABLE(arp-acl,
e5f4e1b0 844[ --enable-arp-acl Enable use of ARP ACL lists (ether address)],
845[ if test "$enableval" = "yes" ; then
846 echo "ARP ACL lists enabled (ether address)"
933cc58d 847 case "$host" in
ef614b1c 848 *-linux-*)
849 ;;
9d8d033e 850 *-solaris*)
a931a29b 851 ;;
9a2f1170 852 *-freebsd*)
853 ;;
5700029a 854 *-cygwin*)
855 LIBS="$LIBS -liphlpapi"
856 ;;
857 *-mingw*)
858 LIBS="$LIBS -liphlpapi"
859 ;;
933cc58d 860 *)
ef614b1c 861 echo "WARNING: ARP ACL support probably won't work on $host."
933cc58d 862 sleep 10
863 ;;
864 esac
6a9f6389 865 AC_DEFINE(USE_ARP_ACL,1,[Define this to include code which lets you specify access control elements based on ethernet hardware addresses. This code uses functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).])
b0dd28ba 866 AM_CONDITIONAL(ENABLE_ARP_ACL, true)
e5f4e1b0 867 fi
868])
869
a2794549 870AM_CONDITIONAL(ENABLE_HTCP, false)
74075210 871AC_ARG_ENABLE(htcp,
88b7de25 872[ --enable-htcp Enable HTCP protocol],
b4b8b6da 873[ if test "$enableval" = "yes" ; then
874 echo "HTCP enabled"
6a9f6389 875 AC_DEFINE(USE_HTCP,1, [Define this to include code for the Hypertext Cache Protocol (HTCP)])
a2794549 876 AM_CONDITIONAL(ENABLE_HTCP, true)
b4b8b6da 877 fi
74075210 878])
a2794549 879
880AM_CONDITIONAL(ENABLE_SSL, false)
74075210 881
1f7c9178 882AC_ARG_ENABLE(ssl,
883[ --enable-ssl Enable ssl gatewaying support using OpenSSL],
884[ if test "$enableval" != "no"; then
3dff197f 885 echo "SSL gatewaying using OpenSSL enabled"
6a9f6389 886 AC_DEFINE(USE_SSL,1,[Define this to include code for SSL encryption.])
a2794549 887 AM_CONDITIONAL(ENABLE_SSL, true)
4b26fae9 888 case "$host_os" in
889 mingw|mingw32)
890 dnl Native Windows port of OpenSSL needs -lgdi32
891 SSLLIB='-lssl -lcrypto -lgdi32'
892 ;;
893 *)
894 SSLLIB='-lssl -lcrypto'
895 ;;
896 esac
1f7c9178 897 USE_OPENSSL=1
898 fi
899])
900
3dff197f 901AM_CONDITIONAL(NEED_OWN_MD5, true)
902
1f7c9178 903AC_ARG_WITH(openssl,
904[ --with-openssl[=prefix]
905 Compile with the OpenSSL libraries. The path to
906 the OpenSSL development libraries and headers
907 installation can be specified if outside of the
908 system standard directories],
909[
46ce628c 910 case "$with_openssl" in
1f7c9178 911 yes)
912 USE_OPENSSL=1
913 ;;
914 no)
915 USE_OPENSSL=
916 ;;
917 *)
46ce628c 918 SSLLIBDIR="$with_openssl/lib"
bcce53ce 919 CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
1f7c9178 920 USE_OPENSSL=1
921 esac
922])
923
924if test -n "$USE_OPENSSL"; then
3dff197f 925 echo "Using OpenSSL MD5 implementation"
6a9f6389 926 AC_DEFINE(USE_OPENSSL,1,[Define this to make use of the OpenSSL libraries for MD5 calculation rather than Squid's own MD5 implementation or if building with SSL encryption (USE_SSL)])
3dff197f 927 AM_CONDITIONAL(NEED_OWN_MD5, false)
1f7c9178 928 if test -z "$SSLLIB"; then
929 SSLLIB="-lcrypto" # for MD5 routines
930 fi
f11555e0 931 dnl This is a workaround for RedHat 9 brain damage..
932 if test -d /usr/kerberos/include && test -z "$SSLLIBDIR" && test -f /usr/include/openssl/kssl.h; then
933 echo "OpenSSL depends on Kerberos"
934 SSLLIBDIR="/usr/kerberos/lib"
935 CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
936 fi
1f7c9178 937fi
938if test -n "$SSLLIBDIR"; then
939 SSLLIB="-L$SSLLIBDIR $SSLLIB"
940fi
1f7c9178 941AC_SUBST(SSLLIB)
942
02749868 943AC_ARG_ENABLE(forw-via-db,
944[ --enable-forw-via-db Enable Forw/Via database],
945[ if test "$enableval" = "yes" ; then
946 echo "FORW-VIA enabled"
6a9f6389 947 AC_DEFINE(FORW_VIA_DB,1,[Enable Forw/Via database])
02749868 948 fi
949])
950
6cfa8966 951AC_ARG_ENABLE(cache-digests,
22df58ea 952[ --enable-cache-digests Use Cache Digests
2b6662ba 953 see http://www.squid-cache.org/FAQ/FAQ-16.html],
484f2ebc 954[ if test "$enableval" = "yes" ; then
6cfa8966 955 echo "USE_CACHE_DIGESTS enabled"
6a9f6389 956 AC_DEFINE(USE_CACHE_DIGESTS,1,[Use Cache Digests for locating objects in neighbor caches. This code is still semi-experimental.])
484f2ebc 957 fi
958])
959
8c3926c5 960dnl Select Default Error language
961AC_ARG_ENABLE(default-err-language,
962[ --enable-default-err-language=lang
0961c811 963 Select default language for Error pages (see
964 errors directory) ],
933cc58d 965[
cf9d704a 966 if test -d $srcdir/errors/$enableval; then
8c3926c5 967 ERR_DEFAULT_LANGUAGE=$enableval
933cc58d 968 else
0961c811 969 echo "ERROR! Unknown language $enableval, see errors/ directory"
933cc58d 970 exit 1
971 fi
8c3926c5 972],[ERR_DEFAULT_LANGUAGE="English"])
973AC_SUBST(ERR_DEFAULT_LANGUAGE)
974
975dnl Select languages to be installed
976AC_ARG_ENABLE(err-languages,
977[ --enable-err-languages=\"lang1 lang2..\"
0961c811 978 Select languages to be installed. (All will be
979 installed by default) ],
8c3926c5 980[
981 for l in $enableval; do
982 if test -d $srcdir/errors/$l; then :; else
983 echo "ERROR! Unknown language $$l, see errors/"
984 exit 1
985 fi
986 done
987 ERR_LANGUAGES=$enableval
988],[
989 ERR_LANGUAGES=
990 for l in $srcdir/errors/*; do
cbbe101f 991 if test -f $l/ERR_ACCESS_DENIED; then
8c3926c5 992 ERR_LANGUAGES="$ERR_LANGUAGES `basename $l`"
993 fi
994 done
995])
996AC_SUBST(ERR_LANGUAGES)
933cc58d 997
cd748f27 998dnl Size of COSS memory buffer
999AC_ARG_WITH(coss-membuf-size,
1000[ --with-coss-membuf-size COSS membuf size (default 1048576 bytes) ],
1001[ if test "$with_coss_membuf_size"; then
1002 echo "Setting COSS membuf size to $with_coss_membuf_size bytes"
6a9f6389 1003 AC_DEFINE_UNQUOTED(COSS_MEMBUF_SZ, $with_coss_membuf_size,[Define if you want to set the COSS membuf size])
cd748f27 1004 fi
1005])
1006
1b3db6d9 1007dnl check for netio plugin stuff
9bb83c8b 1008dnl Enable poll()
1009AC_ARG_ENABLE(poll,
2df6213e 1010[ --enable-poll Enable poll() support.
0961c811 1011 --disable-poll Disable poll() support. ],
1b3db6d9 1012
1013[
c68e9c6b 1014 case "$enableval" in
1015 yes)
9bb83c8b 1016 echo "Forcing poll() to be enabled"
1017 ac_cv_func_poll='yes'
c68e9c6b 1018 ;;
1019 no)
1020 echo "Forcing poll() to be disabled"
1021 ac_cv_func_poll='no'
1022 ;;
1023 esac
9bb83c8b 1024])
1025
1b3db6d9 1026dnl Enable select()
1027AC_ARG_ENABLE(select,
2df6213e 1028[ --enable-select Enable select() support.
0961c811 1029 --disable-select Disable select() support. ],
1b3db6d9 1030
1031[
1032 case "$enableval" in
1033 yes)
1034 echo "Forcing select() to be enabled"
1035 ac_cv_func_select='yes'
1036 ;;
1037 no)
1038 echo "Forcing select() to be disabled"
1039 ac_cv_func_select='no'
1040 ;;
1041 esac
1042])
1043
1044dnl Enable kqueue()
1045AC_ARG_ENABLE(kqueue,
2df6213e 1046[ --enable-kqueue Enable kqueue() support.
0961c811 1047 --disable-kqueue Disable kqueue() support. ],
1b3db6d9 1048
1049[
1050 case "$enableval" in
1051 yes)
1052 echo "Forcing kqueue() to be enabled"
1053 ac_cv_func_kqueue='yes'
1054 ;;
1055 no)
1056 echo "Forcing kqueue() to be disabled"
1057 ac_cv_func_kqueue='no'
1058 ;;
1059esac
1060])
1061
a46d2c0e 1062dnl Enable epoll()
a46d2c0e 1063AC_ARG_ENABLE(epoll,
2df6213e 1064[ --enable-epoll Enable epoll() support.
1065 --disable-epoll Disable epoll() support. ],
a46d2c0e 1066
1067[
1068 case "$enableval" in
1069 yes)
1070 echo "Forcing epoll() to be enabled"
1071 ac_cv_func_epoll='yes'
a46d2c0e 1072 ;;
1073 no)
1074 echo "Forcing epoll() to be disabled"
1075 ac_cv_func_epoll='no'
1076 ;;
1077esac
1078])
1079
1080
72fd085a 1081dnl Disable HTTP violations
14b32873 1082http_violations=1
72fd085a 1083AC_ARG_ENABLE(http-violations,
1084[ --disable-http-violations
1085 This allows you to remove code which is known to
c68e9c6b 1086 violate the HTTP protocol specification.],
72fd085a 1087[ if test "$enableval" = "no" ; then
1088 echo "Disabling HTTP Violations"
14b32873 1089 http_violations=0
72fd085a 1090 fi
1091])
14b32873 1092if test $http_violations = 1; then
1093 AC_DEFINE(HTTP_VIOLATIONS, 1,[By default (for now anyway) Squid includes options which allows the cache administrator to violate the HTTP protocol specification in terms of cache behaviour. Setting this to '0' will disable such code.])
1094else
1095 AC_DEFINE(HTTP_VIOLATIONS, 0)
1096fi
72fd085a 1097
5cafc1d6 1098dnl Enable IP-Filter Transparent Proxy
1099AC_ARG_ENABLE(ipf-transparent,
1100[ --enable-ipf-transparent
1101 Enable Transparent Proxy support for systems
c68e9c6b 1102 using IP-Filter network address redirection.],
5cafc1d6 1103[ if test "$enableval" = "yes" ; then
1104 echo "IP-Filter Transparent Proxy enabled"
6a9f6389 1105 AC_DEFINE(IPF_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using IP-Filter address redirection. This provides "masquerading" support for non Linux system.])
5cafc1d6 1106 IPF_TRANSPARENT="yes"
1107 fi
1108])
1109
2b0dd4ac 1110dnl Enable PF Transparent Proxy
1111AC_ARG_ENABLE(pf-transparent,
1112[ --enable-pf-transparent
1113 Enable Transparent Proxy support for systems
1114 using PF network address redirection.],
1115[ if test "$enableval" = "yes" ; then
1116 echo "PF Transparent Proxy enabled"
6a9f6389 1117 AC_DEFINE(PF_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using PF address redirection. This provides "masquerading" support for OpenBSD.])
2b0dd4ac 1118 PF_TRANSPARENT="yes"
1119 fi
1120])
1121
d6d62546 1122dnl Enable Linux Netfilter Transparent Proxy
d852fbad 1123AC_ARG_ENABLE(linux-netfilter,
1124[ --enable-linux-netfilter
d6d62546 1125 Enable Transparent Proxy support for Linux (Netfilter) systems.],
d852fbad 1126[ if test "$enableval" = "yes" ; then
d6d62546 1127 echo "Linux (Netfilter) Transparent Proxy enabled"
1128 AC_DEFINE(LINUX_NETFILTER,1,[Enable support for Transparent Proxy on Linux (Netfilter) systems])
d852fbad 1129 LINUX_NETFILTER="yes"
1130 fi
1131])
1132
bb7b5fd0 1133dnl Enable Large file support
2df6213e 1134buildmodel=""
1135needlargefiles=
1136
1137AC_ARG_WITH(large-files,
1138[ --with-large-files Enable support for large files (logs etc). Still
bb7b5fd0 1139 experimental.],
2df6213e 1140[ if test "$withval" = yes; then
1141 needlargefiles=1
bb7b5fd0 1142 fi
1143])
1144
2df6213e 1145dnl UNIX Build environment
1146AC_ARG_WITH(build-environment,
1147[ --with-build-environment=model
1148 The build environment to use. Normally one of
1149 POSIX_V6_ILP32_OFF32 32 bits
1150 POSIX_V6_ILP32_OFFBIG 32 bits with large file support
1151 POSIX_V6_LP64_OFF64 64 bits
1152 POSIX_V6_LPBIG_OFFBIG large pointers and files
1153 XBS5_ILP32_OFF32 32 bits (legacy)
1154 XBS5_ILP32_OFFBIG 32 bits with large file support (legacy)
1155 XBS5_LP64_OFF64 64 bits (legacy)
1156 XBS5_LPBIG_OFFBIG large pointers and files (legacy)
1157 default The default for your OS],
1158[ case "$withval" in
1159 yes|no)
1160 echo "--with-build-environment expects a build environment string as used by getconf"
1161 exit 1
1162 ;;
1163 *)
1164 buildmodel="$withval"
1165 ;;
1166 esac
1167])
1168
1169if test $needlargefiles && test -z "$buildmodel"; then
1170 for model in POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG; do
1171 if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then
1172 buildmodel=$model
1173 break
1174 fi
1175 done
1176 if test -z "$buildmodel"; then
1177 echo "WARNING: No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64"
1178 sleep 1
1179 CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS"
cca81db1 1180 CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS"
2df6213e 1181 fi
1182fi
1183if test -n "$buildmodel" && test "$buildmodel" != "default"; then
1184 echo "Using $buildmodel build environment"
1185 if test "`getconf _$buildmodel 2>/dev/null || true`" = 1 || test "`getconf $buildmodel 2>/dev/null || true`" ; then
1186 : # All fine
1187 else
1188 echo "ERROR: Build environment $buildmodel not known to getconf."
1189 exit 1
1190 fi
1191 CFLAGS="`getconf ${buildmodel}_CFLAGS` $CFLAGS"
cca81db1 1192 CXXFLAGS="`getconf ${buildmodel}_CFLAGS` $CXXFLAGS"
2df6213e 1193 LIBS="`getconf ${buildmodel}_LIBS` $LIBS"
1194 LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS"
1195dnl
1196dnl On Solaris getconf returns for CFLAGS -Xa and -Usun options, but:
1197dnl -Xa is supported only by Sun cc, so we need to remove it when using gcc
1198dnl The 'sun' define is needed by ipfilter includes, so we must remove -Usun
1199 case "$host" in
1200 *-solaris*)
1201 if test "$GCC" = "yes"; then
1202 echo "Removing -Xa for gcc on $host"
1203 CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
cca81db1 1204 CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
2df6213e 1205 fi
1206 echo "Removing -Usun for gcc on $host"
1207 CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`"
cca81db1 1208 CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Usun//'`"
2df6213e 1209 ;;
1210 *)
1211 ;;
1212 esac
1213fi
1214
a2794549 1215AM_CONDITIONAL(MAKE_LEAKFINDER, false)
5d620373 1216dnl Enable Leak Finding Functions
1217AC_ARG_ENABLE(leakfinder,
1218[ --enable-leakfinder
1219 Enable Leak Finding code. Enabling this alone
1220 does nothing; you also have to modify the source
1221 code to use the leak finding functions. Probably
1222 Useful for hackers only.],
1223[ if test "$enableval" = "yes" ; then
1224 echo "Leak-Finding enabled"
6a9f6389 1225 AC_DEFINE(USE_LEAKFINDER,1,[Enable code for assisting in finding memory leaks. Hacker stuff only.])
5d620373 1226 USE_LEAKFINDER="yes"
a2794549 1227 AM_CONDITIONAL(MAKE_LEAKFINDER, true)
5d620373 1228 fi
1229])
5d620373 1230
14b32873 1231use_ident=1
3898f57f 1232AC_ARG_ENABLE(ident-lookups,
1233[ --disable-ident-lookups
1234 This allows you to remove code that performs
1235 Ident (RFC 931) lookups.],
1236[ if test "$enableval" = "no" ; then
1237 echo "Disabling Ident Lookups"
14b32873 1238 use_ident=0
3898f57f 1239 fi
1240])
14b32873 1241if test $use_ident = 1; then
1242 AC_DEFINE(USE_IDENT, 1,[Compile in support for Ident (RFC 931) lookups? Enabled by default.])
8000a965 1243 AM_CONDITIONAL(ENABLE_IDENT, true)
14b32873 1244else
1245 AC_DEFINE(USE_IDENT, 0)
8000a965 1246 AM_CONDITIONAL(ENABLE_IDENT, false)
14b32873 1247fi
3898f57f 1248
a2794549 1249AM_CONDITIONAL(USE_DNSSERVER, false)
3c573763 1250use_dnsserver=
eb824054 1251AC_ARG_ENABLE(internal-dns,
7e3ce7b9 1252[ --disable-internal-dns This prevents Squid from directly sending and
eb824054 1253 receiving DNS messages, and instead enables the
1254 old external 'dnsserver' processes.],
1255[ if test "$enableval" = "no" ; then
1256 echo "Disabling Internal DNS queries"
3c573763 1257 use_dnsserver="yes"
eb824054 1258 fi
1259])
3c573763 1260if test "$use_dnsserver" = "yes"; then
6a9f6389 1261 AC_DEFINE(USE_DNSSERVERS,1,[Use dnsserver processes instead of the internal DNS protocol support])
a2794549 1262 AM_CONDITIONAL(USE_DNSSERVER, true)
3c573763 1263fi
eb824054 1264
1265AC_ARG_ENABLE(truncate,
7e3ce7b9 1266[ --enable-truncate This uses truncate() instead of unlink() when
eb824054 1267 removing cache files. Truncate gives a little
1268 performance improvement, but may cause problems
1269 when used with async I/O. Truncate uses more
1270 filesystem inodes than unlink..],
1271[ if test "$enableval" = "yes" ; then
1272 echo "Enabling truncate instead of unlink"
6a9f6389 1273 AC_DEFINE(USE_TRUNCATE,1,[Do we want to use truncate(2) or unlink(2)?])
eb824054 1274 fi
1275])
1276
4fa7a4ba 1277dnl Disable hostname checks
338b5499 1278AC_ARG_ENABLE(hostname-checks,
8fca0346 1279[ --enable-hostname-checks
1280 Tells Squid to rejects any host names with
4fa7a4ba 1281 odd characters in their name to conform with
8fca0346 1282 internet standards. This was the default in
1283 prior Squid versions, but since Squid-3 Squid
1284 no longer tries to police the use of DNS],
1285[ if test "$enableval" = "yes"; then
801d5137 1286 echo "Enabling hostname sanity checks"
338b5499 1287 AC_DEFINE(CHECK_HOSTNAMES, 1, [Enable hostname sanity checks])
4fa7a4ba 1288 fi
1289])
4fa7a4ba 1290
9bc73deb 1291dnl Enable underscore in hostnames
1292AC_ARG_ENABLE(underscores,
1293[ --enable-underscores Squid by default rejects any host names with _
76d83c52 1294 in their name to conform with internet standards.
9bc73deb 1295 If you disagree with this you may allow _ in
1296 hostnames by using this switch, provided that
1297 the resolver library on the host where Squid runs
1298 does not reject _ in hostnames...],
1299[ if test "$enableval" = "yes" ; then
1300 echo "Enabling the use of underscores in host names"
6a9f6389 1301 AC_DEFINE(ALLOW_HOSTNAME_UNDERSCORES, 1,[Allow underscores in host names])
9bc73deb 1302 fi
1303])
1304
9d798391 1305dnl Select Default hosts file location
1306AC_ARG_ENABLE(default-hostsfile,
1307[ --enable-default-hostsfile=path
1308 Select default location for hosts file.
1309 See hosts_file directive in squid.conf for details],
1310[
1311 if test "$enableval" != "none" ; then
1312 if test -f $enableval; then
1313 OPT_DEFAULT_HOSTS=$enableval
1314 else
1315 echo "Warning Unable to find $enableval"
1316 sleep 5
1317 fi
1318 else
1319 OPT_DEFAULT_HOSTS="none"
1320 fi
1321 echo "Default hosts file set to: $enableval"
1322],[OPT_DEFAULT_HOSTS="/etc/hosts"])
1323AC_SUBST(OPT_DEFAULT_HOSTS)
1324
94439e4e 1325dnl Select auth schemes modules to build
1326AC_ARG_ENABLE(auth,
1327[ --enable-auth=\"list of auth scheme modules\"
1328 Build support for the list of authentication schemes.
1329 The default is to build support for the Basic scheme.
1330 See src/auth for a list of available modules, or
1331 Programmers Guide section authentication schemes
1332 for details on how to build your custom auth scheme
1333 module],
1334[ case $enableval in
1335 yes)
1c42c4a1 1336 for dir in $srcdir/src/auth/*; do
1337 module="`basename $dir`"
1c690e30 1338 if test -d "$dir" && test "$module" != CVS; then
1c42c4a1 1339 AUTH_MODULES="$AUTH_MODULES $module"
94439e4e 1340 fi
1341 done
1342 ;;
1343 no)
1344 ;;
1c690e30 1345 *)
1346 AUTH_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1347 ;;
94439e4e 1348 esac
1349],
1350[ if test -z "$AUTH_MODULES"; then
6bf4f823 1351 AUTH_MODULES="ntlm basic digest negotiate"
94439e4e 1352 fi
1353])
1c690e30 1354if test -n "$AUTH_MODULES"; then
1355 for module in $AUTH_MODULES; do
1356 if test -d $srcdir/src/auth/$module; then
1357 :
1358 else
1359 echo "ERROR: Auth scheme $module does not exists"
1360 exit 1
1361 fi
7f18d2bd 1362 eval AUTH_MODULE_${module}=yes
1c690e30 1363 done
1364 echo "Auth scheme modules built: $AUTH_MODULES"
1365 AUTH_OBJS="auth/lib`echo $AUTH_MODULES|sed -e 's% %.a auth/lib%g'`.a"
1366 AUTH_LIBS="`echo $AUTH_OBJS|sed -e 's%auth/%%g'`"
1367fi
f5691f9c 1368AUTH_LINKOBJS=
1369for module in $AUTH_MODULES; do
1370 AUTH_LINKOBJS="$AUTH_LINKOBJS auth/${module}/${module}Scheme.o"
1371done
94439e4e 1372AC_SUBST(AUTH_MODULES)
94439e4e 1373AC_SUBST(AUTH_LIBS)
f5691f9c 1374AC_SUBST(AUTH_LINKOBJS)
1375AC_SUBST(AUTH_OBJS)
94439e4e 1376
1377dnl Select basic auth scheme helpers to build
7f18d2bd 1378if test -n "$AUTH_MODULE_basic"; then
1379 BASIC_AUTH_HELPERS="all"
1380fi
94439e4e 1381AC_ARG_ENABLE(basic-auth-helpers,
1382[ --enable-basic-auth-helpers=\"list of helpers\"
1383 This option selects which basic scheme proxy_auth
1384 helpers to build and install as part of the normal
1385 build process. For a list of available
0c510f3c 1386 helpers see the helpers/basic_auth directory.],
94439e4e 1387[ case "$enableval" in
7f18d2bd 1388 yes)
1389 BASIC_AUTH_HELPERS="all"
1c690e30 1390 ;;
94439e4e 1391 no)
7f18d2bd 1392 BASIC_AUTH_HELPERS=""
1c690e30 1393 ;;
94439e4e 1394 *)
7f18d2bd 1395 if test -z "$AUTH_MODULE_basic"; then
1396 echo "WARNING: Basic auth helpers selected without the basic scheme enabled"
1397 sleep 15
1398 fi
1c690e30 1399 BASIC_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1400 ;;
94439e4e 1401 esac
1402])
7f18d2bd 1403if test "$BASIC_AUTH_HELPERS" = "all" ; then
1404 BASIC_AUTH_HELPERS=""
1405 for dir in $srcdir/helpers/basic_auth/*; do
1406 helper="`basename $dir`"
1407 if test -f $dir/config.test && sh $dir/config.test "$@"; then
1408 BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS $helper"
1409 fi
1410 done
1411fi
fc83a946 1412if test -n "$BASIC_AUTH_HELPERS"; then
20d8bfe4 1413 for helper in $BASIC_AUTH_HELPERS; do
1c690e30 1414 if test -d $srcdir/helpers/basic_auth/$helper; then
2adff954 1415 case $helper in
1416 SASL)
1417 require_sasl=yes
1418 ;;
1419 esac
20d8bfe4 1420 else
1c690e30 1421 echo "ERROR: Basic auth helper $helper does not exists"
1422 exit 1
20d8bfe4 1423 fi
1424 done
fc83a946 1425 echo "Basic auth helpers built: $BASIC_AUTH_HELPERS"
94439e4e 1426fi
fc83a946 1427AC_SUBST(BASIC_AUTH_HELPERS)
94439e4e 1428
1429dnl Select ntlm auth helpers to build
7f18d2bd 1430if test -n "$AUTH_MODULE_ntlm"; then
1431 NTLM_AUTH_HELPERS="all"
1432fi
94439e4e 1433AC_ARG_ENABLE(ntlm-auth-helpers,
1434[ --enable-ntlm-auth-helpers=\"list of helpers\"
1435 This option selects which proxy_auth ntlm helpers
1436 to build and install as part of the normal build
0c510f3c 1437 process. For a list of available helpers see
1438 the helpers/ntlm_auth directory.],
380f0a87 1439[ case "$enableval" in
1440 yes)
7f18d2bd 1441 NTLM_AUTH_HELPERS="all"
1c690e30 1442 ;;
380f0a87 1443 no)
7f18d2bd 1444 NTLM_AUTH_HELPERS=""
1c690e30 1445 ;;
380f0a87 1446 *)
1c690e30 1447 NTLM_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1448 ;;
380f0a87 1449 esac
1450])
7f18d2bd 1451if test "$NTLM_AUTH_HELPERS" = "all" ; then
1452 NTLM_AUTH_HELPERS=""
1453 for dir in $srcdir/helpers/ntlm_auth/*; do
1454 helper="`basename $dir`"
1455 if test -f $dir/config.test && sh $dir/config.test "$@"; then
1456 NTLM_AUTH_HELPERS="$NTLM_AUTH_HELPERS $helper"
1457 fi
1458 done
1459fi
94439e4e 1460if test -n "$NTLM_AUTH_HELPERS"; then
20d8bfe4 1461 for helper in $NTLM_AUTH_HELPERS; do
1c690e30 1462 if test -d $srcdir/helpers/ntlm_auth/$helper; then
1463 :
20d8bfe4 1464 else
1c690e30 1465 echo "ERROR: NTLM Auth helper $helper does not exists"
1466 exit 1
20d8bfe4 1467 fi
1468 done
94439e4e 1469 echo "NTLM auth helpers built: $NTLM_AUTH_HELPERS"
380f0a87 1470fi
94439e4e 1471AC_SUBST(NTLM_AUTH_HELPERS)
1472
6e785d85 1473dnl Select negotiate auth helpers to build
7f18d2bd 1474if test -n "$AUTH_MODULE_negotiate"; then
1475 NEGOTIATE_AUTH_HELPERS="all"
1476fi
6e785d85 1477AC_ARG_ENABLE(negotiate-auth-helpers,
1478[ --enable-negotiate-auth-helpers=\"list of helpers\"
1479 This option selects which proxy_auth negotiate helpers
1480 to build and install as part of the normal build
1481 process. For a list of available helpers see
1482 the helpers/negotiate_auth directory.],
1483[ case "$enableval" in
1484 yes)
7f18d2bd 1485 NEGOTIATE_AUTH_HELPERS="all"
6e785d85 1486 ;;
1487 no)
7f18d2bd 1488 NEGOTIATE_AUTH_HELPERS=""
6e785d85 1489 ;;
1490 *)
1491 NEGOTIATE_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1492 ;;
1493 esac
1494])
7f18d2bd 1495if test "$NEGOTIATE_AUTH_HELPERS" = "all" ; then
1496 NEGOTIATE_AUTH_HELPERS=""
1497 for dir in $srcdir/helpers/negotiate_auth/*; do
1498 helper="`basename $dir`"
1499 if test -f $dir/config.test && sh $dir/config.test "$@"; then
1500 NEGOTIATE_AUTH_HELPERS="$NEGOTIATE_AUTH_HELPERS $helper"
1501 fi
1502 done
1503fi
6e785d85 1504if test -n "$NEGOTIATE_AUTH_HELPERS"; then
1505 for helper in $NEGOTIATE_AUTH_HELPERS; do
1506 if test -d $srcdir/helpers/negotiate_auth/$helper; then
1507 :
1508 else
1509 echo "ERROR: Negotiate Auth helper $helper does not exists"
1510 exit 1
1511 fi
1512 done
1513 echo "Negotiate auth helpers built: $NEGOTIATE_AUTH_HELPERS"
1514fi
1515AC_SUBST(NEGOTIATE_AUTH_HELPERS)
1516
2d70df72 1517dnl Select digest auth scheme helpers to build
7f18d2bd 1518if test -n "$AUTH_MODULE_digest"; then
1519 DIGEST_AUTH_HELPERS=all
1520fi
2d70df72 1521AC_ARG_ENABLE(digest-auth-helpers,
1522[ --enable-digest-auth-helpers=\"list of helpers\"
1523 This option selects which digest scheme authentication
1524 helpers to build and install as part of the normal build
0c510f3c 1525 process. For a list of available helpers see the
1526 helpers/digest_auth directory.],
2d70df72 1527[ case "$enableval" in
1528 yes)
7f18d2bd 1529 DIGEST_AUTH_HELPERS="all"
1c690e30 1530 ;;
2d70df72 1531 no)
7f18d2bd 1532 DIGEST_AUTH_HELPERS=""
1c690e30 1533 ;;
2d70df72 1534 *)
1c690e30 1535 DIGEST_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1536 ;;
2d70df72 1537 esac
1538])
7f18d2bd 1539if test "$DIGEST_AUTH_HELPERS" = "all" ; then
1540 DIGEST_AUTH_HELPERS=""
1541 for dir in $srcdir/helpers/digest_auth/*; do
1542 helper="`basename $dir`"
1543 if test -f $dir/config.test && sh $dir/config.test "$@"; then
1544 DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS $helper"
1545 fi
1546 done
1547fi
2d70df72 1548if test -n "$DIGEST_AUTH_HELPERS"; then
1daefc1a 1549 for helper in $DIGEST_AUTH_HELPERS; do
1550 if test -f $srcdir/helpers/digest_auth/$helper/Makefile.in; then
1551 :
1552 else
1553 echo "ERROR: digest auth helper $helper does not exists"
1554 exit 1
1555 fi
1556 done
2d70df72 1557 echo "Digest auth helpers built: $DIGEST_AUTH_HELPERS"
1558fi
1559AC_SUBST(DIGEST_AUTH_HELPERS)
380f0a87 1560
6437ac71 1561dnl Enable "NTLM fail open"
1562AC_ARG_ENABLE(ntlm-fail-open,
1563[ --enable-ntlm-fail-open Enable NTLM fail open, where a helper that fails one of the
0961c811 1564 Authentication steps can allow squid to still authenticate
1565 the user.],
6437ac71 1566[ if test "$enableval" = "yes" ; then
6a9f6389 1567 AC_DEFINE(NTLM_FAIL_OPEN,1,[Define if NTLM is allowed to fail gracefully when a helper has problems. WARNING: This has security implications. DO NOT enable unless you KNOW you need it.])
6437ac71 1568 fi
1569])
1570
c6588c68 1571dnl Select external_acl helpers to build
7f18d2bd 1572EXTERNAL_ACL_HELPERS=all
c6588c68 1573AC_ARG_ENABLE(external-acl-helpers,
1574[ --enable-external-acl-helpers=\"list of helpers\"
1575 This option selects which external_acl helpers to
1576 build and install as part of the normal build
1577 process. For a list of available helpers see the
1578 helpers/external_acl directory.],
1579[ case "$enableval" in
1580 yes)
7f18d2bd 1581 EXTERNAL_ACL_HELPERS=all
1c690e30 1582 ;;
c6588c68 1583 no)
7f18d2bd 1584 EXTERNAL_ACL_HELPERS=""
1c690e30 1585 ;;
c6588c68 1586 *)
1c690e30 1587 EXTERNAL_ACL_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
1588 ;;
c6588c68 1589 esac
1590])
7f18d2bd 1591if test "$EXTERNAL_ACL_HELPERS" = "all" ; then
39ee7289 1592 EXTERNAL_ACL_HELPERS=""
7f18d2bd 1593 for dir in $srcdir/helpers/external_acl/*; do
1594 helper="`basename $dir`"
1595 if test -f $dir/config.test && sh $dir/config.test "$@"; then
1596 EXTERNAL_ACL_HELPERS="$EXTERNAL_ACL_HELPERS $helper"
1597 fi
1598 done
1599fi
c6588c68 1600if test -n "$EXTERNAL_ACL_HELPERS"; then
20d8bfe4 1601 for helper in $EXTERNAL_ACL_HELPERS; do
1602 if test -f $srcdir/helpers/external_acl/$helper/Makefile.in; then
1603 :
1604 else
1daefc1a 1605 echo "ERROR: external acl helper $helper does not exists"
20d8bfe4 1606 exit 1
1607 fi
1608 done
c6588c68 1609 echo "External acl helpers built: $EXTERNAL_ACL_HELPERS"
1610fi
1611AC_SUBST(EXTERNAL_ACL_HELPERS)
1612
d96ceb8e 1613dnl Disable "memPools" code
b001e822 1614AC_DEFINE(DISABLE_POOLS, 0, [Define if you have problems with memPools and want to disable Pools.])
d96ceb8e 1615AC_ARG_ENABLE(mempools,
b001e822 1616[ --disable-mempools Disable memPools. Note that this option now simply sets the
2df6213e 1617 default behaviour. Specific classes can override this at runtime, and
1618 only lib/MemPool.c needs to be altered to change the squid-wide
1619 default for all classes.],
d96ceb8e 1620[ if test "$enableval" = "no" ; then
1621 echo "memPools disabled"
6a9f6389 1622 AC_DEFINE(DISABLE_POOLS, 1, [Define if you have problems with memPools and want to disable Pools])
d96ceb8e 1623 fi
1624])
1625
0e657244 1626dnl Enable WIN32 Service compile mode
1627AC_ARG_ENABLE(win32-service,
1628[ --enable-win32-service Compile Squid as a WIN32 Service
1629 Works only on Windows NT and Windows 2000 Platforms.],
1630[ if test "$enableval" = "yes" ; then
1631 echo "Enabling WIN32 run service mode"
1632 AC_DEFINE(USE_WIN32_SERVICE,1,[Define Windows NT & Windows 2000 run service mode])
1633 fi
1634])
1635
b1485ff8 1636
2adff954 1637dnl Check for Cyrus SASL
1638if test "$require_sasl" = "yes"; then
1639 AC_CHECK_HEADERS(sasl/sasl.h sasl.h)
1640 if test "$ac_cv_header_sasl_sasl_h" = "yes"; then
1641 echo "using SASL2"
1642 LIBSASL="-lsasl2"
1643 else
1644 if test "$ac_cv_header_sasl_h" = "yes"; then
1645 echo "using SASL"
1646 LIBSASL="-lsasl"
1647 else
1648 echo "ERROR: Neither SASL nor SASL2 found"
1649 exit 1
1650 fi
1651 fi
1652 AC_SUBST(LIBSASL)
1653fi
1654
3c573763 1655dnl Disable "unlinkd" code
fe0810ac 1656AC_ARG_ENABLE(unlinkd,
1657[ --disable-unlinkd Do not use unlinkd],
1658[ if test "$enableval" = "no" ; then
3c573763 1659 use_unlinkd=no
fe0810ac 1660 else
3c573763 1661 use_unlinkd=yes
fe0810ac 1662 fi
1663],[
1664 # Here we should probably use some magic depending on the selected
1665 # storage models
3c573763 1666 use_unlinkd=yes
fe0810ac 1667])
3c573763 1668if test "$use_unlinkd" = "yes"; then
fe0810ac 1669 echo "unlinkd enabled"
6a9f6389 1670 AC_DEFINE(USE_UNLINKD,1,[Define this if unlinkd is required (strongly recommended for ufs storage type)])
a2794549 1671 AM_CONDITIONAL(ENABLE_UNLINKD, true)
fe0810ac 1672else
1673 echo "unlinkd disabled"
a2794549 1674 AM_CONDITIONAL(ENABLE_UNLINKD, false)
fe0810ac 1675fi
fe0810ac 1676
ce3d30fb 1677dnl Enable backtraces on fatal errors
1678AC_ARG_ENABLE(stacktraces,
1679[ --enable-stacktraces Enable automatic call backtrace on fatal errors],
1680[ if test "$enableval" = "yes" ; then
1681 echo "Enabling automatic stack backtraces on fatal errors"
6a9f6389 1682 AC_DEFINE(PRINT_STACK_TRACE, 1,[Print stacktraces on fatal errors])
ce3d30fb 1683 fi
1684])
1685
88bfe092 1686AM_CONDITIONAL(ENABLE_XPROF_STATS, false)
1687dnl Enable USE_XPROF_STATS
1688AC_ARG_ENABLE(cpu-profiling,
1689[ --enable-cpu-profiling
1690 This option allows you to see which internal functions
1691 in Squid are consuming how much CPU. Compiles in probes
1692 that measure time spent in probed functions. Needs
1693 source modifications to add new probes. This is meant
1694 for developers to assist in performance optimisations
1695 of Squid internal functions.
1696 If you are not developer and not interested in the stats
1697 you shouldn't enable this, as overhead added, although
1698 small, is still overhead. See lib/Profiler.c for more.
1699 ],
1700[ if test "$enableval" = "yes" ; then
1701 echo "Enabling cpu-profiling"
6a9f6389 1702 AC_DEFINE(USE_XPROF_STATS, 1,[Define to enable CPU profiling within Squid])
88bfe092 1703 AM_CONDITIONAL(ENABLE_XPROF_STATS, true)
1704 fi
1705])
1706
f66a9ef4 1707dnl Enable X-Accelerator-Vary for Vary support within an accelerator setup
1708AC_ARG_ENABLE(x_accelerator_vary,
0961c811 1709[ --enable-x-accelerator-vary
1710 Enable support for the X-Accelerator-Vary
1711 HTTP header. Can be used to indicate
1712 variance within an accelerator setup.
1713 Typically used together with other code
1714 that adds custom HTTP headers to the requests.],
f66a9ef4 1715[ if test "$enableval" = "yes" ; then
1716 echo "Enabling support for X-Accelerator-Vary"
6a9f6389 1717 AC_DEFINE(X_ACCELERATOR_VARY, 1, [Enable support for the X-Accelerator-Vary HTTP header])
f66a9ef4 1718 fi
1719])
1720
f49be7d1 1721AC_ARG_WITH(filedescriptors,
1722[ --with-filedescriptors=NUMBER Force squid to support NUMBER filedescriptors],
1723[ squid_filedescriptors_num=$withval ])
1724
8b5e106b 1725AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
1726if $CPPUNITCONFIG --help >/dev/null; then
f5691f9c 1727 echo "using system installed cppunit"
1728 SQUID_CPPUNIT_DIR=''
8b5e106b 1729 SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`"
1730 SQUID_CPPUNIT_LA=''
1731 SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`"
1732else
1733 SQUID_CPPUNIT_DIR='cppunit-1.10.0'
1734 SQUID_CPPUNIT_LA='$(top_builddir)/lib/cppunit-1.10.0/src/cppunit/libcppunit.la'
1735 SQUID_CPPUNIT_LIBS='$(SQUID_CPPUNIT_LA)'
1736 SQUID_CPPUNIT_INC='-I$(top_builddir)/lib/cppunit-1.10.0/include -I $(top_srcdir)/lib/cppunit-1.10.0/include'
f5691f9c 1737fi
8b5e106b 1738
f5691f9c 1739AC_ARG_WITH(cppunit-basedir,
1740[ --with-cppunit-basedir=/path/to/cppunit-base
1741 Path where the cppunit headers are libraries are found
1742 for unit testing. (defaults to use internal copies -
1743 version 1.10.0)
1744 ],
1745[ if test -f $withval/include/cppunit/TestCase.h; then
1746 echo "Using cppunit includes from $withval"
1747 SQUID_CPPUNIT_INC="-I${withval}/include"
1748 else
1749 echo "ERROR: Cannot find cppunit at $withval"
1750 exit 1
1751 fi
1752 if test -f $withval/lib/libcppunit.la; then
1753 echo "Using cppunit lib from $withval"
1754 SQUID_CPPUNIT_LA="-I${withval}/lib/libcppunit.la"
8b5e106b 1755 SQUID_CPPUNIT_LIBS='$(SQUID_CPPUNIT_LA)'
f5691f9c 1756 else
1757 echo "ERROR: Cannot find cppunit at $withval"
1758 exit 1
1759 fi
1760 SQUID_CPPUNIT_DIR=''
1761])
8b5e106b 1762AC_SUBST(SQUID_CPPUNIT_LIBS)
f5691f9c 1763AC_SUBST(SQUID_CPPUNIT_LA)
1764AC_SUBST(SQUID_CPPUNIT_INC)
1765AC_SUBST(SQUID_CPPUNIT_DIR)
1766
fd9aaa3e 1767# Force some compilers to use ANSI features
1768#
1769case "$host" in
1770 alpha-dec-osf*)
1771 if test "$ac_cv_prog_CC" = "cc" ; then
1772 echo "adding '-std1' to cc args for $host"
1773 CC="cc -std1";
1774 ac_cv_prog_CC="$CC"
1775 fi
1776 ;;
c68e9c6b 1777 *-hp-hpux*)
1778 if test "$ac_cv_prog_CC" = "cc" ; then
1779 echo "adding '-Ae' to cc args for $host"
1780 CC="cc -Ae";
1781 ac_cv_prog_CC="$CC"
1782 fi
1783 ;;
fd9aaa3e 1784esac
1785
090089c4 1786dnl Check for programs
1787AC_PROG_CPP
1788AC_PROG_INSTALL
090089c4 1789AC_PROG_LN_S
81280a96 1790AC_PATH_PROG(SH, sh, /bin/sh)
d9f67e6f 1791AC_PATH_PROG(FALSE, false, /usr/bin/false)
1792AC_PATH_PROG(TRUE, true, /usr/bin/true)
1793AC_PATH_PROG(RM, rm, $FALSE)
1794AC_PATH_PROG(MV, mv, $FALSE)
1795AC_PATH_PROG(MKDIR, mkdir, $FALSE)
090089c4 1796AC_PATH_PROG(LN, ln, cp)
4e9d8e26 1797AC_PATH_PROG(PERL, perl, none)
a2794549 1798dnl automake handles this AC_PATH_PROG(MAKEDEPEND, makedepend, $TRUE)
6ad85e8a 1799AC_PATH_PROG(AR, ar, $FALSE)
1800
4e9d8e26 1801if test "$ac_cv_path_PERL" = "none"; then
1802 echo "Perl is required to compile Squid"
1803 echo "Please install Perl and then re-run configure"
1804 exit 1
1805fi
1806
6ad85e8a 1807case "$host" in
1808 *-hp-hpux*)
1809 echo "Disabling 'ranlib' for HP-UX..."
1810 RANLIB=":"
1811 ;;
1812esac
1813
1814dnl set $(AR)
1815AR_R="$AR r"
1816case "$host" in
1817 *-next-nextstep3)
1818 AR="libtool -o"
1819 ;;
1820esac
1821AC_SUBST(AR_R)
090089c4 1822
1823dnl Check for headers
1824AC_HEADER_DIRENT
1825AC_HEADER_STDC
db40ae20 1826
1827AC_CHECK_HEADERS( \
db40ae20 1828 arpa/inet.h \
30a4f2a8 1829 arpa/nameser.h \
9441aa34 1830 assert.h \
db40ae20 1831 bstring.h \
db40ae20 1832 crypt.h \
30a4f2a8 1833 ctype.h \
1834 errno.h \
ce3d30fb 1835 execinfo.h \
db40ae20 1836 fcntl.h \
42ad37af 1837 fnmatch.h \
9c1d8929 1838 getopt.h \
88738790 1839 gnumalloc.h \
30a4f2a8 1840 grp.h \
5cafc1d6 1841 ip_compat.h \
42b51993 1842 ip_fil_compat.h \
5cafc1d6 1843 ip_fil.h \
1844 ip_nat.h \
dbc5782a 1845 ipl.h \
30a4f2a8 1846 libc.h \
6ad85e8a 1847 limits.h \
30a4f2a8 1848 malloc.h \
e0bddc45 1849 math.h \
db40ae20 1850 memory.h \
b075cbb1 1851 mount.h \
2b0dd4ac 1852 net/pfvar.h \
30a4f2a8 1853 netdb.h \
db40ae20 1854 netinet/in.h \
30a4f2a8 1855 netinet/tcp.h \
42b51993 1856 netinet/ip_fil_compat.h \
1f7c9178 1857 openssl/err.h \
1858 openssl/md5.h \
1859 openssl/ssl.h \
a7ad6e4e 1860 openssl/engine.h \
dcfe6390 1861 poll.h \
30a4f2a8 1862 pwd.h \
1863 regex.h \
c68e9c6b 1864 sched.h \
30a4f2a8 1865 signal.h \
1866 stdarg.h \
1867 stddef.h \
1868 stdio.h \
db40ae20 1869 stdlib.h \
1870 string.h \
1871 strings.h \
0a4e8536 1872 sys/bitypes.h \
f9576890 1873 sys/bswap.h \
1874 sys/endian.h \
db40ae20 1875 sys/file.h \
5cafc1d6 1876 sys/ioctl.h \
30a4f2a8 1877 sys/param.h \
62ae0622 1878 sys/prctl.h \
77e4c0c9 1879 sys/msg.h \
30a4f2a8 1880 sys/resource.h \
db40ae20 1881 sys/select.h\
30a4f2a8 1882 sys/socket.h \
1883 sys/stat.h \
b075cbb1 1884 sys/statvfs.h \
3c641669 1885 syscall.h \
30a4f2a8 1886 sys/syscall.h \
db40ae20 1887 sys/time.h \
1888 sys/types.h \
30a4f2a8 1889 sys/un.h \
b075cbb1 1890 sys/vfs.h \
30a4f2a8 1891 sys/wait.h \
db40ae20 1892 syslog.h \
30a4f2a8 1893 time.h \
1894 unistd.h \
3c641669 1895 utime.h \
30a4f2a8 1896 varargs.h \
77d6bd88 1897 byteswap.h \
1898 glib.h \
60d096f4 1899 stdint.h \
1900 inttypes.h \
3c641669 1901 grp.h \
1902 nss_common.h \
94331f58 1903 nss.h \
1904 db.h \
1905 db_185.h
db40ae20 1906)
1907
5a3237b0 1908AC_CHECK_HEADERS(linux/netfilter_ipv4.h,,,
dcd1dc78 1909SQUID_DEFAULT_INCLUDES
1910#if HAVE_LIMITS_H
1911#include <limits.h>
1912#endif
1913)
1914
5a3237b0 1915AC_CHECK_HEADERS(net/if.h \
1916 netinet/if_ether.h\
1917 netinet/ip_compat.h\
1918 netinet/ip_fil.h\
77e4c0c9 1919 netinet/ip_nat.h\
dbc5782a 1920 netinet/ipl.h \
77e4c0c9 1921 sys/mount.h\
1922 resolv.h,,,SQUID_BSDNET_INCLUDES)
5a3237b0 1923
a1559187 1924AC_CHECK_HEADERS([libxml/parser.h], [], [
1925 SAVED_CPPFLAGS="$CPPFLAGS"
1926 CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS"
1927 unset ac_cv_header_libxml_parser_h
1928 AC_CHECK_HEADERS([libxml/parser.h], [], [
1929 CPPFLAGS="$SAVED_CPPFLAGS"
1930 ])
1931 ])
1932
aee0606f 1933AC_C_CONST
d57288d2 1934AC_C_BIGENDIAN
aee0606f 1935
5c51415d 1936AC_CACHE_CHECK(if ANSI prototypes work,ac_cv_have_ansi_prototypes, [
1937 AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}],
1938 [foo("bar")],
1939 ac_cv_have_ansi_prototypes="yes",
1940 ac_cv_have_ansi_prototypes="no")
1941])
1942if test $ac_cv_have_ansi_prototypes = "yes" ; then
6a9f6389 1943 AC_DEFINE(HAVE_ANSI_PROTOTYPES,1,[Define if your compiler supports prototyping])
5c51415d 1944fi
20a50bb9 1945
6a9f6389 1946AC_STRUCT_TM
1947AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
1948#if TM_IN_SYS_TIME
1949#if HAVE_SYS_TIME_H
1950#include <sys/time.h>
1951#endif
1952#elif HAVE_TIME_H
1953#include <time.h>
1954#endif
5c51415d 1955])
46c883ed 1956
6a9f6389 1957AC_CHECK_TYPE(struct mallinfo,AC_DEFINE(HAVE_STRUCT_MALLINFO,1,[The system provides struct mallinfo]),,[
1958#if HAVE_SYS_TYPES_H
1959#include <sys/types.h>
1960#endif
eb824054 1961#if HAVE_MALLOC_H
1962#include <malloc.h>
6a9f6389 1963#endif])
eb824054 1964
6a9f6389 1965AC_CHECK_MEMBERS([struct mallinfo.mxfast],,,[
1966#if HAVE_SYS_TYPES_H
1967#include <sys/types.h>
1968#endif
1969#if HAVE_MALLOC_H
1970#include <malloc.h>
1971#endif])
090089c4 1972
6a9f6389 1973AC_CHECK_TYPE(struct rusage,AC_DEFINE(HAVE_STRUCT_RUSAGE,1,[The system provides struct rusage]),,[
8ff51bba 1974#if HAVE_SYS_TIME_H
1975#include <sys/time.h>
1976#endif
b54a6789 1977#if HAVE_SYS_RESOURCE_H
1978#include <sys/resource.h>
6a9f6389 1979#endif])
b54a6789 1980
6a9f6389 1981AC_CHECK_MEMBERS([struct iphdr.ip_hl],,,[
1982#if HAVE_SYS_TYPES_H
1983#include <sys/types.h>
1984#endif
a025a745 1985#include <netinet/in.h>
1986#include <netinet/in_systm.h>
6ad85e8a 1987#include <netinet/ip.h>
b05490a8 1988#if defined (__linux__) || defined (__CYGWIN__)
6ad85e8a 1989#define ip_hl ihl
1990#endif
1991#ifndef __linux__
b05490a8 1992#ifndef __CYGWIN__
6ad85e8a 1993#define iphdr ip
b05490a8 1994#endif
6a9f6389 1995#endif])
a025a745 1996
090089c4 1997dnl Check for typedefs
77d6bd88 1998AC_CHECK_SIZEOF(void *)
090089c4 1999
6a9f6389 2000dnl 16 bit integers - int16_t and u_int16_t
2001dnl if this is defined we trust it to be 16 bits
62266438 2002AC_CHECK_TYPE(int16_t,[
2003 AC_CHECK_SIZEOF(int16_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2004 AC_DEFINE(HAVE_INT16_T,1,[int16_t is defined in system headers])
2005 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2006
2007dnl fallback #1
2008AC_CHECK_TYPE(short,[
856e69c5 2009 AC_CHECK_SIZEOF(short,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2010 AC_DEFINE(HAVE_SHORT,1,[short is defined in system headers])
2011 ],,SQUID_DEFAULT_INCLUDES)
2012
2013dnl fallback #2
2014AC_CHECK_TYPE(int,[
856e69c5 2015 AC_CHECK_SIZEOF(int,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2016 AC_DEFINE(HAVE_INT,1,[int is defined in system headers])
2017 ],,SQUID_DEFAULT_INCLUDES)
2018
2019dnl unsigned 16 bit ints - u_int16_t
2020dnl if this is defined we trust it to be 16 bits
62266438 2021AC_CHECK_TYPE(u_int16_t,[
2022 AC_CHECK_SIZEOF(u_int16_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2023 AC_DEFINE(HAVE_U_INT16_T,1,[u_int16_t is defined in system headers])
2024 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2025
2026dnl fallback #1
2027dnl if this is defined we trust it to be 16 bits
62266438 2028AC_CHECK_TYPE(uint16_t,[
2029 AC_CHECK_SIZEOF(uint16_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2030 AC_DEFINE(HAVE_UINT16_T,1,[uint16_t is defined in system headers])
2031 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2032
2033dnl 32 bit signed int - int32_t
2034dnl if this is defined we trust it to be 32 bits
62266438 2035AC_CHECK_TYPE(int32_t,[
2036 AC_CHECK_SIZEOF(int32_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2037 AC_DEFINE(HAVE_INT32_T,1,[int32_t is defined in system headers])
2038 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2039
2040dnl fallback #1
2041AC_CHECK_TYPE(long,[
856e69c5 2042 AC_CHECK_SIZEOF(long,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2043 AC_DEFINE(HAVE_LONG,1,[long is defined in system headers])
2044 ],,SQUID_DEFAULT_INCLUDES)
2045
2046dnl 32 bit unsigned int - u_int32_t
2047dnl if this is defined we trust it to be 32 bits
62266438 2048AC_CHECK_TYPE(u_int32_t,[
2049 AC_CHECK_SIZEOF(u_int32_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2050 AC_DEFINE(HAVE_U_INT32_T,1,[u_int32_t is defined in system headers])
2051 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2052
2053dnl fallback #1
2054dnl if this is defined we trust it to be 32 bits
62266438 2055AC_CHECK_TYPE(uint32_t,[
2056 AC_CHECK_SIZEOF(uint32_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2057 AC_DEFINE(HAVE_UINT32_T,1,[uint32_t is defined in system headers])
2058 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2059
2060dnl 64 bit signed - int64_t
2061dnl if this is defind we trust it to be 64 bits
62266438 2062AC_CHECK_TYPE(int64_t,[
2063 AC_CHECK_SIZEOF(int64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2064 AC_DEFINE(HAVE_INT64_T,1,[int64_t is defined in system headers])
2065 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2066
2067dnl fallback #1
2068dnl if this is defind we trust it to be 64 bits
62266438 2069AC_CHECK_TYPE(__int64,[
2070 AC_CHECK_SIZEOF(__int64,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2071 AC_DEFINE(HAVE___INT64,1,[__int64 is defined in system headers])
2072 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2073
2074dnl fallback #2
2075AC_CHECK_TYPE(long long,[
856e69c5 2076 AC_CHECK_SIZEOF(long long,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2077 AC_DEFINE(HAVE_LONG_LONG,1,[long long is defined in system headers])
2078 ],,SQUID_DEFAULT_INCLUDES)
2079
2080dnl 64 bit unsigned - u_int64_t
2081dnl if this is defind we trust it to be 64 bits
62266438 2082AC_CHECK_TYPE(u_int64_t,[
2083 AC_CHECK_SIZEOF(u_int64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2084 AC_DEFINE(HAVE_U_INT64_T,1,[u_int64_t is defined in system headers])
2085 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2086
2087dnl fallback #1
2088dnl if this is defind we trust it to be 64 bits
62266438 2089AC_CHECK_TYPE(uint64_t,[
2090 AC_CHECK_SIZEOF(uint64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
2091 AC_DEFINE(HAVE_UINT64_T,1,[uint64_t is defined in system headers])
2092 ],,SQUID_DEFAULT_INCLUDES)
6a9f6389 2093
588e71df 2094dnl On Solaris 9 x86, gcc may includes a "fixed" set of old system include files
2095dnl that is incompatible with the updated Solaris header files.
2096dnl For this reason, we must check if pad128_t and upad128_t are defined.
2097AC_CHECK_TYPE(pad128_t,
2098 AC_DEFINE(HAVE_PAD128_T,1,[pad128_t is defined in system headers]),
2099 ,SQUID_DEFAULT_INCLUDES)
2100
2101AC_CHECK_TYPE(upad128_t,
2102 AC_DEFINE(HAVE_UPAD128_T,1,[upad128_t is defined in system headers]),
2103 ,SQUID_DEFAULT_INCLUDES)
2104
6a9f6389 2105AC_CHECK_TYPE(pid_t, AC_DEFINE(HAVE_PID_T,1,[pid_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES)
856e69c5 2106AC_CHECK_TYPE(size_t, [AC_CHECK_SIZEOF(size_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2107 AC_DEFINE(HAVE_SIZE_T,1,[size_t is defined by the system headers])],,SQUID_DEFAULT_INCLUDES)
2108AC_CHECK_TYPE(ssize_t, AC_DEFINE(HAVE_SSIZE_T,1,[ssize_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES)
856e69c5 2109AC_CHECK_TYPE(off_t,[ AC_CHECK_SIZEOF(off_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
6a9f6389 2110 AC_DEFINE(HAVE_OFF_T,1,[off_t is defined by the system headers])],,SQUID_DEFAULT_INCLUDES)
2111AC_CHECK_TYPE(mode_t, AC_DEFINE(HAVE_MODE_T,1,[mode_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES)
2112AC_CHECK_TYPE(fd_mask, AC_DEFINE(HAVE_FD_MASK,1,[fd_mask is defined by the system headers]),,SQUID_DEFAULT_INCLUDES)
adcceb47 2113
77d6bd88 2114dnl Check for special functions
2115AC_FUNC_ALLOCA
2116
6a9f6389 2117AC_CHECK_TYPE(socklen_t,AC_DEFINE(HAVE_SOCKLEN_T,1,[socklen_t is defined by the system headers]),,[
2118#include <sys/types.h>
6637e3a5 2119#include <sys/socket.h>
2120#if STDC_HEADERS
2121#include <stdlib.h>
2122#include <stddef.h>
6a9f6389 2123#endif])
6637e3a5 2124
6a9f6389 2125AC_CHECK_TYPE(mtyp_t,AC_DEFINE(HAVE_MTYP_T,1,[mtyp_t is defined by the system headers]),,[#include <sys/types.h>
aea1be68 2126#include <sys/ipc.h>
6a9f6389 2127#include <sys/msg.h>])
aea1be68 2128
090089c4 2129dnl Check for needed libraries
30a4f2a8 2130AC_CHECK_LIB(nsl, main)
6716b242 2131AC_CHECK_LIB(socket, main)
4b26fae9 2132case "$host_os" in
2133 mingw|mingw32)
2134 AC_MSG_CHECKING(for winsock)
2135 save_LIBS="$LIBS"
2136 for curlib in ws2_32 wsock32; do
2137 LIBS="$LIBS -l$curlib"
2138 AC_TRY_LINK([
2139 char __attribute__((stdcall)) socket(int,int,int);
2140 char __attribute__((stdcall)) select(int,int,int,int,int);
2141 char __attribute__((stdcall)) closesocket(int);
2142 char __attribute__((stdcall)) gethostname(int,int);
2143 ],
2144 [
2145 socket(1,2,3);
2146 select(1,2,3,4,5);
2147 closesocket(1);
2148 gethostname(1,2);
2149 ],
2150 have_winsock=yes, have_winsock=no)
2151
2152 if test $have_winsock = yes; then
2153 ac_cv_func_select='yes'
2154 if test $curlib = ws2_32; then
2155 have_winsock=winsock2
2156 fi
2157 break
2158 fi
2159 LIBS="$save_LIBS"
2160 done
2161 AC_MSG_RESULT($have_winsock)
2162 ;;
2163esac
94d48591 2164
3c641669 2165dnl Ripped from the Samba sources
2166AC_CACHE_CHECK([for unix domain sockets],squid_cv_unixsocket, [
2167 AC_TRY_COMPILE([
2168#include <sys/types.h>
2169#include <stdlib.h>
2170#include <stddef.h>
2171#include <sys/socket.h>
2172#include <sys/un.h>],
2173[
2174 struct sockaddr_un sunaddr;
2175 sunaddr.sun_family = AF_UNIX;
2176],
2177 squid_cv_unixsocket=yes,squid_cv_unixsocket=no)])
2178if test x"$squid_cv_unixsocket" = x"yes"; then
6a9f6389 2179 AC_DEFINE(HAVE_UNIXSOCKET,1,[Do we have unix sockets? (required for the winbind ntlm helper])
3c641669 2180fi
2181dnl end rip
2182
94d48591 2183if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then
2184 echo "skipping libmalloc check (--enable-dlmalloc specified)"
5c51415d 2185else
94d48591 2186 AC_CHECK_LIB(gnumalloc, main)
2187 if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
2188 echo "Disabling extended malloc functions when using gnumalloc"
2189 ac_cv_func_mallinfo=no
2190 ac_cv_func_mallocblksize=no
2191 ac_cv_func_mallopt=no
2192 else
2193 case "$host" in
2194 *-sun-solaris*)
2195 echo "skipping libmalloc check for $host"
2196 ;;
2197 i386-*-freebsd*)
2198 echo "skipping libmalloc check for $host"
2199 ;;
2200 *)
2201
2202 AC_CHECK_LIB(malloc, main)
2203 ;;
2204 esac
2205 fi
8a15e65e 2206fi
94d48591 2207
6716b242 2208AC_CHECK_LIB(bsd, main)
be79ade0 2209AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
04a56fa3 2210AC_CHECK_LIB(bind, gethostbyname)
2211if test $ac_cv_lib_bind_gethostbyname = "no" ; then
2212 case "$host" in
78743365 2213 i386-*-freebsd*)
2214 echo "skipping libresolv checks for $host"
2215 ;;
2216 *)
2217 AC_CHECK_LIB(resolv, inet_aton, AC_CHECK_LIB(44bsd, inet_aton))
2218 AC_CHECK_LIB(resolv, main)
2219 ;;
04a56fa3 2220 esac
2221fi
e0bddc45 2222AC_CHECK_LIB(m, main)
090089c4 2223
2224dnl Check for libcrypt
8154dd82 2225dnl Some of our helpers use crypt(3) which may be in libc, or in
2226dnl libcrypt (eg FreeBSD)
042b1f8a 2227AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
be79ade0 2228AC_SUBST(CRYPTLIB)
77f675ad 2229
042b1f8a 2230dnl Check for libdl, used by auth_modules/PAM
8154dd82 2231if test "$with_dl" = "yes"; then
2232 AC_CHECK_LIB(dl, dlopen)
2233fi
042b1f8a 2234
e5f4e1b0 2235dnl Check for pthreads
2236dnl We use pthreads when doing ASYNC I/O
8154dd82 2237if test "$with_pthreads" = "yes"; then
fa035612 2238 SQUID_CFLAGS="$SQUID_CFLAGS -D_REENTRANT"
2239 SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_REENTRANT"
e685e3c6 2240 case "$host" in
2241 i386-unknown-freebsd*)
2242 if test "$GCC" = "yes" ; then
2243 if test -z "$PRESET_LDFLAGS"; then
2244 LDFLAGS="$LDFLAGS -pthread"
2245 fi
2246 fi
2247 ;;
2248 *-solaris2.*)
2249 if test "$GCC" = "yes" ; then
fa035612 2250 SQUID_CFLAGS="$SQUID_CFLAGS -pthreads"
2251 SQUID_CXXFLAGS="$SQUID_CXXFLAGS -pthreads"
e685e3c6 2252 else
fa035612 2253 SQUID_CFLAGS="$SQUID_CFLAGS -mt"
2254 SQUID_CXXFLAGS="$SQUID_CXXFLAGS -mt"
e685e3c6 2255 fi
2256 ;;
2257 esac
8154dd82 2258 AC_CHECK_LIB(pthread, main)
2259fi
71f8abc8 2260
f85c88f3 2261dnl Check for librt
2262dnl We use AIO in the coss store
8154dd82 2263if test "$with_aio" = "yes"; then
580e2134 2264 dnl On some systems POSIX AIO functions are in libaio
2265 AC_CHECK_LIB(rt, aio_read,,AC_CHECK_LIB(aio, aio_read))
8154dd82 2266fi
f85c88f3 2267
86ec11aa 2268dnl -lintl is needed on SCO version 3.2v4.2 for strftime()
2269dnl Robert Side <rside@aiinc.bc.ca>
2270dnl Mon, 18 Jan 1999 17:48:00 GMT
2271case "$host" in
2272 *-pc-sco3.2*)
2273 AC_CHECK_LIB(intl, strftime)
2274 ;;
2275esac
2276
20e869bf 2277dnl On MinGW OpenLDAP is not available, so LDAP helpers can be linked
2278dnl only with Windows LDAP libraries using -lwldap32
2279case "$host_os" in
2280mingw|mingw32)
2281 LIB_LDAP="-lwldap32"
2282 LIB_LBER=""
2283 ;;
2284*)
2285 LIB_LDAP="-lldap"
2286 dnl LDAP helpers need to know if -llber is needed or not
2287 AC_CHECK_LIB(lber, main, [LIB_LBER="-llber"])
2288 ;;
2289esac
2290AC_SUBST(LIB_LDAP)
2291AC_SUBST(LIB_LBER)
2292
b7a1c19e 2293dnl Check for libdb
2294DBLIB=
01b4931d 2295dnl 1.85
a258dfca 2296AC_CACHE_CHECK(if dbopen needs -ldb,ac_cv_dbopen_libdb, [
32d0bbd7 2297SAVED_LIBS="$LIBS"; LIBS="$LIBS -ldb"
2298 AC_TRY_LINK([
a258dfca 2299#if HAVE_SYS_TYPES_H
2300#include <sys/types.h>
2301#endif
2302#if HAVE_LIMITS_H
2303#include <limits.h>
2304#endif
2305#if HAVE_DB_185_H
2306#include <db_185.h>
2307#elif HAVE_DB_H
2308#include <db.h>
2309#endif],
2310 [dbopen((void *)0L, 0, 0, DB_HASH, (void *)0L)],
a258dfca 2311 ac_cv_dbopen_libdb="yes",
2312 ac_cv_dbopen_libdb="no")
32d0bbd7 2313LIBS="$SAVED_LIBS"
a258dfca 2314])
2b2161bb 2315if test $ac_cv_dbopen_libdb = yes; then
32d0bbd7 2316 LIB_DB="-ldb"
2317fi
01b4931d 2318AC_SUBST(LIB_DB)
b7a1c19e 2319
77f675ad 2320dnl System-specific library modifications
2321dnl
2322case "$host" in
88738790 2323 i386-*-solaris2.*)
7149a49f 2324 if test "$GCC" = "yes"; then
2325 echo "Removing -O for gcc on $host"
80e92d6d 2326 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
7149a49f 2327 fi
2328 ;;
77f675ad 2329 *-sgi-irix*)
2330 echo "Removing -lsocket for IRIX..."
6716b242 2331 LIBS=`echo $LIBS | sed -e s/-lsocket//`
77f675ad 2332 echo "Removing -lnsl for IRIX..."
6716b242 2333 LIBS=`echo $LIBS | sed -e s/-lnsl//`
c415c128 2334 ac_cv_lib_nsl_main=no
b44c0fb4 2335 echo "Removing -lbsd for IRIX..."
2336 LIBS=`echo $LIBS | sed -e s/-lbsd//`
77f675ad 2337 ;;
4ba0bd0e 2338dnl From: c0032033@ws.rz.tu-bs.de (Joerg Schumacher)
2339dnl Date: Thu, 17 Oct 1996 04:09:30 +0200
2340dnl Please change your configure script. AIX doesn't need -lbsd.
2341 *-ibm-aix*)
2342 echo "Removing -lbsd for AIX..."
2343 LIBS=`echo $LIBS | sed -e s/-lbsd//`
a6e0ad1e 2344 case "$host" in
c68e9c6b 2345dnl From: mlaster@metavillage.com (Mike Laster)
2346dnl AIX 4.1.4.x does not have header files for snprintf/vsnprintf
2347dnl So using the internal versions generates a load of warnings
2348dnl during compile.
a6e0ad1e 2349 *-ibm-aix4*)
2350 echo "disabling snprintf/vsnprintf for $host"
2351 ac_cv_func_snprintf=no
2352 ac_cv_func_vsnprintf=no
2353 ;;
2354 esac
4ba0bd0e 2355 ;;
30a4f2a8 2356 *m88k*)
fa035612 2357 SQUID_CFLAGS="$SQUID_CFLAGS -D_SQUID_MOTOROLA_"
2358 SQUID_CXXFLAGS="$SQUID_CXXFLAGS -D_SQUID_MOTOROLA_"
6a9f6389 2359 AC_DEFINE(GETTIMEOFDAY_NO_TZP,1,[If gettimeofday is known to take only one argument])
7149a49f 2360 ;;
580ce039 2361 [*-*-solaris2.[0-4]])
6a9f6389 2362 AC_DEFINE(GETTIMEOFDAY_NO_TZP,1)
30a4f2a8 2363 ;;
711fa75e 2364 [*-sony-newsos[56]*])
6a9f6389 2365 AC_DEFINE(GETTIMEOFDAY_NO_TZP,1)
f62c73dc 2366 ;;
77f675ad 2367esac
090089c4 2368
57faa85a 2369# Remove optimization for GCC 2.95.[123]
d20b1cd0 2370# gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL
2371if test "$GCC" = "yes"; then
2372 GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
2373 case "$GCCVER" in
57faa85a 2374 [2.95.[123]])
d20b1cd0 2375 echo "Removing -O for gcc on $host with GCC $GCCVER"
2376 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
2377 ;;
2378 esac
2379fi
2380
176d10ee 2381# Recommended by Balint Nagy Endre <bne@CareNet.hu>
2382case "$host" in
2383 *-univel-sysv4.2MP)
2384 if test `uname -v` = "2.03"; then
2385 echo "disabling mallinfo for $host"
2386 ac_cv_func_mallinfo=no
2387 fi
2388 ;;
2389esac
2390
84cecfd2 2391dnl This has to be before AC_CHECK_FUNCS
2392# Disable poll() on certain platforms. Override by setting ac_cv_func_poll
2393# when running configure.
2394if test -z "$ac_cv_func_poll"; then
2395 case "$host" in
2396 [alpha-dec-osf3.*])
2397 # John Kay (jkay@nlanr.net) 19970818
2398 echo "disabling poll for $host..."
2399 ac_cv_func_poll='no'
2400 ;;
2401 [*-hp-hpux*.*])
2402 # Duane Wessels
2403 echo "disabling poll for $host..."
2404 ac_cv_func_poll='no'
2405 ;;
2406 [*-linux-*])
f5cec332 2407 # Henrik Nordstrom (hno@squid-cache.org) 19980817
9bb83c8b 2408 # poll is problematic on Linux. We disable it
2409 # by default until Linux gets it right.
b6a2f15e 2410 rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
2411 if test $rev -lt 002002; then
2412 echo "disabling poll for $host < 2.2..."
2413 ac_cv_func_poll='no'
2414 fi
84cecfd2 2415 ;;
c68e9c6b 2416 [powerpc-ibm-aix4.1.*])
2417 # Mike Laster (mlaster@metavillage.com) 19981021
2418 echo "disabling poll for $host..."
2419 ac_cv_func_poll='no'
2420 ;;
86ec11aa 2421 [*-pc-sco3.2*])
2422 # Robert Side <rside@aiinc.bc.ca>
2423 # Mon, 18 Jan 1999 17:48:00 GMT
2424 echo "disabling poll for $host..."
2425 ac_cv_func_poll='no'
2426 ;;
84cecfd2 2427 esac
2428fi
176d10ee 2429
6716b242 2430dnl Check for library functions
2431AC_CHECK_FUNCS(\
ce3d30fb 2432 backtrace_symbols_fd \
3a144521 2433 bcopy \
2434 bswap_16 \
2435 bswap_32 \
f9576890 2436 bswap16 \
2437 bswap32 \
df087e68 2438 crypt \
4ac29a5b 2439 fchmod \
6716b242 2440 getdtablesize \
8505e57b 2441 getpagesize \
230c091c 2442 getpass \
3a144521 2443 getrlimit \
30a4f2a8 2444 getrusage \
9c1d8929 2445 getspnam \
f9576890 2446 htobe16 \
2447 htole16 \
30a4f2a8 2448 lrand48 \
6716b242 2449 mallinfo \
0f5efab0 2450 mallocblksize \
6716b242 2451 mallopt \
2ae6b9b0 2452 memcpy \
30a4f2a8 2453 memmove \
dac27377 2454 memset \
b99a6dec 2455 mkstemp \
1812b6c7 2456 mktime \
88738790 2457 mstats \
84cecfd2 2458 poll \
62ae0622 2459 prctl \
3a144521 2460 pthread_attr_setschedparam \
cd748f27 2461 pthread_attr_setscope \
2462 pthread_setschedparam \
42b51993 2463 pthread_sigmask \
c68e9c6b 2464 putenv \
b1e77ec1 2465 random \
6716b242 2466 regcomp \
2467 regexec \
2468 regfree \
30a4f2a8 2469 res_init \
4915be3b 2470 rint \
a4ba1105 2471 sbrk \
3a144521 2472 select \
234967c9 2473 seteuid \
c415c128 2474 setgroups \
30a4f2a8 2475 setpgrp \
6716b242 2476 setrlimit \
30a4f2a8 2477 setsid \
2478 sigaction \
11430c03 2479 snprintf \
1ccc0d40 2480 socketpair \
30a4f2a8 2481 srand48 \
b1e77ec1 2482 srandom \
0343b99c 2483 statfs \
6716b242 2484 sysconf \
2485 syslog \
234967c9 2486 timegm \
28da5e0d 2487 vsnprintf \
6716b242 2488)
2489
1b3db6d9 2490dnl Magic which checks whether we are forcing a type of comm loop we
2491dnl are actually going to (ab)use
2492
2493dnl Actually do the define magic now
2494dnl mostly ripped from squid-commloops, thanks to adrian and benno
2495
6c9797b9 2496if test "$ac_cv_func_kqueue" = "yes" ; then
92b9f1fd 2497 SELECT_TYPE="kqueue"
6a9f6389 2498 AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop])
a46d2c0e 2499elif test "$ac_cv_func_epoll" = "yes" ; then
2500 SELECT_TYPE="epoll"
2501 AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop])
48510020 2502 AC_CHECK_LIB(epoll, epoll_create, [EPOLL_LIBS="-lepoll"])
2503 AC_SUBST(EPOLL_LIBS)
6c9797b9 2504elif test "$ac_cv_func_poll" = "yes" ; then
2505 SELECT_TYPE="poll"
2506 AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop])
2507elif test "$ac_cv_func_select" = "yes" ; then
2508 SELECT_TYPE="select"
2509 AC_DEFINE(USE_SELECT,1,[Use select() for the IO loop])
1b3db6d9 2510else
a46d2c0e 2511 echo "Eep! Can't find poll, kqueue, epoll, or select!"
1b3db6d9 2512 echo "I'll try select and hope for the best."
2513 SELECT_TYPE="select"
6a9f6389 2514 AC_DEFINE(USE_SELECT,1)
1b3db6d9 2515fi
2516echo "Using ${SELECT_TYPE} for select loop."
1b3db6d9 2517
2518
60939927 2519dnl Yay! Another Linux brokenness. Its not good enough
2520dnl to know that setresuid() exists, because RedHat 5.0 declares
2521dnl setresuid() but doesn't implement it.
2522dnl
2523AC_CACHE_CHECK(if setresuid is implemented, ac_cv_func_setresuid,
5c51415d 2524 AC_TRY_RUN([
60939927 2525#include <stdlib.h>
5c51415d 2526 int main() {
2527 if(setresuid(-1,-1,-1)) {
2528 perror("setresuid:");
2529 exit(1);
60939927 2530 }
2531 exit(0);
5c51415d 2532 }
2533 ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no")
60939927 2534)
5c51415d 2535if test "$ac_cv_func_setresuid" = "yes" ; then
6a9f6389 2536 AC_DEFINE(HAVE_SETRESUID,1,[Yay! Another Linux brokenness. Its not good enough to know that setresuid() exists, because RedHat 5.0 declare setresuid() but doesn't implement it.])
5c51415d 2537fi
60939927 2538
c3d0c8b5 2539AM_CONDITIONAL(NEED_OWN_SNPRINTF, false)
2540if test "$ac_cv_func_snprintf" = "no" || test "$ac_cv_func_vsnprintf" = "no" ; then
2541 AM_CONDITIONAL(NEED_OWN_SNPRINTF, true)
2542fi
eee79a2e 2543
2544dnl
2545dnl Test for va_copy
2546dnl
2547AC_CACHE_CHECK(if va_copy is implemented, ac_cv_func_va_copy,
2548 AC_TRY_RUN([
2549 #include <stdarg.h>
2550 void f (int i, ...) {
2551 va_list args1, args2;
2552 va_start (args1, i);
2553 va_copy (args2, args1);
2554 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2555 exit (1);
2556 va_end (args1); va_end (args2);
2557 }
2558 int main() {
2559 f (0, 42);
2560 return 0;
2561 }
2562 ],ac_cv_func_va_copy="yes",ac_cv_func_va_copy="no")
2563)
2564if test "$ac_cv_func_va_copy" = "yes" ; then
a45f884d 2565 AC_DEFINE(HAVE_VA_COPY, 1, [If your system have va_copy])
eee79a2e 2566fi
2567
2568dnl
2569dnl Some systems support __va_copy
2570dnl
2571AC_CACHE_CHECK(if __va_copy is implemented, ac_cv_func___va_copy,
2572 AC_TRY_RUN([
2573 #include <stdarg.h>
2574 void f (int i, ...) {
2575 va_list args1, args2;
2576 va_start (args1, i);
2577 __va_copy (args2, args1);
2578 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2579 exit (1);
2580 va_end (args1); va_end (args2);
2581 }
2582 int main() {
2583 f (0, 42);
2584 return 0;
2585 }
2586 ],ac_cv_func___va_copy="yes",ac_cv_func___va_copy="no")
2587)
2588if test "$ac_cv_func___va_copy" = "yes" ; then
a45f884d 2589 AC_DEFINE(HAVE___VA_COPY, 1, [Some systems have __va_copy instead of va_copy])
eee79a2e 2590fi
c3d0c8b5 2591
5cafc1d6 2592dnl IP-Filter support requires ipf header files. These aren't
2593dnl installed by default, so we need to check for them
2594if test "$IPF_TRANSPARENT" ; then
2595 AC_MSG_CHECKING(if IP-Filter header files are installed)
42b51993 2596 # hold on to your hats...
2597 if test "$ac_cv_header_ip_compat_h" = "yes" ||
2598 test "$ac_cv_header_ip_fil_compat_h" = "yes" ||
87d21d8b 2599 test "$ac_cv_header_netinet_ip_compat_h" = "yes" ||
2600 test "$ac_cv_header_netinet_ip_fil_compat_h" = "yes" ; then
42b51993 2601 have_ipfilter_compat_header="yes"
2602 fi
2603 if test "x$have_ipfilter_compat_header" = "xyes" &&
eb824054 2604 test "$ac_cv_header_ip_fil_h" = "yes" &&
2605 test "$ac_cv_header_ip_nat_h" = "yes" ; then
2606 IPF_TRANSPARENT="yes"
2607 AC_DEFINE(IPF_TRANSPARENT, 1)
42b51993 2608 elif test "$have_ipfilter_compat_header" = "yes" &&
eb824054 2609 test "$ac_cv_header_netinet_ip_fil_h" = "yes" &&
2610 test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then
2611 IPF_TRANSPARENT="yes"
2612 AC_DEFINE(IPF_TRANSPARENT, 1)
2613 else
5cafc1d6 2614 IPF_TRANSPARENT="no"
2615 AC_DEFINE(IPF_TRANSPARENT, 0)
5cafc1d6 2616 fi
2617 AC_MSG_RESULT($IPF_TRANSPARENT)
2618fi
2619if test "$IPF_TRANSPARENT" = "no" ; then
2620 echo "WARNING: Cannot find necessary IP-Filter header files"
2621 echo " Transparent Proxy support WILL NOT be enabled"
2622 sleep 10
8f6ca20d 2623elif test "$IPF_TRANSPARENT" = "yes" ; then
2624dnl On Solaris Ipfilter includes expect that SOLARIS2 is defined with the
2625dnl Solaris minor version (8, 9, 10, ...)
2626 case "$host" in
2627 *-solaris*)
2628 solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'`
2629 CFLAGS="-DSOLARIS2=$solrev $CFLAGS"
20b3ae10 2630 CXXFLAGS="-DSOLARIS2=$solrev $CXXFLAGS"
8f6ca20d 2631 ;;
2632 *)
2633 ;;
2634 esac
5cafc1d6 2635fi
2636
2b0dd4ac 2637dnl PF support requires a header file.
2638if test "$PF_TRANSPARENT" ; then
2639 AC_MSG_CHECKING(if PF header file is installed)
2640 # hold on to your hats...
2641 if test "$ac_cv_header_net_pfvar_h" = "yes"; then
2642 PF_TRANSPARENT="yes"
2643 AC_DEFINE(PF_TRANSPARENT, 1)
2644 else
2645 PF_TRANSPARENT="no"
2646 AC_DEFINE(PF_TRANSPARENT, 0)
2647 fi
2648 AC_MSG_RESULT($PF_TRANSPARENT)
2649fi
2650if test "$PF_TRANSPARENT" = "no" ; then
2651 echo "WARNING: Cannot find necessary PF header file"
2652 echo " Transparent Proxy support WILL NOT be enabled"
2653 sleep 10
2654fi
2655
d852fbad 2656dnl Linux-Netfilter support requires Linux 2.4 kernel header files.
2657dnl Shamelessly copied from above
2658if test "$LINUX_NETFILTER" ; then
d6d62546 2659 AC_MSG_CHECKING(if Linux (Netfilter) kernel header files are installed)
d852fbad 2660 # hold on to your hats...
2661 if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes"; then
2662 LINUX_NETFILTER="yes"
2663 AC_DEFINE(LINUX_NETFILTER, 1)
2664 else
2665 LINUX_NETFILTER="no"
2666 AC_DEFINE(LINUX_NETFILTER, 0)
2667 fi
2668 AC_MSG_RESULT($LINUX_NETFILTER)
2669fi
2670if test "$LINUX_NETFILTER" = "no" ; then
d6d62546 2671 echo "WARNING: Cannot find necessary Linux kernel (Netfilter) header files"
2672 echo " Linux Transparent Proxy support WILL NOT be enabled"
d852fbad 2673 sleep 10
2674fi
2675
91bc414e 2676if test -z "$USE_GNUREGEX" ; then
2677 case "$host" in
2678 *-sun-solaris2.[[0-4]])
2679 USE_GNUREGEX="yes"
2680 ;;
2681 *-next-nextstep*)
2682 USE_GNUREGEX="yes"
2683 ;;
2684 esac
2685fi
7a081912 2686AC_MSG_CHECKING(if GNUregex needs to be compiled)
91bc414e 2687if test -z "$USE_GNUREGEX"; then
55878dfd 2688if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
74946a0f 2689 USE_GNUREGEX="yes"
00fa2c12 2690else
0cccc031 2691 AC_TRY_COMPILE([#include <sys/types.h>
2692#include <regex.h>],[regex_t t; regcomp(&t,"",0);],
91bc414e 2693 USE_GNUREGEX="no",
2694 USE_GNUREGEX="yes")
2695fi
00fa2c12 2696fi
74946a0f 2697AC_MSG_RESULT($USE_GNUREGEX)
2698if test "$USE_GNUREGEX" = "yes"; then
26675bf4 2699 REGEXLIB="-lregex"
7a081912 2700 LIBREGEX="libregex.a"
6a9f6389 2701 AC_DEFINE(USE_GNUREGEX,1,[Define if we should use GNU regex])
7a081912 2702fi
26675bf4 2703AC_SUBST(REGEXLIB)
00fa2c12 2704AC_SUBST(LIBREGEX)
7a081912 2705
3f6fcd8a 2706AC_REPLACE_FUNCS(\
3d0cf10e 2707 drand48 \
3f6fcd8a 2708 tempnam \
4d38fc7e 2709 strerror \
e3d74828 2710 initgroups
3f6fcd8a 2711)
2712
5c51415d 2713dnl Not cached since people are likely to tune this
e924600d 2714AC_MSG_CHECKING(Default FD_SETSIZE value)
2715AC_TRY_RUN([
2716#if HAVE_STDIO_H
2717#include <stdio.h>
2718#endif
2719#if HAVE_UNISTD_H
2720#include <unistd.h>
2721#endif
2722#if HAVE_SYS_TIME_H
2723#include <sys/time.h>
2724#endif
2725#if HAVE_SYS_SELECT_H
2726#include <sys/select.h>
2727#endif
2728#if HAVE_SYS_TYPES_H
2729#include <sys/types.h>
2730#endif
2731main() {
635e6242 2732 FILE *fp = fopen("conftestval", "w");
2733 fprintf (fp, "%d\n", FD_SETSIZE);
e924600d 2734 exit(0);
2735}
2736],
2737DEFAULT_FD_SETSIZE=`cat conftestval`,
2738DEFAULT_FD_SETSIZE=256,
2739DEFAULT_FD_SETSIZE=256)
2740AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
6a9f6389 2741AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, [Default FD_SETSIZE value])
e924600d 2742
f49be7d1 2743
5c51415d 2744dnl Not cached since people are likely to tune this
234967c9 2745AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
c76d8acc 2746dnl damn! FreeBSD's pthreads breaks dup2().
f49be7d1 2747if test -n "$squid_filedescriptors_num" ; then
2748 SQUID_MAXFD=$squid_filedescriptors_num
2749 AC_MSG_RESULT($SQUID_MAXFD (user-forced))
2750else
2751 TLDFLAGS="$LDFLAGS"
2752 case $host in
2753 i386-unknown-freebsd*)
2754 if echo "$LDFLAGS" | grep -q pthread; then
2755 LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
2756 fi
2757 esac
2758 AC_TRY_RUN([
8cca06da 2759#include <stdio.h>
234967c9 2760#include <unistd.h>
30a4f2a8 2761#include <sys/time.h> /* needed on FreeBSD */
234967c9 2762#include <sys/param.h>
2763#include <sys/resource.h>
2764main() {
635e6242 2765 FILE *fp;
234967c9 2766 int i,j;
42b51993 2767#if defined(__CYGWIN32__) || defined (__CYGWIN__)
b05490a8 2768 /* getrlimit and sysconf returns bogous values on cygwin32.
df087e68 2769 * Number of fds is virtually unlimited in cygwin (sys/param.h)
b05490a8 2770 * __CYGWIN32__ is deprecated.
df087e68 2771 */
2772 i = NOFILE;
b05490a8 2773#else
2774#if HAVE_SETRLIMIT
234967c9 2775 struct rlimit rl;
2776#if defined(RLIMIT_NOFILE)
2777 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
2778 perror("getrlimit: RLIMIT_NOFILE");
2779 } else {
2780 rl.rlim_cur = rl.rlim_max; /* set it to the max */
2781 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
2782 perror("setrlimit: RLIMIT_NOFILE");
2783 }
2784 }
2785#elif defined(RLIMIT_OFILE)
2786 if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
2787 perror("getrlimit: RLIMIT_OFILE");
2788 } else {
2789 rl.rlim_cur = rl.rlim_max; /* set it to the max */
2790 if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
2791 perror("setrlimit: RLIMIT_OFILE");
2792 }
2793 }
2794#endif /* RLIMIT_NOFILE */
2795#endif /* HAVE_SETRLIMIT */
d9399075 2796 /* by starting at 2^14, we will never get higher
2797 than 2^15 for SQUID_MAXFD */
2798 i = j = 1<<14;
2799 while (j) {
2800 j >>= 1;
2801 if (dup2(0, i) < 0) {
2802 i -= j;
2803 } else {
2804 close(i);
2805 i += j;
2806 }
2807 }
2808 i++;
b05490a8 2809#endif /* IF !DEF CYGWIN */
635e6242 2810 fp = fopen("conftestval", "w");
a4d7e961 2811 fprintf (fp, "%d\n", i & ~0x3F);
234967c9 2812 exit(0);
2813}
f49be7d1 2814 ],
2815 SQUID_MAXFD=`cat conftestval`,
2816 SQUID_MAXFD=256,
2817 SQUID_MAXFD=256)
4b26fae9 2818 dnl Microsoft MSVCRT.DLL supports 2048 maximum FDs
2819 case "$host_os" in
2820 mingw|mingw32)
2821 SQUID_MAXFD="2048"
2822 ;;
2823 esac
f49be7d1 2824 AC_MSG_RESULT($SQUID_MAXFD)
2825fi
6a9f6389 2826AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD,[Maximum number of open filedescriptors])
b9cc811d 2827if test "$SQUID_MAXFD" -lt 512 ; then
80ab193b 2828 echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
2829 echo " cache will be very busy. Please see the FAQ page"
2b6662ba 2830 echo " http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors"
e692ff35 2831 echo " on how to increase your filedescriptor limit"
933cc58d 2832 sleep 10
80ab193b 2833fi
c76d8acc 2834LDFLAGS="$TLDFLAGS"
234967c9 2835
d0f9207a 2836if test `expr $SQUID_MAXFD % 64` != 0; then
a4d7e961 2837 echo "WARNING: $SQUID_MAXFD is not an multiple of 64. This may cause issues"
2838 echo " on certain platforms."
2839 sleep 10
2840fi
2841
5c51415d 2842dnl Not cached since people are likely to tune this
30a4f2a8 2843AC_MSG_CHECKING(Default UDP send buffer size)
2844AC_TRY_RUN([
8cca06da 2845#include <stdlib.h>
2846#include <stdio.h>
30a4f2a8 2847#include <sys/types.h>
2848#include <sys/socket.h>
2849#include <netinet/in.h>
2850main ()
2851{
635e6242 2852 FILE *fp;
30a4f2a8 2853 int fd,val=0,len=sizeof(int);
2854 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
2855 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
2856 if (val<=0) exit(1);
635e6242 2857 fp = fopen("conftestval", "w");
2858 fprintf (fp, "%d\n", val);
30a4f2a8 2859 exit(0);
2860}
2861],
6a9f6389 2862SQUID_DETECT_UDP_SO_SNDBUF=`cat conftestval`,
2863SQUID_DETECT_UDP_SO_SNDBUF=16384,
2864SQUID_DETECT_UDP_SO_SNDBUF=16384)
2865AC_MSG_RESULT($SQUID_DETECT_UDP_SO_SNDBUF)
2866AC_DEFINE_UNQUOTED(SQUID_DETECT_UDP_SO_SNDBUF, $SQUID_DETECT_UDP_SO_SNDBUF,[UDP send buffer size])
30a4f2a8 2867
5c51415d 2868dnl Not cached since people are likely to tune this
30a4f2a8 2869AC_MSG_CHECKING(Default UDP receive buffer size)
2870AC_TRY_RUN([
8cca06da 2871#include <stdlib.h>
2872#include <stdio.h>
30a4f2a8 2873#include <sys/types.h>
2874#include <sys/socket.h>
2875#include <netinet/in.h>
2876main ()
2877{
635e6242 2878 FILE *fp;
30a4f2a8 2879 int fd,val=0,len=sizeof(int);
2880 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
2881 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
2882 if (val <= 0) exit(1);
635e6242 2883 fp = fopen("conftestval", "w");
2884 fprintf (fp, "%d\n", val);
30a4f2a8 2885 exit(0);
2886}
2887],
6a9f6389 2888SQUID_DETECT_UDP_SO_RCVBUF=`cat conftestval`,
2889SQUID_DETECT_UDP_SO_RCVBUF=16384,
2890SQUID_DETECT_UDP_SO_RCVBUF=16384)
2891AC_MSG_RESULT($SQUID_DETECT_UDP_SO_RCVBUF)
2892AC_DEFINE_UNQUOTED(SQUID_DETECT_UDP_SO_RCVBUF, $SQUID_DETECT_UDP_SO_RCVBUF,[UDP receive buffer size])
30a4f2a8 2893
5c51415d 2894dnl Not cached since people are likely to tune this
30a4f2a8 2895AC_MSG_CHECKING(Default TCP send buffer size)
2896AC_TRY_RUN([
8cca06da 2897#include <stdlib.h>
2898#include <stdio.h>
30a4f2a8 2899#include <sys/types.h>
2900#include <sys/socket.h>
2901#include <netinet/in.h>
2902main ()
2903{
635e6242 2904 FILE *fp;
30a4f2a8 2905 int fd,val=0,len=sizeof(int);
2906 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
2907 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
2908 if (val <= 0) exit(1);
635e6242 2909 fp = fopen("conftestval", "w");
2910 fprintf (fp, "%d\n", val);
30a4f2a8 2911 exit(0);
2912}
2913],
2914SQUID_TCP_SO_SNDBUF=`cat conftestval`,
1c481e00 2915SQUID_TCP_SO_SNDBUF=16384,
2916SQUID_TCP_SO_SNDBUF=16384)
30a4f2a8 2917AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF)
2aa6ca58 2918if test $SQUID_TCP_SO_SNDBUF -gt 32768; then
2919 echo "Limiting send buffer size to 32K"
2920 SQUID_TCP_SO_SNDBUF=32768
2921fi
6a9f6389 2922AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF,[TCP send buffer size])
30a4f2a8 2923
5c51415d 2924dnl Not cached since people are likely to tune this
30a4f2a8 2925AC_MSG_CHECKING(Default TCP receive buffer size)
2926AC_TRY_RUN([
8cca06da 2927#include <stdlib.h>
2928#include <stdio.h>
30a4f2a8 2929#include <sys/types.h>
2930#include <sys/socket.h>
2931#include <netinet/in.h>
2932main ()
2933{
635e6242 2934 FILE *fp;
30a4f2a8 2935 int fd,val=0,len=sizeof(int);
2936 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
2937 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
2938 if (val <= 0) exit(1);
635e6242 2939 fp = fopen("conftestval", "w");
2940 fprintf (fp, "%d\n", val);
30a4f2a8 2941 exit(0);
2942}
2943],
2944SQUID_TCP_SO_RCVBUF=`cat conftestval`,
1c481e00 2945SQUID_TCP_SO_RCVBUF=16384,
2946SQUID_TCP_SO_RCVBUF=16384)
30a4f2a8 2947AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF)
2aa6ca58 2948if test $SQUID_TCP_SO_RCVBUF -gt 65535; then
2949 echo "Limiting receive buffer size to 64K"
2950 SQUID_TCP_SO_RCVBUF=65535
2951fi
6a9f6389 2952AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF,[TCP receive buffer size])
5c51415d 2953AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist,
9bc73deb 2954 AC_TRY_COMPILE([#include <stdio.h>],[char *s = sys_errlist;],
5c51415d 2955 ac_cv_needs_sys_errlist="no",
2956 ac_cv_needs_sys_errlist="yes")
2957)
2958if test "$ac_cv_needs_sys_errlist" = "yes" ; then
6a9f6389 2959 AC_DEFINE(NEED_SYS_ERRLIST,1,[If we need to declare sys_errlist[] as external])
5c51415d 2960fi
30a4f2a8 2961
5c51415d 2962dnl Not cached since people are likely to change this
6bf65235 2963AC_MSG_CHECKING(for libresolv _dns_ttl_ hack)
2964AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;,
2965[AC_MSG_RESULT(yes)
6a9f6389 2966AC_DEFINE(LIBRESOLV_DNS_TTL_HACK,1,[If libresolv.a has been hacked to export _dns_ttl_])],
6bf65235 2967AC_MSG_RESULT(no))
2968
a937d5e3 2969AC_MSG_CHECKING(if inet_ntoa() actually works)
2970AC_TRY_RUN([
2971#include <stdlib.h>
2972#include <stdio.h>
2973#include <sys/types.h>
2974#include <netinet/in.h>
2975#include <arpa/inet.h>
2976main ()
2977{
635e6242 2978 FILE *fp;
a937d5e3 2979 struct in_addr in;
2980 in.s_addr = inet_addr("1.2.3.4");
635e6242 2981 fp = fopen("conftestval", "w");
2982 fprintf (fp, "%s\n", inet_ntoa(in));
a937d5e3 2983 exit(0);
2984}
2985],
2986INET_NTOA_RESULT=`cat conftestval`,
2987INET_NTOA_RESULT="broken",
2988INET_NTOA_RESULT="broken")
2989if test "$INET_NTOA_RESULT" = "1.2.3.4" ; then
2990 AC_MSG_RESULT("yes")
2991else
2992 AC_MSG_RESULT("no")
4b26fae9 2993 case "$host_os" in
2994 mingw|mingw32)
2995 echo "Using Win32 resolver instead."
2996 ;;
2997 *)
2998 echo "Will use our own inet_ntoa()."
2999 AC_LIBOBJ(inet_ntoa)
3000# echo "WARNING: This looks bad, and probably prevents Squid from working."
3001# echo " If you're on IRIX and using GCC 2.8, you probably need"
3002# echo " to use the IRIX C compiler instead."
3003# sleep 10
3004 ;;
3005 esac
a937d5e3 3006fi
3007
b6a2f15e 3008if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
c68e9c6b 3009AC_MSG_CHECKING(for working statvfs() interface)
3010AC_TRY_COMPILE([
3011#include <stdlib.h>
3012#include <stdio.h>
3013#include <sys/types.h>
3014#include <sys/statvfs.h>
3015],
3016[
3017struct statvfs sfs;
3018sfs.f_blocks = sfs.f_bfree = sfs.f_frsize =
3019sfs.f_files = sfs.f_ffree = 0;
3020statvfs("/tmp", &sfs);
3021],
3022 ac_cv_func_statvfs=yes,
3023 ac_cv_func_statvfs=no)
3024AC_MSG_RESULT($ac_cv_func_statvfs)
6b8e7481 3025if test "$ac_cv_func_statvfs" = "yes" ; then
6a9f6389 3026 AC_DEFINE(HAVE_STATVFS,1,[If your system has statvfs(), and if it actually works!])
b6a2f15e 3027fi
6b8e7481 3028fi
c68e9c6b 3029
3030AC_CACHE_CHECK(for _res.nsaddr_list, ac_cv_have_res_nsaddr_list,
3031AC_TRY_COMPILE([
3032#if HAVE_SYS_TYPES_H
3033#include <sys/types.h>
3034#endif
3035#if HAVE_NETINET_IN_H
3036#include <netinet/in.h>
3037#endif
3038#if HAVE_ARPA_INET_H
3039#include <arpa/inet.h>
3040#endif
3041#if HAVE_ARPA_NAMESER_H
3042#include <arpa/nameser.h>
3043#endif
3044#if HAVE_RESOLV_H
3045#include <resolv.h>
3046#endif
3047],
3048[_res.nsaddr_list[[0]];],
3049ac_cv_have_res_nsaddr_list="yes",
3050ac_cv_have_res_nsaddr_list="no"))
3051if test $ac_cv_have_res_nsaddr_list = "yes" ; then
6a9f6389 3052 AC_DEFINE(HAVE_RES_NSADDR_LIST,1,[If _res structure has nsaddr_list member])
c68e9c6b 3053fi
3054
3055if test $ac_cv_have_res_nsaddr_list = "no" ; then
3056AC_CACHE_CHECK(for _res.ns_list, ac_cv_have_res_ns_list,
3057AC_TRY_COMPILE([
3058#if HAVE_SYS_TYPES_H
3059#include <sys/types.h>
3060#endif
3061#if HAVE_NETINET_IN_H
3062#include <netinet/in.h>
3063#endif
3064#if HAVE_ARPA_INET_H
3065#include <arpa/inet.h>
3066#endif
3067#if HAVE_ARPA_NAMESER_H
3068#include <arpa/nameser.h>
3069#endif
3070#if HAVE_RESOLV_H
3071#include <resolv.h>
3072#endif
3073],
3074[_res.ns_list[[0]].addr;],
3075ac_cv_have_res_ns_list="yes",
3076ac_cv_have_res_ns_list="no"))
3077if test $ac_cv_have_res_ns_list = "yes" ; then
6a9f6389 3078 AC_DEFINE(HAVE_RES_NS_LIST,1,[If _res structure has ns_list member])
c68e9c6b 3079fi
3080fi
3081
090089c4 3082dnl Need the debugging version of malloc if available
3083XTRA_OBJS=''
6509a1a0 3084if test "$ac_cv_lib_malloc_main" = "yes" ; then
090089c4 3085 if test -r /usr/lib/debug/malloc.o ; then
3086 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
3087 fi
3088 if test -r /usr/lib/debug/mallocmap.o ; then
3089 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
3090 fi
3091fi
2bbd722b 3092
090089c4 3093AC_SUBST(XTRA_OBJS)
3094
38fea766 3095if test -z "$XTRA_LIBS"; then
3096 XTRA_LIBS="$LIBS"
0f5a16f8 3097 dnl minor cleanup
3098 XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/ */ /g"`
38fea766 3099 LIBS=''
3100fi
090089c4 3101AC_SUBST(XTRA_LIBS)
3102
090089c4 3103dnl Clean up after OSF/1 core dump bug
3104rm -f core
3105
6a9f6389 3106AC_CONFIG_FILES([\
a2794549 3107 Makefile \
3108 lib/Makefile \
a2794549 3109 scripts/Makefile \
3110 scripts/RunCache \
3111 scripts/RunAccel \
3112 src/Makefile \
3113 src/fs/Makefile \
3114 src/repl/Makefile \
3115 src/auth/Makefile \
a2794549 3116 contrib/Makefile \
3117 snmplib/Makefile \
3118 icons/Makefile \
3119 errors/Makefile \
1077c1b8 3120 test-suite/Makefile \
99db07b3 3121 doc/Makefile \
0c510f3c 3122 helpers/Makefile \
3123 helpers/basic_auth/Makefile \
3124 helpers/basic_auth/LDAP/Makefile \
3125 helpers/basic_auth/MSNT/Makefile \
3126 helpers/basic_auth/NCSA/Makefile \
3127 helpers/basic_auth/PAM/Makefile \
3128 helpers/basic_auth/SMB/Makefile \
6e785d85 3129 helpers/basic_auth/mswin_sspi/Makefile \
0c510f3c 3130 helpers/basic_auth/YP/Makefile \
3131 helpers/basic_auth/getpwnam/Makefile \
3132 helpers/basic_auth/multi-domain-NTLM/Makefile \
3133 helpers/basic_auth/SASL/Makefile \
0c510f3c 3134 helpers/digest_auth/Makefile \
3135 helpers/digest_auth/password/Makefile \
55013f9c 3136 helpers/digest_auth/ldap/Makefile \
0c510f3c 3137 helpers/ntlm_auth/Makefile \
3138 helpers/ntlm_auth/fakeauth/Makefile \
3139 helpers/ntlm_auth/no_check/Makefile \
3140 helpers/ntlm_auth/SMB/Makefile \
3141 helpers/ntlm_auth/SMB/smbval/Makefile \
6e785d85 3142 helpers/ntlm_auth/mswin_sspi/Makefile \
3143 helpers/negotiate_auth/Makefile \
3144 helpers/negotiate_auth/mswin_sspi/Makefile \
c6588c68 3145 helpers/external_acl/Makefile \
3146 helpers/external_acl/ip_user/Makefile \
3147 helpers/external_acl/ldap_group/Makefile \
74ab8d10 3148 helpers/external_acl/session/Makefile \
c6588c68 3149 helpers/external_acl/unix_group/Makefile \
736a9a4d 3150 helpers/external_acl/wbinfo_group/Makefile \
94ab55b0 3151 helpers/external_acl/mswin_lm_group/Makefile \
3152 tools/Makefile
53cbe3e4 3153])
43ae1d95 3154
3155AC_CONFIG_SUBDIRS(lib/libTrie)
f5691f9c 3156AC_CONFIG_SUBDIRS(lib/cppunit-1.10.0)
43ae1d95 3157
6a9f6389 3158AC_OUTPUT