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