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