2 dnl Configuration input file for Squid
4 dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
6 dnl $Id: configure.in,v 1.213 2001/01/10 21:07:07 hno Exp $
11 AC_CONFIG_HEADER(include/autoconf.h)
12 AC_REVISION($Revision: 1.213 $)dnl
13 AC_PREFIX_DEFAULT(/usr/local/squid)
14 AC_CONFIG_AUX_DIR(cfgaux)
20 LIBREGEX='' # libregex.a
22 dnl use directory structure of cached as default (hack)
23 if test "$libexecdir" = '${exec_prefix}/libexec' &&
24 test "$localstatedir" = '${prefix}/var'; then
25 libexecdir='${bindir}'
26 localstatedir='${prefix}'
30 dnl use .exe suffix for executables on cygwin32 platform
44 if test -z "$CACHE_HTTP_PORT"; then
45 CACHE_HTTP_PORT="3128"
47 if test -z "$CACHE_ICP_PORT"; then
52 AC_SUBST(CACHE_HTTP_PORT)
53 AC_SUBST(CACHE_ICP_PORT)
55 AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host")
57 dnl Set default LDFLAGS
58 if test -z "$LDFLAGS"; then
62 PRESET_CFLAGS="$CFLAGS"
67 dnl Gerben Wierda <Gerben_Wierda@RnA.nl>
70 CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
74 dnl Set Default CFLAGS
75 if test -z "$PRESET_CFLAGS"; then
76 if test "$GCC" = "yes"; then
79 # sunos has too many warnings for this to be useful
83 # Motorola cc/ld does not like -02 but is ok on -O
84 CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
87 CFLAGS="$CFLAGS -Wall"
93 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
94 CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
95 -woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
96 -Wl,-woff,85,-woff,84,-woff,134 \
97 -nostdinc -I/usr/include -D_BSD_SIGNALS"
100 # Mogul says DEC compilers take both -g and -O2
101 CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
111 if test -z "$PRESET_LDFLAGS"; then
112 if test "$GCC" = "yes"; then
121 # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
122 LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
128 dnl Enable optional modules
129 AC_ARG_ENABLE(dlmalloc,
130 [ --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea],
135 LIBDLMALLOC="libdlmalloc.a"
136 LIB_MALLOC="-L../lib -ldlmalloc"
137 echo "dlmalloc enabled"
141 echo "dlmalloc disabled"
143 *) use_dlmalloc="yes"
144 LIB_MALLOC="$enableval"
145 echo "dlmalloc enabled with $LIB_MALLOC"
148 if test "${use_dlmalloc-unset}" = unset; then
151 echo "Enabling dlmalloc for $host"
153 LIBDLMALLOC="libdlmalloc.a"
154 LIB_MALLOC="-L../lib -ldlmalloc"
158 if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
159 # Ok. dlmalloc was enabled before, but state may be changed.
160 # we have to test these again
161 unset ac_cv_func_mallinfo
162 unset ac_cv_func_mallocblksize
163 unset ac_cv_func_free
164 unset ac_cv_func_realloc
165 unset ac_cv_func_memalign
166 unset ac_cv_func_valloc
167 unset ac_cv_func_pvalloc
168 unset ac_cv_func_calloc
169 unset ac_cv_func_cfree
170 unset ac_cv_func_malloc_trim
171 unset ac_cv_func_malloc_usable_size
172 unset ac_cv_func_malloc_stats
173 unset ac_cv_func_mallinfo
174 unset ac_cv_func_mallopt
175 unset ac_cv_lib_gnumalloc
176 unset ac_cv_header_gnumalloc_h
177 unset ac_cv_lib_malloc
178 unset ac_cv_enabled_dlmalloc
180 if test "$use_dlmalloc" = yes; then
181 ac_cv_func_mallinfo="yes"
182 ac_cv_func_mallocblksize="no"
183 ac_cv_func_free="yes"
184 ac_cv_func_realloc="yes"
185 ac_cv_func_memalign="yes"
186 ac_cv_func_valloc="yes"
187 ac_cv_func_pvalloc="yes"
188 ac_cv_func_calloc="yes"
189 ac_cv_func_cfree="yes"
190 ac_cv_func_malloc_trim="yes"
191 ac_cv_func_malloc_usable_size="yes"
192 ac_cv_func_malloc_stats="yes"
193 ac_cv_func_mallopt="yes"
194 ac_cv_lib_gnumalloc="no"
195 ac_cv_header_gnumalloc_h="no"
196 ac_cv_lib_malloc="no"
197 ac_cv_enabled_dlmalloc="yes"
200 AC_SUBST(LIBDLMALLOC)
203 AC_ARG_ENABLE(gnuregex,
204 [ --enable-gnuregex Compile GNUregex],
205 [USE_GNUREGEX=$enableval])
207 AC_ARG_ENABLE(xmalloc-debug,
208 [ --enable-xmalloc-debug Do some simple malloc debugging],
209 [ if test "$enableval" = "yes" ; then
210 echo "Malloc debugging enabled"
211 AC_DEFINE(XMALLOC_DEBUG)
215 AC_ARG_ENABLE(xmalloc-debug-trace,
216 [ --enable-xmalloc-debug-trace
217 Detailed trace of memory allocations],
218 [ if test "$enableval" = "yes" ; then
219 echo "Malloc debug trace enabled"
220 AC_DEFINE(XMALLOC_TRACE)
221 AC_DEFINE(XMALLOC_DEBUG)
225 AC_ARG_ENABLE(xmalloc-statistics,
226 [ --enable-xmalloc-statistics
227 Show malloc statistics in status page],
228 [ if test "$enableval" = "yes" ; then
229 echo "Malloc statistics enabled"
230 AC_DEFINE(XMALLOC_STATISTICS)
235 [ --enable-carp Enable CARP support],
236 [ if test "$enableval" = "yes" ; then
237 echo "CARP support enabled"
242 AC_ARG_ENABLE(async-io,
243 [ --enable-async-io[=N_THREADS]
245 --with-aio-threads=N_THREADS
247 --enable-storeio=ufs,aufs],
251 STORE_MODULES="ufs aufs"
256 async_io_threads=$enableval
258 STORE_MODULES="ufs aufs"
263 AC_ARG_WITH(aio-threads,
264 [ --with-aio-threads=N_THREADS
265 Tune the number of worker threads for the aufs object
267 [ async_io_threads=$withval ])
268 if test "$async_io_threads"; then
269 echo "With $async_io_threads AIO threads"
271 AC_DEFINE_UNQUOTED(ASYNC_IO_THREADS,$async_io_threads)
274 AC_ARG_WITH(pthreads,
275 [ --with-pthreads Use POSIX Threads],
276 [ if test "$enableval" = "yes"; then
280 if test "$with_pthreads"; then
282 SQUID_PTHREAD_LIB='$(PTHREADLIB)'
283 CFLAGS="$CFLAGS -D_REENTRANT"
285 i386-unknown-freebsd*)
286 if test "$GCC" = "yes" ; then
287 if test -z "$PRESET_LDFLAGS"; then
288 LDFLAGS="$LDFLAGS -pthread"
294 AC_SUBST(SQUID_PTHREAD_LIB)
296 AC_ARG_ENABLE(storeio,
297 [ --enable-storeio=\"list of modules\"
298 Build support for the list of store I/O modules.
299 The default is only to build the "ufs" module.
300 See src/fs for a list of available modules, or
301 Programmers Guide section <not yet written>
302 for details on how to build your custom store module],
305 for module in $srcdir/src/fs/*; do
306 if test -f $module/Makefile.in; then
307 STORE_MODULES="$STORE_MODULES `basename $module`"
313 *) STORE_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
317 [ if test -z "$STORE_MODULES"; then
321 echo "Store modules built: $STORE_MODULES"
322 AC_SUBST(STORE_MODULES)
323 STORE_OBJS="fs/`echo $STORE_MODULES|sed -e's% %.a fs/%g'`.a"
325 STORE_LIBS="`echo $STORE_OBJS|sed -e's%fs/%%g'`"
328 dnl --enable-heap-replacement compability option
329 AC_ARG_ENABLE(heap-replacement,
330 [ --enable-heap-replacement
331 Backwards compability option. Please use the
332 new --enable-removal-policies directive instead.],
333 [ if test "$enableval" = "yes" ; then
334 echo "--enable-heap-replacement is obsolete. please use the new"
335 echo "--enable-removal-policies directive instead"
341 AC_ARG_ENABLE(removal-policies,
342 [ --enable-removal-policies=\"list of policies\"
343 Build support for the list of removal policies.
344 The default is only to build the "lru" module.
345 See src/repl for a list of available modules, or
346 Programmers Guide section 9.9 for details on how
347 to build your custom policy],
350 for module in $srcdir/src/repl/*; do
351 if test -f $module/Makefile.in; then
352 REPL_POLICIES="$REPL_POLICIES `basename $module`"
358 *) REPL_POLICIES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
362 [ if test -z "$REPL_POLICIES"; then
366 echo "Removal policies built: $REPL_POLICIES"
367 AC_SUBST(REPL_POLICIES)
368 REPL_OBJS="repl/`echo $REPL_POLICIES|sed -e's% %.a repl/%g'`.a"
370 REPL_LIBS="`echo $REPL_OBJS|sed -e's%repl/%%g'`"
375 [ --enable-icmp Enable ICMP pinging],
376 [ if test "$enableval" = "yes" ; then
379 OPT_PINGER_EXE='$(OPT_PINGER_EXE)'
382 AC_SUBST(OPT_PINGER_EXE)
384 AC_ARG_ENABLE(delay-pools,
385 [ --enable-delay-pools Enable delay pools to limit bandwith usage],
386 [ if test "$enableval" = "yes" ; then
387 echo "Delay pools enabled"
388 DELAY_OBJS='$(DELAY_OBJS)'
389 AC_DEFINE(DELAY_POOLS)
394 AC_ARG_ENABLE(mem-gen-trace,
395 [ --enable-mem-gen-trace Do trace of memory stuff],
396 [ if test "$enableval" = "yes" ; then
397 echo "Memory trace (to file) enabled"
398 AC_DEFINE(MEM_GEN_TRACE)
402 AC_ARG_ENABLE(useragent-log,
403 [ --enable-useragent-log Enable logging of User-Agent header],
404 [ if test "$enableval" = "yes" ; then
405 echo "User-Agent logging enabled"
406 AC_DEFINE(USE_USERAGENT_LOG)
410 AC_ARG_ENABLE(referer-log,
411 [ --enable-referer-log Enable logging of Referer header],
412 [ if test "$enableval" = "yes" ; then
413 echo "Referer logging enabled"
414 AC_DEFINE(USE_REFERER_LOG)
419 [ --disable-wccp Disable Web Cache Coordination Protocol],
420 [ if test "$enableval" = "no" ; then
421 echo "Web Cache Coordination Protocol disabled"
422 AC_DEFINE(USE_WCCP, 0)
424 AC_DEFINE(USE_WCCP, 1)
428 AC_ARG_ENABLE(kill-parent-hack,
429 [ --enable-kill-parent-hack
430 Kill parent on shutdown],
431 [ if test "$enableval" = "yes" ; then
432 echo "Kill parent on shutdown"
433 AC_DEFINE(KILL_PARENT_OPT)
438 [ --enable-snmp Enable SNMP monitoring],
439 [ if test "$enableval" = "yes" ; then
440 echo "SNMP monitoring enabled"
441 AC_DEFINE(SQUID_SNMP)
442 SNMPLIB='-L../snmplib -lsnmp'
443 SNMP_OBJS='$(SNMP_OBJS)'
444 SNMP_MAKEFILE=./snmplib/Makefile
450 AC_SUBST(makesnmplib)
452 AC_ARG_ENABLE(time-hack,
453 [ --enable-time-hack Update internal timestamp only once per second],
454 [ if test "$enableval" = "yes" ; then
455 echo "Update internal timestamp only once per second"
456 AC_DEFINE(ALARM_UPDATES_TIME)
460 AC_ARG_ENABLE(cachemgr-hostname,
461 [ --enable-cachemgr-hostname[=hostname]
462 Make cachemgr.cgi default to this host],
465 AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()])
466 echo "Cachemgr default hostname == host where cachemgr runs"
472 AC_DEFINE_UNQUOTED(CACHEMGR_HOSTNAME,"${enableval}")
473 echo "Cachemgr default hostname set to ${enableval}"
478 AC_ARG_ENABLE(arp-acl,
479 [ --enable-arp-acl Enable use of ARP ACL lists (ether address)],
480 [ if test "$enableval" = "yes" ; then
481 echo "ARP ACL lists enabled (ether address)"
486 echo "WARNING: ARP ACL support is only currently supported on Linux"
487 echo " ethernet interfaces, probably won't work on $host."
491 AC_DEFINE(USE_ARP_ACL)
496 [ --enable-htcp Enable HTCP protocol],
497 [ if test "$enableval" = "yes" ; then
499 HTCP_OBJS='$(HTCP_OBJS)'
505 AC_ARG_ENABLE(forw-via-db,
506 [ --enable-forw-via-db Enable Forw/Via database],
507 [ if test "$enableval" = "yes" ; then
508 echo "FORW-VIA enabled"
509 AC_DEFINE(FORW_VIA_DB)
513 AC_ARG_ENABLE(cache-digests,
514 [ --enable-cache-digests Use Cache Digests
515 see http://squid.nlanr.net/Squid/FAQ/FAQ-16.html],
516 [ if test "$enableval" = "yes" ; then
517 echo "USE_CACHE_DIGESTS enabled"
518 AC_DEFINE(USE_CACHE_DIGESTS)
522 dnl Select Error language
523 AC_ARG_ENABLE(err-language,
524 [ --enable-err-language=lang
525 Select language for Error pages (see errors dir) ],
527 if test -d $srcdir/errors/$enableval; then
528 ERR_LANGUAGE=$enableval
530 echo "ERROR! Unknown language $enableval, see errors/"
533 ],[ERR_LANGUAGE="English"])
534 AC_SUBST(ERR_LANGUAGE)
536 dnl Size of COSS memory buffer
537 AC_ARG_WITH(coss-membuf-size,
538 [ --with-coss-membuf-size COSS membuf size (default 1048576 bytes) ],
539 [ if test "$with_coss_membuf_size"; then
540 echo "Setting COSS membuf size to $with_coss_membuf_size bytes"
541 AC_DEFINE_UNQUOTED(COSS_MEMBUF_SZ, $with_coss_membuf_size)
547 [ --enable-poll Enable poll() instead of select(). Normally poll
548 is preferred over select, but configure knows poll
549 is broken on some platforms. If you think you are
550 smarter than the configure script, you may enable
551 poll with this option.
552 --disable-poll Disable the use of poll().],
556 echo "Forcing poll() to be enabled"
557 ac_cv_func_poll='yes'
560 echo "Forcing poll() to be disabled"
566 dnl Disable HTTP violations
567 AC_ARG_ENABLE(http-violations,
568 [ --disable-http-violations
569 This allows you to remove code which is known to
570 violate the HTTP protocol specification.],
571 [ if test "$enableval" = "no" ; then
572 echo "Disabling HTTP Violations"
573 AC_DEFINE(HTTP_VIOLATIONS, 0)
575 AC_DEFINE(HTTP_VIOLATIONS, 1)
579 dnl Enable IP-Filter Transparent Proxy
580 AC_ARG_ENABLE(ipf-transparent,
581 [ --enable-ipf-transparent
582 Enable Transparent Proxy support for systems
583 using IP-Filter network address redirection.],
584 [ if test "$enableval" = "yes" ; then
585 echo "IP-Filter Transparent Proxy enabled"
586 AC_DEFINE(IPF_TRANSPARENT)
587 IPF_TRANSPARENT="yes"
591 dnl Enable Linux Netfilter (2.4) Transparent Proxy
592 AC_ARG_ENABLE(linux-netfilter,
593 [ --enable-linux-netfilter
594 Enable Transparent Proxy support for Linux 2.4.],
595 [ if test "$enableval" = "yes" ; then
596 echo "Linux-Netfilter Transparent Proxy enabled"
597 AC_DEFINE(LINUX_NETFILTER)
598 LINUX_NETFILTER="yes"
602 dnl Enable Leak Finding Functions
603 AC_ARG_ENABLE(leakfinder,
604 [ --enable-leakfinder
605 Enable Leak Finding code. Enabling this alone
606 does nothing; you also have to modify the source
607 code to use the leak finding functions. Probably
608 Useful for hackers only.],
609 [ if test "$enableval" = "yes" ; then
610 echo "Leak-Finding enabled"
611 AC_DEFINE(USE_LEAKFINDER)
612 LEAKFINDER_OBJS='$(LEAKFINDER_OBJS)'
616 AC_SUBST(LEAKFINDER_OBJS)
618 AC_ARG_ENABLE(ident-lookups,
619 [ --disable-ident-lookups
620 This allows you to remove code that performs
621 Ident (RFC 931) lookups.],
622 [ if test "$enableval" = "no" ; then
623 echo "Disabling Ident Lookups"
624 AC_DEFINE(USE_IDENT, 0)
626 AC_DEFINE(USE_IDENT, 1)
631 AC_ARG_ENABLE(internal-dns,
632 [ --disable-internal-dns This prevents Squid from directly sending and
633 receiving DNS messages, and instead enables the
634 old external 'dnsserver' processes.],
635 [ if test "$enableval" = "no" ; then
636 echo "Disabling Internal DNS queries"
640 if test "$use_dnsserver" = "yes"; then
641 AC_DEFINE(USE_DNSSERVERS)
642 OPT_DNSSERVER_EXE='$(OPT_DNSSERVER_EXE)'
646 DNS_OBJS='dns_internal.o'
648 AC_SUBST(OPT_DNSSERVER_EXE)
652 AC_ARG_ENABLE(truncate,
653 [ --enable-truncate This uses truncate() instead of unlink() when
654 removing cache files. Truncate gives a little
655 performance improvement, but may cause problems
656 when used with async I/O. Truncate uses more
657 filesystem inodes than unlink..],
658 [ if test "$enableval" = "yes" ; then
659 echo "Enabling truncate instead of unlink"
660 AC_DEFINE(USE_TRUNCATE)
664 dnl Enable underscore in hostnames
665 AC_ARG_ENABLE(underscores,
666 [ --enable-underscores Squid by default rejects any host names with _
667 in their name to conform with internet standars.
668 If you disagree with this you may allow _ in
669 hostnames by using this switch, provided that
670 the resolver library on the host where Squid runs
671 does not reject _ in hostnames...],
672 [ if test "$enableval" = "yes" ; then
673 echo "Enabling the use of underscores in host names"
674 AC_DEFINE(ALLOW_HOSTNAME_UNDERSCORES, 1)
679 dnl Select auth schemes modules to build
681 [ --enable-auth=\"list of auth scheme modules\"
682 Build support for the list of authentication schemes.
683 The default is to build support for the Basic scheme.
684 See src/auth for a list of available modules, or
685 Programmers Guide section authentication schemes
686 for details on how to build your custom auth scheme
690 for module in $srcdir/src/auth/*; do
691 if test -f $module/Makefile.in; then
692 AUTH_MODULES="$AUTH_MODULES `basename $module`"
698 *) AUTH_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
702 [ if test -z "$AUTH_MODULES"; then
706 echo "Auth scheme modules built: $AUTH_MODULES"
707 AC_SUBST(AUTH_MODULES)
708 AUTH_OBJS="auth/`echo $AUTH_MODULES|sed -e's% %.a auth/%g'`.a"
710 AUTH_LIBS="`echo $AUTH_OBJS|sed -e's%auth/%%g'`"
713 dnl Select basic auth scheme helpers to build
714 BASIC_AUTH_HELPERS=""
715 AC_ARG_ENABLE(auth-modules,
716 [ --enable-auth-modules=\"list of helpers\"
717 Backwards compability alias for
718 --enable-basic-auth-helpers],
719 [ echo "--enable-auth-modules is obsolete. Please use the new"
720 echo "option --enable-basic-auth-helpers"
724 for helper in $srcdir/src/auth/basic/helpers/*; do
725 if test -f $helper/Makefile.in; then
726 AUTH_BASIC_HELPERS="$AUTH_BASIC_HELPERS `basename $helper`"
733 AUTH_BASIC_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
736 AC_ARG_ENABLE(basic-auth-helpers,
737 [ --enable-basic-auth-helpers=\"list of helpers\"
738 This option selects which basic scheme proxy_auth
739 helpers to build and install as part of the normal
740 build process. For a list of available
741 helpers see the src/auth/basic/helpers directory.],
742 [ case "$enableval" in
744 BASIC_AUTH_HELPERS=""
745 for helper in $srcdir/src/auth/basic/helpers/*; do
746 if test -f $helper/Makefile.in; then
747 AUTH_BASIC_HELPERS="$AUTH_BASIC_HELPERS `basename $helper`"
754 AUTH_BASIC_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
757 if test -n "$AUTH_BASIC_HELPERS"; then
758 echo "Basic auth helpers built: $AUTH_BASIC_HELPERS"
760 AC_SUBST(AUTH_BASIC_HELPERS)
762 dnl Select ntlm auth helpers to build
764 AC_ARG_ENABLE(ntlm-auth-helpers,
765 [ --enable-ntlm-auth-helpers=\"list of helpers\"
766 This option selects which proxy_auth ntlm helpers
767 to build and install as part of the normal build
768 process. For a list of available modules see
769 the src/auth/ntlm/helpers directory.],
770 [ case "$enableval" in
772 for helper in $srcdir/src/auth/ntlm/helpers/*; do
773 if test -f $helper/Makefile.in; then
774 NTLM_AUTH_HELPERS="$NTLM_AUTH_HELPERS `basename $helper`"
781 NTLM_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
784 if test -n "$NTLM_AUTH_HELPERS"; then
785 echo "NTLM auth helpers built: $NTLM_AUTH_HELPERS"
787 AC_SUBST(NTLM_AUTH_HELPERS)
790 dnl Disable "unlinkd" code
791 AC_ARG_ENABLE(unlinkd,
792 [ --disable-unlinkd Do not use unlinkd],
793 [ if test "$enableval" = "no" ; then
799 # Here we should probably use some magic depending on the selected
803 if test "$use_unlinkd" = "yes"; then
804 echo "unlinkd enabled"
805 AC_DEFINE(USE_UNLINKD)
806 OPT_UNLINKD_EXE='$(OPT_UNLINKD_EXE)'
807 UNLINKD_OBJS='unlinkd.o'
809 echo "unlinkd disabled"
813 AC_SUBST(OPT_UNLINKD_EXE)
814 AC_SUBST(UNLINKD_OBJS)
816 dnl Enable backtraces on fatal errors
817 AC_ARG_ENABLE(stacktraces,
818 [ --enable-stacktraces Enable automatic call backtrace on fatal errors],
819 [ if test "$enableval" = "yes" ; then
820 echo "Enabling automatic stack backtraces on fatal errors"
821 AC_DEFINE(PRINT_STACK_TRACE, 1)
825 # Force some compilers to use ANSI features
829 if test "$ac_cv_prog_CC" = "cc" ; then
830 echo "adding '-std1' to cc args for $host"
836 if test "$ac_cv_prog_CC" = "cc" ; then
837 echo "adding '-Ae' to cc args for $host"
844 dnl Check for programs
849 AC_PATH_PROG(SH, sh, /bin/sh)
850 AC_PATH_PROG(FALSE, false, /usr/bin/false)
851 AC_PATH_PROG(TRUE, true, /usr/bin/true)
852 AC_PATH_PROG(RM, rm, $FALSE)
853 AC_PATH_PROG(MV, mv, $FALSE)
854 AC_PATH_PROG(MKDIR, mkdir, $FALSE)
855 AC_PATH_PROG(LN, ln, cp)
856 AC_PATH_PROG(PERL, perl, none)
857 AC_PATH_PROG(MAKEDEPEND, makedepend, $TRUE)
858 AC_PATH_PROG(AR, ar, $FALSE)
860 if test "$ac_cv_path_PERL" = "none"; then
861 echo "Perl is required to compile Squid"
862 echo "Please install Perl and then re-run configure"
868 echo "Disabling 'ranlib' for HP-UX..."
882 dnl Check for headers
906 linux/netfilter_ipv4.h \
916 netinet/ip_compat.h \
917 netinet/ip_fil_compat.h \
957 AC_CACHE_CHECK(if ANSI prototypes work,ac_cv_have_ansi_prototypes, [
958 AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}],
960 ac_cv_have_ansi_prototypes="yes",
961 ac_cv_have_ansi_prototypes="no")
963 if test $ac_cv_have_ansi_prototypes = "yes" ; then
964 AC_DEFINE(HAVE_ANSI_PROTOTYPES)
967 AC_CACHE_CHECK(for tm->tm_gmtoff,ac_cv_have_tm_gmoff, [
968 AC_TRY_COMPILE([#include <time.h>
969 #include <sys/time.h>],
972 ac_cv_have_tm_gmoff="yes",
973 ac_cv_have_tm_gmoff="no")
975 if test $ac_cv_have_tm_gmoff = "yes" ; then
976 AC_DEFINE(HAVE_TM_GMTOFF)
979 AC_CACHE_CHECK(for struct mallinfo,ac_cv_have_struct_mallinfo, [
980 AC_TRY_COMPILE([#include <sys/types.h>
984 [struct mallinfo foo;
993 ac_cv_have_struct_mallinfo="yes",
994 ac_cv_have_struct_mallinfo="no")
996 if test $ac_cv_have_struct_mallinfo = "yes" ; then
997 AC_DEFINE(HAVE_STRUCT_MALLINFO)
1000 AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [
1001 AC_TRY_COMPILE([#include <sys/types.h>
1002 #include <malloc.h>],
1003 [struct mallinfo foo;
1005 ac_cv_have_ext_mallinfo="yes",
1006 ac_cv_have_ext_mallinfo="no")
1008 if test $ac_cv_have_ext_mallinfo = "yes" ; then
1009 AC_DEFINE(HAVE_EXT_MALLINFO)
1012 AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [
1015 #include <sys/time.h>
1017 #if HAVE_SYS_RESOURCE_H
1018 #include <sys/resource.h>
1021 ac_cv_have_struct_rusage="yes",
1022 ac_cv_have_struct_rusage="no")
1024 if test $ac_cv_have_struct_rusage = "yes" ; then
1025 AC_DEFINE(HAVE_STRUCT_RUSAGE)
1028 AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [
1029 AC_TRY_COMPILE([#include <sys/types.h>
1030 #include <netinet/in.h>
1031 #include <netinet/in_systm.h>
1032 #include <netinet/ip.h>
1033 #if defined (__linux__) || defined (__CYGWIN__)
1043 ac_cv_have_ip_hl="yes",
1044 ac_cv_have_ip_hl="no")
1046 if test $ac_cv_have_ip_hl = "yes" ; then
1047 AC_DEFINE(HAVE_IP_HL)
1050 dnl Check for typedefs
1051 AC_CHECK_SIZEOF(int)
1052 AC_CHECK_SIZEOF(long)
1053 AC_CHECK_SIZEOF(void *)
1055 dnl Check for special functions
1058 AC_CHECK_TYPE(pid_t, int)
1059 AC_CHECK_TYPE(size_t, unsigned int)
1060 AC_CHECK_TYPE(ssize_t, int)
1061 AC_CHECK_TYPE(off_t, int)
1062 AC_CHECK_TYPE(mode_t, u_short)
1063 AC_CHECK_TYPE(fd_mask, int)
1065 dnl Check for type in sys/socket.h
1066 AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [
1067 AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]], [#include <sys/types.h>
1068 #include <sys/socket.h>
1073 ac_cv_type_socklen_t=yes,
1074 ac_cv_type_socklen_t=no)
1076 if test $ac_cv_type_socklen_t = no; then
1077 AC_DEFINE(socklen_t, int)
1080 dnl Check for mtyp_t in some headers
1081 AC_CACHE_CHECK(for mtyp_t, ac_cv_type_mtyp_t, [
1082 AC_EGREP_CPP([mtyp_t[^a-zA-Z_0-9]], [#include <sys/types.h>
1083 #include <sys/ipc.h>
1084 #include <sys/msg.h>],
1085 ac_cv_type_mtyp_t=yes,
1086 ac_cv_type_mtyp_t=no)
1088 if test $ac_cv_type_mtyp_t = no; then
1089 AC_DEFINE(mtyp_t, long)
1092 dnl Check for needed libraries
1093 AC_CHECK_LIB(nsl, main)
1094 AC_CHECK_LIB(socket, main)
1096 if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then
1097 echo "skipping libmalloc check (--enable-dlmalloc specified)"
1099 AC_CHECK_LIB(gnumalloc, main)
1100 if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
1101 echo "Disabling extended malloc functions when using gnumalloc"
1102 ac_cv_func_mallinfo=no
1103 ac_cv_func_mallocblksize=no
1104 ac_cv_func_mallopt=no
1108 echo "skipping libmalloc check for $host"
1111 echo "skipping libmalloc check for $host"
1115 AC_CHECK_LIB(malloc, main)
1121 AC_CHECK_LIB(bsd, main)
1122 AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
1123 AC_CHECK_LIB(bind, gethostbyname)
1124 if test $ac_cv_lib_bind_gethostbyname = "no" ; then
1127 echo "skipping libresolv checks for $host"
1130 AC_CHECK_LIB(resolv, inet_aton, AC_CHECK_LIB(44bsd, inet_aton))
1131 AC_CHECK_LIB(resolv, main)
1135 AC_CHECK_LIB(m, main)
1137 dnl Check for libcrypt
1138 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
1139 AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
1142 dnl Check for libdl, used by auth_modules/PAM
1143 AC_CHECK_LIB(dl, dlopen, [DLLIB="-ldl"])
1146 dnl Check for pthreads
1147 dnl We use pthreads when doing ASYNC I/O
1148 AC_CHECK_LIB(pthread, main, [PTHREADLIB="-lpthread"])
1149 AC_SUBST(PTHREADLIB)
1151 dnl -lintl is needed on SCO version 3.2v4.2 for strftime()
1152 dnl Robert Side <rside@aiinc.bc.ca>
1153 dnl Mon, 18 Jan 1999 17:48:00 GMT
1156 AC_CHECK_LIB(intl, strftime)
1160 dnl System-specific library modifications
1164 if test "$GCC" = "yes"; then
1165 echo "Removing -O for gcc on $host"
1166 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
1170 echo "Removing -lsocket for IRIX..."
1171 LIBS=`echo $LIBS | sed -e s/-lsocket//`
1172 echo "Removing -lnsl for IRIX..."
1173 LIBS=`echo $LIBS | sed -e s/-lnsl//`
1174 ac_cv_lib_nsl_main=no
1175 echo "Removing -lbsd for IRIX..."
1176 LIBS=`echo $LIBS | sed -e s/-lbsd//`
1178 dnl From: c0032033@ws.rz.tu-bs.de (Joerg Schumacher)
1179 dnl Date: Thu, 17 Oct 1996 04:09:30 +0200
1180 dnl Please change your configure script. AIX doesn't need -lbsd.
1182 echo "Removing -lbsd for AIX..."
1183 LIBS=`echo $LIBS | sed -e s/-lbsd//`
1184 dnl From: mlaster@metavillage.com (Mike Laster)
1185 dnl AIX 4.1.4.x does not have header files for snprintf/vsnprintf
1186 dnl So using the internal versions generates a load of warnings
1188 echo "disabling snprintf/vsnprintf for $host"
1189 ac_cv_func_snprintf=no
1190 ac_cv_func_vsnprintf=no
1193 CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
1194 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
1196 [*-*-solaris2.[0-4]])
1197 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
1199 [*-sony-newsos[56]*])
1200 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
1204 # Remove optimization for GCC 2.95.[12]
1205 # gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL
1206 if test "$GCC" = "yes"; then
1207 GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
1210 echo "Removing -O for gcc on $host with GCC $GCCVER"
1211 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
1216 # Recommended by Balint Nagy Endre <bne@CareNet.hu>
1219 if test `uname -v` = "2.03"; then
1220 echo "disabling mallinfo for $host"
1221 ac_cv_func_mallinfo=no
1226 dnl This has to be before AC_CHECK_FUNCS
1227 # Disable poll() on certain platforms. Override by setting ac_cv_func_poll
1228 # when running configure.
1229 if test -z "$ac_cv_func_poll"; then
1232 # John Kay (jkay@nlanr.net) 19970818
1233 echo "disabling poll for $host..."
1234 ac_cv_func_poll='no'
1238 echo "disabling poll for $host..."
1239 ac_cv_func_poll='no'
1242 # Henrik Nordstrom (hno@hem.passagen.se) 19980817
1243 # poll is problematic on Linux. We disable it
1244 # by default until Linux gets it right.
1245 rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
1246 if test $rev -lt 002002; then
1247 echo "disabling poll for $host < 2.2..."
1248 ac_cv_func_poll='no'
1251 [powerpc-ibm-aix4.1.*])
1252 # Mike Laster (mlaster@metavillage.com) 19981021
1253 echo "disabling poll for $host..."
1254 ac_cv_func_poll='no'
1257 # Robert Side <rside@aiinc.bc.ca>
1258 # Mon, 18 Jan 1999 17:48:00 GMT
1259 echo "disabling poll for $host..."
1260 ac_cv_func_poll='no'
1265 dnl Check for library functions
1268 backtrace_symbols_fd \
1286 pthread_attr_setscope \
1287 pthread_setschedparam \
1288 pthread_attr_setschedparam \
1314 dnl Yay! Another Linux brokenness. Its not good enough
1315 dnl to know that setresuid() exists, because RedHat 5.0 declares
1316 dnl setresuid() but doesn't implement it.
1318 AC_CACHE_CHECK(if setresuid is implemented, ac_cv_func_setresuid,
1322 if(setresuid(-1,-1,-1)) {
1323 perror("setresuid:");
1328 ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no")
1330 if test "$ac_cv_func_setresuid" = "yes" ; then
1331 AC_DEFINE(HAVE_SETRESUID)
1334 dnl IP-Filter support requires ipf header files. These aren't
1335 dnl installed by default, so we need to check for them
1336 if test "$IPF_TRANSPARENT" ; then
1337 AC_MSG_CHECKING(if IP-Filter header files are installed)
1338 # hold on to your hats...
1339 if test "$ac_cv_header_ip_compat_h" = "yes" ||
1340 test "$ac_cv_header_ip_fil_compat_h" = "yes" ||
1341 test "$ac_cv_header_netinet_ip_compat_h" = "yes" ||
1342 test "$ac_cv_header_netinet_ip_fil_compat_h" = "yes" ; then
1343 have_ipfilter_compat_header="yes"
1345 if test "x$have_ipfilter_compat_header" = "xyes" &&
1346 test "$ac_cv_header_ip_fil_h" = "yes" &&
1347 test "$ac_cv_header_ip_nat_h" = "yes" ; then
1348 IPF_TRANSPARENT="yes"
1349 AC_DEFINE(IPF_TRANSPARENT, 1)
1350 elif test "$have_ipfilter_compat_header" = "yes" &&
1351 test "$ac_cv_header_netinet_ip_fil_h" = "yes" &&
1352 test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then
1353 IPF_TRANSPARENT="yes"
1354 AC_DEFINE(IPF_TRANSPARENT, 1)
1356 IPF_TRANSPARENT="no"
1357 AC_DEFINE(IPF_TRANSPARENT, 0)
1359 AC_MSG_RESULT($IPF_TRANSPARENT)
1361 if test "$IPF_TRANSPARENT" = "no" ; then
1362 echo "WARNING: Cannot find necessary IP-Filter header files"
1363 echo " Transparent Proxy support WILL NOT be enabled"
1367 dnl Linux-Netfilter support requires Linux 2.4 kernel header files.
1368 dnl Shamelessly copied from above
1369 if test "$LINUX_NETFILTER" ; then
1370 AC_MSG_CHECKING(if Linux 2.4 kernel header files are installed)
1371 # hold on to your hats...
1372 if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes"; then
1373 LINUX_NETFILTER="yes"
1374 AC_DEFINE(LINUX_NETFILTER, 1)
1376 LINUX_NETFILTER="no"
1377 AC_DEFINE(LINUX_NETFILTER, 0)
1379 AC_MSG_RESULT($LINUX_NETFILTER)
1381 if test "$LINUX_NETFILTER" = "no" ; then
1382 echo "WARNING: Cannot find necessary Linux 2.4 kernel header files"
1383 echo " Linux 2.4 Transparent Proxy support WILL NOT be enabled"
1387 if test -z "$USE_GNUREGEX" ; then
1389 *-sun-solaris2.[[0-4]])
1397 AC_MSG_CHECKING(if GNUregex needs to be compiled)
1398 if test -z "$USE_GNUREGEX"; then
1399 if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
1402 AC_TRY_COMPILE([#include <sys/types.h>
1403 #include <regex.h>],[regex_t t; regcomp(&t,"",0);],
1408 AC_MSG_RESULT($USE_GNUREGEX)
1409 if test "$USE_GNUREGEX" = "yes"; then
1411 LIBREGEX="libregex.a"
1412 AC_DEFINE(USE_GNUREGEX)
1423 dnl Not cached since people are likely to tune this
1424 AC_MSG_CHECKING(Default FD_SETSIZE value)
1433 #include <sys/time.h>
1435 #if HAVE_SYS_SELECT_H
1436 #include <sys/select.h>
1438 #if HAVE_SYS_TYPES_H
1439 #include <sys/types.h>
1442 FILE *fp = fopen("conftestval", "w");
1443 fprintf (fp, "%d\n", FD_SETSIZE);
1447 DEFAULT_FD_SETSIZE=`cat conftestval`,
1448 DEFAULT_FD_SETSIZE=256,
1449 DEFAULT_FD_SETSIZE=256)
1450 AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
1451 AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE)
1453 dnl Not cached since people are likely to tune this
1454 AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
1455 dnl damn! FreeBSD's pthreads breaks dup2().
1458 i386-unknown-freebsd*)
1459 if echo "$LDFLAGS" | grep -q pthread; then
1460 LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
1466 #include <sys/time.h> /* needed on FreeBSD */
1467 #include <sys/param.h>
1468 #include <sys/resource.h>
1472 #if defined(__CYGWIN32__) || defined (__CYGWIN__)
1473 /* getrlimit and sysconf returns bogous values on cygwin32.
1474 * Number of fds is virtually unlimited in cygwin (sys/param.h)
1475 * __CYGWIN32__ is deprecated.
1481 #if defined(RLIMIT_NOFILE)
1482 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
1483 perror("getrlimit: RLIMIT_NOFILE");
1485 rl.rlim_cur = rl.rlim_max; /* set it to the max */
1486 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
1487 perror("setrlimit: RLIMIT_NOFILE");
1490 #elif defined(RLIMIT_OFILE)
1491 if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
1492 perror("getrlimit: RLIMIT_OFILE");
1494 rl.rlim_cur = rl.rlim_max; /* set it to the max */
1495 if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
1496 perror("setrlimit: RLIMIT_OFILE");
1499 #endif /* RLIMIT_NOFILE */
1500 #endif /* HAVE_SETRLIMIT */
1501 /* by starting at 2^14, we will never get higher
1502 than 2^15 for SQUID_MAXFD */
1506 if (dup2(0, i) < 0) {
1514 #endif /* IF !DEF CYGWIN */
1515 fp = fopen("conftestval", "w");
1516 fprintf (fp, "%d\n", i);
1520 SQUID_MAXFD=`cat conftestval`,
1523 AC_MSG_RESULT($SQUID_MAXFD)
1524 AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
1525 if test "$SQUID_MAXFD" -lt 512 ; then
1526 echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
1527 echo " cache will be very busy. Please see the FAQ page"
1528 echo " http://squid.nlanr.net/Squid/FAQ/FAQ-11.html#filedescriptors"
1529 echo " on how to increase your filedescriptor limit"
1534 dnl Not cached since people are likely to tune this
1535 AC_MSG_CHECKING(Default UDP send buffer size)
1539 #include <sys/types.h>
1540 #include <sys/socket.h>
1541 #include <netinet/in.h>
1545 int fd,val=0,len=sizeof(int);
1546 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
1547 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
1548 if (val<=0) exit(1);
1549 fp = fopen("conftestval", "w");
1550 fprintf (fp, "%d\n", val);
1554 SQUID_UDP_SO_SNDBUF=`cat conftestval`,
1555 SQUID_UDP_SO_SNDBUF=16384,
1556 SQUID_UDP_SO_SNDBUF=16384)
1557 AC_MSG_RESULT($SQUID_UDP_SO_SNDBUF)
1558 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_SNDBUF, $SQUID_UDP_SO_SNDBUF)
1560 dnl Not cached since people are likely to tune this
1561 AC_MSG_CHECKING(Default UDP receive buffer size)
1565 #include <sys/types.h>
1566 #include <sys/socket.h>
1567 #include <netinet/in.h>
1571 int fd,val=0,len=sizeof(int);
1572 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
1573 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
1574 if (val <= 0) exit(1);
1575 fp = fopen("conftestval", "w");
1576 fprintf (fp, "%d\n", val);
1580 SQUID_UDP_SO_RCVBUF=`cat conftestval`,
1581 SQUID_UDP_SO_RCVBUF=16384,
1582 SQUID_UDP_SO_RCVBUF=16384)
1583 AC_MSG_RESULT($SQUID_UDP_SO_RCVBUF)
1584 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_RCVBUF, $SQUID_UDP_SO_RCVBUF)
1586 dnl Not cached since people are likely to tune this
1587 AC_MSG_CHECKING(Default TCP send buffer size)
1591 #include <sys/types.h>
1592 #include <sys/socket.h>
1593 #include <netinet/in.h>
1597 int fd,val=0,len=sizeof(int);
1598 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
1599 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
1600 if (val <= 0) exit(1);
1601 fp = fopen("conftestval", "w");
1602 fprintf (fp, "%d\n", val);
1606 SQUID_TCP_SO_SNDBUF=`cat conftestval`,
1607 SQUID_TCP_SO_SNDBUF=16384,
1608 SQUID_TCP_SO_SNDBUF=16384)
1609 AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF)
1610 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF)
1612 dnl Not cached since people are likely to tune this
1613 AC_MSG_CHECKING(Default TCP receive buffer size)
1617 #include <sys/types.h>
1618 #include <sys/socket.h>
1619 #include <netinet/in.h>
1623 int fd,val=0,len=sizeof(int);
1624 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
1625 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
1626 if (val <= 0) exit(1);
1627 fp = fopen("conftestval", "w");
1628 fprintf (fp, "%d\n", val);
1632 SQUID_TCP_SO_RCVBUF=`cat conftestval`,
1633 SQUID_TCP_SO_RCVBUF=16384,
1634 SQUID_TCP_SO_RCVBUF=16384)
1635 AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF)
1636 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF)
1638 AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist,
1639 AC_TRY_COMPILE([#include <stdio.h>],[char *s = sys_errlist;],
1640 ac_cv_needs_sys_errlist="no",
1641 ac_cv_needs_sys_errlist="yes")
1643 if test "$ac_cv_needs_sys_errlist" = "yes" ; then
1644 AC_DEFINE(NEED_SYS_ERRLIST)
1647 dnl Not cached since people are likely to change this
1648 AC_MSG_CHECKING(for libresolv _dns_ttl_ hack)
1649 AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;,
1651 AC_DEFINE(LIBRESOLV_DNS_TTL_HACK)],
1654 AC_MSG_CHECKING(if inet_ntoa() actually works)
1658 #include <sys/types.h>
1659 #include <netinet/in.h>
1660 #include <arpa/inet.h>
1665 in.s_addr = inet_addr("1.2.3.4");
1666 fp = fopen("conftestval", "w");
1667 fprintf (fp, "%s\n", inet_ntoa(in));
1671 INET_NTOA_RESULT=`cat conftestval`,
1672 INET_NTOA_RESULT="broken",
1673 INET_NTOA_RESULT="broken")
1674 if test "$INET_NTOA_RESULT" = "1.2.3.4" ; then
1675 AC_MSG_RESULT("yes")
1678 echo "Will use our own inet_ntoa()."
1679 LIBOBJS="$LIBOBJS inet_ntoa.o"
1680 # echo "WARNING: This looks bad, and probably prevents Squid from working."
1681 # echo " If you're on IRIX and using GCC 2.8, you probably need"
1682 # echo " to use the IRIX C compiler instead."
1686 if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
1687 AC_MSG_CHECKING(for working statvfs() interface)
1691 #include <sys/types.h>
1692 #include <sys/statvfs.h>
1696 sfs.f_blocks = sfs.f_bfree = sfs.f_frsize =
1697 sfs.f_files = sfs.f_ffree = 0;
1698 statvfs("/tmp", &sfs);
1700 ac_cv_func_statvfs=yes,
1701 ac_cv_func_statvfs=no)
1702 AC_MSG_RESULT($ac_cv_func_statvfs)
1703 if test "$ac_cv_func_statvfs" = "yes" ; then
1704 AC_DEFINE(HAVE_STATVFS)
1708 AC_CACHE_CHECK(for _res.nsaddr_list, ac_cv_have_res_nsaddr_list,
1710 #if HAVE_SYS_TYPES_H
1711 #include <sys/types.h>
1713 #if HAVE_NETINET_IN_H
1714 #include <netinet/in.h>
1716 #if HAVE_ARPA_INET_H
1717 #include <arpa/inet.h>
1719 #if HAVE_ARPA_NAMESER_H
1720 #include <arpa/nameser.h>
1726 [_res.nsaddr_list[[0]];],
1727 ac_cv_have_res_nsaddr_list="yes",
1728 ac_cv_have_res_nsaddr_list="no"))
1729 if test $ac_cv_have_res_nsaddr_list = "yes" ; then
1730 AC_DEFINE(HAVE_RES_NSADDR_LIST)
1733 if test $ac_cv_have_res_nsaddr_list = "no" ; then
1734 AC_CACHE_CHECK(for _res.ns_list, ac_cv_have_res_ns_list,
1736 #if HAVE_SYS_TYPES_H
1737 #include <sys/types.h>
1739 #if HAVE_NETINET_IN_H
1740 #include <netinet/in.h>
1742 #if HAVE_ARPA_INET_H
1743 #include <arpa/inet.h>
1745 #if HAVE_ARPA_NAMESER_H
1746 #include <arpa/nameser.h>
1752 [_res.ns_list[[0]].addr;],
1753 ac_cv_have_res_ns_list="yes",
1754 ac_cv_have_res_ns_list="no"))
1755 if test $ac_cv_have_res_ns_list = "yes" ; then
1756 AC_DEFINE(HAVE_RES_NS_LIST)
1760 dnl Need the debugging version of malloc if available
1762 if test "$ac_cv_lib_malloc_main" = "yes" ; then
1763 if test -r /usr/lib/debug/malloc.o ; then
1764 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
1766 if test -r /usr/lib/debug/mallocmap.o ; then
1767 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
1773 if test -z "$XTRA_LIBS"; then
1776 XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/ */ /g"`
1781 dnl Clean up after OSF/1 core dump bug
1785 for fs in $STORE_MODULES none; do
1786 if test $fs != none; then
1787 FS_MAKEFILES="$FS_MAKEFILES ./src/fs/$fs/Makefile"
1791 for repl in $REPL_POLICIES none; do
1792 if test $repl != none; then
1793 REPL_MAKEFILES="$REPL_MAKEFILES ./src/repl/$repl/Makefile"
1798 for auth in $srcdir/src/auth/* none; do
1799 if test -f $auth/Makefile.in; then
1800 scheme=`basename $auth`
1801 AUTH_MAKEFILES="$AUTH_MAKEFILES ./src/auth/$scheme/Makefile"
1802 if test -f $auth/helpers/Makefile.in; then
1803 AUTH_MAKEFILES="$AUTH_MAKEFILES ./src/auth/$scheme/helpers/Makefile"
1804 for helper in $auth/helpers/*; do
1805 if test -f $helper/Makefile.in; then
1806 AUTH_MAKEFILES="$AUTH_MAKEFILES ./src/auth/$scheme/helpers/`basename $helper`/Makefile"
1817 ./include/config.h \
1818 ./scripts/Makefile \
1819 ./scripts/RunCache \
1820 ./scripts/RunAccel \
1824 ./src/repl/Makefile \
1826 ./src/auth/Makefile \
1828 ./contrib/Makefile \