This patch is generated from the autoconf-25 branch of HEAD in squid Wed Sep 29 01:23:31 2004 GMT See http://devel.squid-cache.org/ Index: squid/.cvsignore diff -u squid/.cvsignore:1.1 squid/.cvsignore:1.1.72.1 --- squid/.cvsignore:1.1 Wed Oct 10 15:19:49 2001 +++ squid/.cvsignore Wed Jul 24 16:51:20 2002 @@ -5,3 +5,4 @@ aclocal.m4 configure merge.log +autom4te.cache Index: squid/acconfig.h diff -u squid/acconfig.h:1.21 squid/acconfig.h:removed --- squid/acconfig.h:1.21 Wed Oct 2 04:11:24 2002 +++ squid/acconfig.h Tue Sep 28 18:28:03 2004 @@ -1,408 +0,0 @@ -/* - * All configurable options are enabled by using --enable-.... - * when running configure. See configure --help for a list - * of all available options. - * - * You are free to edit this file, but it will be overwritten - * each time you run configure. You may need to edit this file - * if configure falsely picks up a library function or structure - * that doesn't really work on your system. - * - * Another way to block a function that should not be detected - * is to - * setenv ac_cv_func_ no - * before running configure, as in - * setenv ac_cv_func_setresuid no - * - * It is possible to enable some of the configurable options - * by editing this file alone, but some of them requires changes - * in the Makefiles, wich is done automatically by configure. - * - */ - -#ifndef __CONFIGURE_H__ -#define __CONFIGURE_H__ -@TOP@ -/* $Id$ */ - -/* - * configure command line used to configure Squid - */ -#undef SQUID_CONFIGURE_OPTIONS - -/********************************* - * START OF CONFIGURABLE OPTIONS * - *********************************/ -/* - * If you are upset that the cachemgr.cgi form comes up with the hostname - * field blank, then define this to getfullhostname() - */ -#undef CACHEMGR_HOSTNAME - -/* - * What default TCP port to use for HTTP listening? - */ -#ifndef CACHE_HTTP_PORT -#undef CACHE_HTTP_PORT -#endif - -/* - * What default UDP port to use for ICP listening? - */ -#ifndef CACHE_ICP_PORT -#undef CACHE_ICP_PORT -#endif - -/* Compile & use the malloc package by Doug Lea] */ -#undef USE_DLMALLOC - -/* Define to do simple malloc debugging */ -#undef XMALLOC_DEBUG - -/* Define for log file trace of mem alloc/free */ -#undef MEM_GEN_TRACE - -/* Define to have malloc statistics */ -#undef XMALLOC_STATISTICS - -/* Define to have a detailed trace of memory allocations */ -#undef XMALLOC_TRACE - -#undef FORW_VIA_DB - -/* Define to enable CPU profiling within Squid */ -#undef USE_XPROF_STATS - -/* Define if you have problems with memPools and want to disable Pools */ -#undef DISABLE_POOLS - -/* Defines how many threads aufs uses for I/O */ -#undef AUFS_IO_THREADS - -/* - * If you want to use Squid's ICMP features (highly recommended!) then - * define this. When USE_ICMP is defined, Squid will send ICMP pings - * to origin server sites. This information is used in numerous ways: - * - Sent in ICP replies so neighbor caches know how close - * you are to the source. - * - For finding the closest instance of a URN. - * - With the 'test_reachability' option. Squid will return - * ICP_OP_MISS_NOFETCH for sites which it cannot ping. - */ -#undef USE_ICMP - -/* - * Traffic management via "delay pools". - */ -#undef DELAY_POOLS - -/* - * If you want to log User-Agent request header values, define this. - * By default, they are written to useragent.log in the Squid log - * directory. - */ -#undef USE_USERAGENT_LOG - -/* - * If you want to log Referer request header values, define this. - * By default, they are written to referer.log in the Squid log - * directory. - */ -#undef USE_REFERER_LOG - -/* - * A dangerous feature which causes Squid to kill its parent process - * (presumably the RunCache script) upon receipt of SIGTERM or SIGINT. - * Use with caution. - */ -#undef KILL_PARENT_OPT - -/* Define to enable SNMP monitoring of Squid */ -#undef SQUID_SNMP - -/* - * Define to enable WCCP - */ -#define USE_WCCP 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, ?). - */ -#undef USE_ARP_ACL - -/* - * Define this to include code for the Hypertext Cache Protocol (HTCP) - */ -#undef USE_HTCP - -/* - * Use Cache Digests for locating objects in neighbor caches. This - * code is still semi-experimental. - */ -#undef USE_CACHE_DIGESTS - -/* - * Cache Array Routing Protocol - */ -#define USE_CARP 1 - -/* Define if NTLM is allowed to fail gracefully when a helper has problems */ -#undef NTLM_FAIL_OPEN - -/******************************** - * END OF CONFIGURABLE OPTIONS * - ********************************/ - -/* Define if struct tm has tm_gmtoff member */ -#undef HAVE_TM_GMTOFF - -/* Define if struct mallinfo has mxfast member */ -#undef HAVE_EXT_MALLINFO - -/* Default FD_SETSIZE value */ -#undef DEFAULT_FD_SETSIZE - -/* Maximum number of open filedescriptors */ -#undef SQUID_MAXFD - -/* UDP send buffer size */ -#undef SQUID_UDP_SO_SNDBUF - -/* UDP receive buffer size */ -#undef SQUID_UDP_SO_RCVBUF - -/* TCP send buffer size */ -#undef SQUID_TCP_SO_SNDBUF - -/* TCP receive buffer size */ -#undef SQUID_TCP_SO_RCVBUF - -/* Host type from configure */ -#undef CONFIG_HOST_TYPE - -/* If we need to declare sys_errlist[] as external */ -#undef NEED_SYS_ERRLIST - -/* If gettimeofday is known to take only one argument */ -#undef GETTIMEOFDAY_NO_TZP - -/* If libresolv.a has been hacked to export _dns_ttl_ */ -#undef LIBRESOLV_DNS_TTL_HACK - -/* Define if struct ip has ip_hl member */ -#undef HAVE_IP_HL - -/* Define if your compiler supports prototyping */ -#undef HAVE_ANSI_PROTOTYPES - -/* Define if we should use GNU regex */ -#undef USE_GNUREGEX - -/* signed size_t, grr */ -#undef ssize_t - -/* - * Yay! Another Linux brokenness. Its not good enough to know that - * setresuid() exists, because RedHat 5.0 declare setresuid() but - * doesn't implement it. - */ -#undef HAVE_SETRESUID - -/* Define if you have struct rusage */ -#undef HAVE_STRUCT_RUSAGE - -/* - * This makes warnings go away. If you have socklen_t defined in your - * /usr/include files, then this should remain undef'd. Otherwise it - * should be defined to int. - */ -#undef socklen_t - -/* - * 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. - */ -#define HTTP_VIOLATIONS 1 - -/* - * Enable support for Transparent Proxy on systems using IP-Filter - * address redirection. This provides "masquerading" support for non - * Linux system. - */ -#undef IPF_TRANSPARENT - -/* - * Enable support for Transparent Proxy on systems using PF address - * redirection. This provides "masquerading" support for OpenBSD. - */ -#undef PF_TRANSPARENT - -/* - * Enable code for assiting in finding memory leaks. Hacker stuff only. - */ -#undef USE_LEAKFINDER - -/* - * type of fd_set array - */ -#undef fd_mask - -/* - * If _res structure has nsaddr_list member - */ -#undef HAVE_RES_NSADDR_LIST - -/* - * If _res structure has ns_list member - */ -#undef HAVE_RES_NS_LIST - -/* - * Compile in support for Ident (RFC 931) lookups? Enabled by default. - */ -#define USE_IDENT 1 - -/* - * If your system has statvfs(), and if it actually works! - */ -#undef HAVE_STATVFS - -/* - * If --disable-internal-dns was given to configure, then we'll use - * the dnsserver processes instead. - */ -#undef USE_DNSSERVERS - -/* - * we check for the existance of struct mallinfo - */ -#undef HAVE_STRUCT_MALLINFO - -/* - * Do we want to use truncate(2) or unlink(2)? - */ -#undef USE_TRUNCATE - -/* - * Allow underscores in host names - */ -#undef ALLOW_HOSTNAME_UNDERSCORES - -/* - * Use the heap-based replacement techniques - */ -#undef HEAP_REPLACEMENT - -/* - * message type for message queues - */ -#undef mtyp_t - -/* - * Define this to include code for SSL encryption. - */ -#undef USE_SSL - -/* - * 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) - */ -#undef USE_OPENSSL - -/* Define if you want to set the COSS membuf size */ -#undef COSS_MEMBUF_SZ - -/* Print stacktraces on fatal errors */ -#undef PRINT_STACK_TRACE - -/* - * Define this if unlinkd is required - * (strongly recommended for ufs storage type) - */ -#undef USE_UNLINKD - -/* - * Enable support for Transparent Proxy on Linux 2.4 systems - */ -#undef LINUX_NETFILTER - -/* - * Enable for cbdata debug information - */ -#undef CBDATA_DEBUG - -/* - * Do we have unix sockets? (required for the winbind ntlm helper - */ -#undef HAVE_UNIXSOCKET - -/* - * Known-size integers - */ - -#undef int16_t - -#undef u_int16_t - -#undef int32_t - -#undef u_int32_t - -#undef int64_t - -#undef u_int64_t - -/* The number of bytes in a __int64. */ -#undef SIZEOF___INT64 - -/* The number of bytes in a int16_t. */ -#undef SIZEOF_INT16_T - -/* The number of bytes in a int32_t. */ -#undef SIZEOF_INT32_T - -/* The number of bytes in a int64_t. */ -#undef SIZEOF_INT64_T - -/* The number of bytes in a off_t. */ -#undef SIZEOF_OFF_T - -/* The number of bytes in a size_t. */ -#undef SIZEOF_SIZE_T - -/* The number of bytes in a u_int16_t. */ -#undef SIZEOF_U_INT16_T - -/* The number of bytes in a u_int32_t. */ -#undef SIZEOF_U_INT32_T - -/* The number of bytes in a u_int64_t. */ -#undef SIZEOF_U_INT64_T - -/* The number of bytes in a uint16_t. */ -#undef SIZEOF_UINT16_T - -/* The number of bytes in a uint32_t. */ -#undef SIZEOF_UINT32_T - -/* The number of bytes in a uint64_t. */ -#undef SIZEOF_UINT64_T - -/* - * Enable support for the X-Accelerator-Vary HTTP header - */ -#undef X_ACCELERATOR_VARY - -/* Support for poll/select/etc stuff */ -#undef USE_POLL -#undef USE_SELECT -#undef USE_KQUEUE - -@BOTTOM@ - -#endif /* __CONFIGURE_H__ */ Index: squid/acinclude.m4 diff -u squid/acinclude.m4:1.4 squid/acinclude.m4:1.4.4.3 --- squid/acinclude.m4:1.4 Mon Jun 17 14:02:55 2002 +++ squid/acinclude.m4 Thu Jul 25 06:12:54 2002 @@ -1,64 +1,14 @@ -dnl AC_CHECK_SIZEOF_SYSTYPE is as the standard AC_CHECK_SIZEOF macro -dnl but also capable of checking the size of system defined types, not -dnl only compiler defined types. -dnl -dnl AC_CHECK_SYSTYPE is the same thing but replacing AC_CHECK_TYPE -dnl However AC_CHECK_TYPE is not by far as limited as AC_CHECK_SIZEOF -dnl (it at least makes use of , and ) - -dnl AC_CHECK_SIZEOF_SYSTYPE(TYPE [, CROSS-SIZE]) -AC_DEFUN(AC_CHECK_SIZEOF_SYSTYPE, -[changequote(<<, >>)dnl -dnl The name to #define. -define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl -dnl The cache variable name. -define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -changequote([, ])dnl -AC_MSG_CHECKING(size of $1) -AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([ -#include -#if STDC_HEADERS -#include -#include -#endif -#if HAVE_INTTYPES_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_BITYPES_H -#include -#endif -int main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) return(1); - fprintf(f, "%d\n", sizeof($1)); - return(0); -} -], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) -undefine([AC_TYPE_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - -dnl AC_CHECK_SYSTYPE(TYPE, DEFAULT) -AC_DEFUN(AC_CHECK_SYSTYPE, -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [ +dnl This encapsulates the nasty mess of headers we need to check when +dnl checking types. +AC_DEFUN(SQUID_DEFAULT_INCLUDES,[[ /* What a mess.. many systems have added the (now standard) bit types * in their own ways, so we need to scan a wide variety of headers to * find them.. + * IMPORTANT: Keep include/squid_types.h syncronised with this list */ +#if HAVE_SYS_TYPES_H #include +#endif #if STDC_HEADERS #include #include @@ -66,16 +16,13 @@ #if HAVE_INTTYPES_H #include #endif -#if HAVE_SYS_TYPES_H -#include -#endif #if HAVE_SYS_BITYPES_H #include #endif -], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test $ac_cv_type_$1 = no; then - AC_DEFINE($1, $2) -fi -]) +]]) +dnl and this is for AC_CHECK_SIZEOF +AC_DEFUN(SQUID_DEFAULT_SIZEOF_INCLUDES,[ +#include +SQUID_DEFAULT_INCLUDES +]) Index: squid/configure.in diff -u squid/configure.in:1.70 squid/configure.in:1.61.4.9 --- squid/configure.in:1.70 Wed Oct 2 04:11:24 2002 +++ squid/configure.in Sat Oct 5 18:18:06 2002 @@ -7,9 +7,11 @@ dnl dnl dnl -AC_INIT(src/main.c) +AC_INIT +AC_PREREQ(2.53) +AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR(cfgaux) -AM_INIT_AUTOMAKE(squid, 2.6-DEVEL) +AM_INIT_AUTOMAKE(squid, 2.6-DEVEL-autoconf25) AM_CONFIG_HEADER(include/autoconf.h) AC_REVISION($Revision$)dnl AC_PREFIX_DEFAULT(/usr/local/squid) @@ -65,12 +67,14 @@ fi dnl Subsitutions -AC_DEFINE_UNQUOTED(CACHE_HTTP_PORT, $CACHE_HTTP_PORT) -AC_DEFINE_UNQUOTED(CACHE_ICP_PORT, $CACHE_ICP_PORT) +AC_DEFINE_UNQUOTED(CACHE_HTTP_PORT, $CACHE_HTTP_PORT, +[What default TCP port to use for HTTP listening?]) +AC_DEFINE_UNQUOTED(CACHE_ICP_PORT, $CACHE_ICP_PORT, +[What default UDP port to use for ICP listening?]) -AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host") +AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host",[Host type from configure]) -AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args") +AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args", [configure command line used to configure Squid]) dnl Check for GNU cc AC_PROG_CC @@ -212,7 +216,7 @@ ac_cv_header_gnumalloc_h="no" ac_cv_lib_malloc="no" ac_cv_enabled_dlmalloc="yes" - AC_DEFINE(USE_DLMALLOC, 1) + AC_DEFINE(USE_DLMALLOC, 1, [Compile & use the malloc package by Doug Lea]) fi AC_SUBST(LIBDLMALLOC) @@ -226,7 +230,7 @@ [ --enable-debug-cbdata Provide some debug information in cbdata], [ if test "$enableval" = "yes" ; then echo "cbdata debugging enabled" - AC_DEFINE(CBDATA_DEBUG) + AC_DEFINE(CBDATA_DEBUG,1,[Enable for cbdata debug information]) fi ]) @@ -236,7 +240,7 @@ dnl [ --enable-xmalloc-debug Do some simple malloc debugging], dnl [ if test "$enableval" = "yes" ; then dnl echo "Malloc debugging enabled" -dnl AC_DEFINE(XMALLOC_DEBUG) +dnl AC_DEFINE(XMALLOC_DEBUG,1,[Define to do simple malloc debugging]) dnl fi dnl ]) @@ -247,8 +251,8 @@ dnl Detailed trace of memory allocations], dnl [ if test "$enableval" = "yes" ; then dnl echo "Malloc debug trace enabled" -dnl AC_DEFINE(XMALLOC_TRACE) -dnl AC_DEFINE(XMALLOC_DEBUG) +dnl AC_DEFINE(XMALLOC_TRACE,1,[Define to have a detailed trace of memory allocations]) +dnl AC_DEFINE(XMALLOC_DEBUG,1) dnl fi dnl ]) @@ -257,7 +261,7 @@ Show malloc statistics in status page], [ if test "$enableval" = "yes" ; then echo "Malloc statistics enabled" - AC_DEFINE(XMALLOC_STATISTICS) + AC_DEFINE(XMALLOC_STATISTICS,1,[Define to have malloc statistics]) fi ]) @@ -265,7 +269,7 @@ [ --disable-carp Disable CARP support], [ if test "$enableval" = "no" ; then echo "CARP disabled" - AC_DEFINE(USE_CARP, 0) + AC_DEFINE(USE_CARP, 0, [Cache Array Routing Protocol]) else AC_DEFINE(USE_CARP, 1) fi @@ -297,7 +301,8 @@ [ aufs_io_threads=$withval ]) if test "$aufs_io_threads"; then echo "With $aufs_io_threads aufs threads" - AC_DEFINE_UNQUOTED(AUFS_IO_THREADS,$aufs_io_threads) + AC_DEFINE_UNQUOTED(AUFS_IO_THREADS,$aufs_io_threads, + [Defines how many threads aufs uses for I/O]) fi AC_ARG_WITH(pthreads, @@ -441,7 +446,15 @@ [ --enable-icmp Enable ICMP pinging], [ if test "$enableval" = "yes" ; then echo "ICMP enabled" - AC_DEFINE(USE_ICMP) + AC_DEFINE(USE_ICMP,1, + [If you want to use Squid's ICMP features (highly recommended!) then + define this. When USE_ICMP is defined, Squid will send ICMP pings + to origin server sites. This information is used in numerous ways: + - Sent in ICP replies so neighbor caches know how close + you are to the source. + - For finding the closest instance of a URN. + - With the 'test_reachability' option. Squid will return + ICP_OP_MISS_NOFETCH for sites which it cannot ping.]) AM_CONDITIONAL(ENABLE_PINGER, true) fi ]) @@ -451,8 +464,8 @@ [ --enable-delay-pools Enable delay pools to limit bandwidth usage], [ if test "$enableval" = "yes" ; then echo "Delay pools enabled" - AC_DEFINE(DELAY_POOLS) - AM_CONDITIONAL(USE_DELAY_POOLS, true) + AC_DEFINE([DELAY_POOLS],1,[Traffic management via "delay pools".]) + AM_CONDITIONAL(USE_DELAY_POOLS, true,) fi ]) @@ -462,7 +475,7 @@ dnl [ --enable-mem-gen-trace Do trace of memory stuff], dnl [ if test "$enableval" = "yes" ; then dnl echo "Memory trace (to file) enabled" -dnl AC_DEFINE(MEM_GEN_TRACE) +dnl AC_DEFINE(MEM_GEN_TRACE,1,[Define for log file trace of mem alloc/free]) dnl fi dnl ]) @@ -470,7 +483,9 @@ [ --enable-useragent-log Enable logging of User-Agent header], [ if test "$enableval" = "yes" ; then echo "User-Agent logging enabled" - AC_DEFINE(USE_USERAGENT_LOG) + AC_DEFINE(USE_USERAGENT_LOG,1,[If you want to log User-Agent request header values, define this. + By default, they are written to useragent.log in the Squid log + directory.]) fi ]) @@ -478,7 +493,9 @@ [ --enable-referer-log Enable logging of Referer header], [ if test "$enableval" = "yes" ; then echo "Referer logging enabled" - AC_DEFINE(USE_REFERER_LOG) + AC_DEFINE(USE_REFERER_LOG,1,[If you want to log Referer request header values, define this. + By default, they are written to referer.log in the Squid log + directory.]) fi ]) @@ -486,7 +503,7 @@ [ --disable-wccp Disable Web Cache Coordination Protocol], [ if test "$enableval" = "no" ; then echo "Web Cache Coordination Protocol disabled" - AC_DEFINE(USE_WCCP, 0) + AC_DEFINE(USE_WCCP, 0,[Define to enable WCCP]) else AC_DEFINE(USE_WCCP, 1) fi @@ -497,7 +514,9 @@ Kill parent on shutdown], [ if test "$enableval" = "yes" ; then echo "Kill parent on shutdown" - AC_DEFINE(KILL_PARENT_OPT) + AC_DEFINE(KILL_PARENT_OPT,1,[A dangerous feature which causes Squid to kill its parent process + (presumably the RunCache script) upon receipt of SIGTERM or SIGINT. + Use with caution.]) fi ]) @@ -506,7 +525,7 @@ [ --enable-snmp Enable SNMP monitoring], [ if test "$enableval" = "yes" ; then echo "SNMP monitoring enabled" - AC_DEFINE(SQUID_SNMP) + AC_DEFINE(SQUID_SNMP,1,[Define to enable SNMP monitoring of Squid]) SNMPLIB='-L../snmplib -lsnmp' AM_CONDITIONAL(USE_SNMP, true) SNMP_MAKEFILE=./snmplib/Makefile @@ -521,7 +540,8 @@ Make cachemgr.cgi default to this host], [ case $enableval in yes) - AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()]) + AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()], + [If you are upset that the cachemgr.cgi form comes up with the hostname field blank, then define this to getfullhostname()]) echo "Cachemgr default hostname == host where cachemgr runs" ;; no) @@ -548,7 +568,7 @@ sleep 10 ;; esac - AC_DEFINE(USE_ARP_ACL) + 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, ?).]) fi ]) @@ -557,7 +577,7 @@ [ --enable-htcp Enable HTCP protocol], [ if test "$enableval" = "yes" ; then echo "HTCP enabled" - AC_DEFINE(USE_HTCP) + AC_DEFINE(USE_HTCP,1, [Define this to include code for the Hypertext Cache Protocol (HTCP)]) AM_CONDITIONAL(ENABLE_HTCP, true) fi ]) @@ -568,7 +588,7 @@ [ --enable-ssl Enable ssl gatewaying support using OpenSSL], [ if test "$enableval" != "no"; then echo "SSL gatewaying using OpenSSL enabled" - AC_DEFINE(USE_SSL) + AC_DEFINE(USE_SSL,1,[Define this to include code for SSL encryption.]) AM_CONDITIONAL(ENABLE_SSL, true) SSLLIB='-lssl -lcrypto' USE_OPENSSL=1 @@ -600,7 +620,7 @@ if test -n "$USE_OPENSSL"; then echo "Using OpenSSL MD5 implementation" - AC_DEFINE(USE_OPENSSL) + 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)]) AM_CONDITIONAL(NEED_OWN_MD5, false) if test -z "$SSLLIB"; then SSLLIB="-lcrypto" # for MD5 routines @@ -615,7 +635,7 @@ [ --enable-forw-via-db Enable Forw/Via database], [ if test "$enableval" = "yes" ; then echo "FORW-VIA enabled" - AC_DEFINE(FORW_VIA_DB) + AC_DEFINE(FORW_VIA_DB,1,[Enable Forw/Via database]) fi ]) @@ -624,7 +644,7 @@ see http://www.squid-cache.org/FAQ/FAQ-16.html], [ if test "$enableval" = "yes" ; then echo "USE_CACHE_DIGESTS enabled" - AC_DEFINE(USE_CACHE_DIGESTS) + AC_DEFINE(USE_CACHE_DIGESTS,1,[Use Cache Digests for locating objects in neighbor caches. This code is still semi-experimental.]) fi ]) @@ -671,7 +691,7 @@ [ --with-coss-membuf-size COSS membuf size (default 1048576 bytes) ], [ if test "$with_coss_membuf_size"; then echo "Setting COSS membuf size to $with_coss_membuf_size bytes" - AC_DEFINE_UNQUOTED(COSS_MEMBUF_SZ, $with_coss_membuf_size) + AC_DEFINE_UNQUOTED(COSS_MEMBUF_SZ, $with_coss_membuf_size,[Define if you want to set the COSS membuf size]) fi ]) @@ -737,7 +757,7 @@ violate the HTTP protocol specification.], [ if test "$enableval" = "no" ; then echo "Disabling HTTP Violations" - AC_DEFINE(HTTP_VIOLATIONS, 0) + AC_DEFINE(HTTP_VIOLATIONS, 0,[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.]) else AC_DEFINE(HTTP_VIOLATIONS, 1) fi @@ -750,7 +770,7 @@ using IP-Filter network address redirection.], [ if test "$enableval" = "yes" ; then echo "IP-Filter Transparent Proxy enabled" - AC_DEFINE(IPF_TRANSPARENT) + 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.]) IPF_TRANSPARENT="yes" fi ]) @@ -762,7 +782,7 @@ using PF network address redirection.], [ if test "$enableval" = "yes" ; then echo "PF Transparent Proxy enabled" - AC_DEFINE(PF_TRANSPARENT) + AC_DEFINE(PF_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using PF address redirection. This provides "masquerading" support for OpenBSD.]) PF_TRANSPARENT="yes" fi ]) @@ -773,7 +793,7 @@ Enable Transparent Proxy support for Linux 2.4.], [ if test "$enableval" = "yes" ; then echo "Linux-Netfilter Transparent Proxy enabled" - AC_DEFINE(LINUX_NETFILTER) + AC_DEFINE(LINUX_NETFILTER,1,[Enable support for Transparent Proxy on Linux 2.4 systems]) LINUX_NETFILTER="yes" fi ]) @@ -798,7 +818,7 @@ Useful for hackers only.], [ if test "$enableval" = "yes" ; then echo "Leak-Finding enabled" - AC_DEFINE(USE_LEAKFINDER) + AC_DEFINE(USE_LEAKFINDER,1,[Enable code for assisting in finding memory leaks. Hacker stuff only.]) USE_LEAKFINDER="yes" AM_CONDITIONAL(MAKE_LEAKFINDER, true) fi @@ -810,7 +830,7 @@ Ident (RFC 931) lookups.], [ if test "$enableval" = "no" ; then echo "Disabling Ident Lookups" - AC_DEFINE(USE_IDENT, 0) + AC_DEFINE(USE_IDENT, 0,[Compile in support for Ident (RFC 931) lookups? Enabled by default.]) else AC_DEFINE(USE_IDENT, 1) fi @@ -828,7 +848,7 @@ fi ]) if test "$use_dnsserver" = "yes"; then - AC_DEFINE(USE_DNSSERVERS) + AC_DEFINE(USE_DNSSERVERS,1,[Use dnsserver processes instead of the internal DNS protocol support]) AM_CONDITIONAL(USE_DNSSERVER, true) fi @@ -840,7 +860,7 @@ filesystem inodes than unlink..], [ if test "$enableval" = "yes" ; then echo "Enabling truncate instead of unlink" - AC_DEFINE(USE_TRUNCATE) + AC_DEFINE(USE_TRUNCATE,1,[Do we want to use truncate(2) or unlink(2)?]) fi ]) @@ -854,7 +874,7 @@ does not reject _ in hostnames...], [ if test "$enableval" = "yes" ; then echo "Enabling the use of underscores in host names" - AC_DEFINE(ALLOW_HOSTNAME_UNDERSCORES, 1) + AC_DEFINE(ALLOW_HOSTNAME_UNDERSCORES, 1,[Allow underscores in host names]) fi ]) @@ -1046,7 +1066,7 @@ Authentication steps can allow squid to still authenticate the user.], [ if test "$enableval" = "yes" ; then - AC_DEFINE(NTLM_FAIL_OPEN) + 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.]) fi ]) @@ -1090,7 +1110,7 @@ [ --disable-mempools Disable memPools], [ if test "$enableval" = "no" ; then echo "memPools disabled" - AC_DEFINE(DISABLE_POOLS, 1) + AC_DEFINE(DISABLE_POOLS, 1, [Define if you have problems with memPools and want to disable Pools]) else AC_DEFINE(DISABLE_POOLS, 0) fi @@ -1111,7 +1131,7 @@ ]) if test "$use_unlinkd" = "yes"; then echo "unlinkd enabled" - AC_DEFINE(USE_UNLINKD) + AC_DEFINE(USE_UNLINKD,1,[Define this if unlinkd is required (strongly recommended for ufs storage type)]) AM_CONDITIONAL(ENABLE_UNLINKD, true) else echo "unlinkd disabled" @@ -1123,7 +1143,7 @@ [ --enable-stacktraces Enable automatic call backtrace on fatal errors], [ if test "$enableval" = "yes" ; then echo "Enabling automatic stack backtraces on fatal errors" - AC_DEFINE(PRINT_STACK_TRACE, 1) + AC_DEFINE(PRINT_STACK_TRACE, 1,[Print stacktraces on fatal errors]) fi ]) @@ -1143,7 +1163,7 @@ ], [ if test "$enableval" = "yes" ; then echo "Enabling cpu-profiling" - AC_DEFINE(USE_XPROF_STATS, 1) + AC_DEFINE(USE_XPROF_STATS, 1,[Define to enable CPU profiling within Squid]) AM_CONDITIONAL(ENABLE_XPROF_STATS, true) fi ]) @@ -1158,7 +1178,7 @@ that adds custom HTTP headers to the requests.], [ if test "$enableval" = "yes" ; then echo "Enabling support for X-Accelerator-Vary" - AC_DEFINE(X_ACCELERATOR_VARY, 1) + AC_DEFINE(X_ACCELERATOR_VARY, 1, [Enable support for the X-Accelerator-Vary HTTP header]) fi ]) @@ -1318,72 +1338,48 @@ ac_cv_have_ansi_prototypes="no") ]) if test $ac_cv_have_ansi_prototypes = "yes" ; then - AC_DEFINE(HAVE_ANSI_PROTOTYPES) + AC_DEFINE(HAVE_ANSI_PROTOTYPES,1,[Define if your compiler supports prototyping]) fi -AC_CACHE_CHECK(for tm->tm_gmtoff,ac_cv_have_tm_gmoff, [ - AC_TRY_COMPILE([#include -#include ], - [struct tm foo; - foo.tm_gmtoff = 0;], - ac_cv_have_tm_gmoff="yes", - ac_cv_have_tm_gmoff="no") +AC_STRUCT_TM +AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ +#if TM_IN_SYS_TIME +#if HAVE_SYS_TIME_H +#include +#endif +#elif HAVE_TIME_H +#include +#endif ]) -if test $ac_cv_have_tm_gmoff = "yes" ; then - AC_DEFINE(HAVE_TM_GMTOFF) -fi -AC_CACHE_CHECK(for struct mallinfo,ac_cv_have_struct_mallinfo, [ - AC_TRY_COMPILE([#include +AC_CHECK_TYPE(struct mallinfo,AC_DEFINE(HAVE_STRUCT_MALLINFO,1,[The system provides struct mallinfo]),,[ +#if HAVE_SYS_TYPES_H +#include +#endif #if HAVE_MALLOC_H #include -#endif], - [struct mallinfo foo; - foo.arena = 0; - foo.ordblks = 0; - foo.smblks = 0; - foo.hblks = 0; - foo.hblkhd = 0; - foo.uordblks = 0; - foo.fordblks = 0; - foo.keepcost = 0;], - ac_cv_have_struct_mallinfo="yes", - ac_cv_have_struct_mallinfo="no") -]) -if test $ac_cv_have_struct_mallinfo = "yes" ; then - AC_DEFINE(HAVE_STRUCT_MALLINFO) -fi - -AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [ - AC_TRY_COMPILE([#include -#include ], - [struct mallinfo foo; - foo.mxfast = 0;], - ac_cv_have_ext_mallinfo="yes", - ac_cv_have_ext_mallinfo="no") -]) -if test $ac_cv_have_ext_mallinfo = "yes" ; then - AC_DEFINE(HAVE_EXT_MALLINFO) -fi +#endif]) -AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [ - AC_TRY_COMPILE([ +AC_CHECK_MEMBERS([struct mallinfo.mxfast],,,[ +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_MALLOC_H +#include +#endif]) + +AC_CHECK_TYPE(struct rusage,AC_DEFINE(HAVE_STRUCT_RUSAGE,1,[The system provides struct rusage]),,[ #if HAVE_SYS_TIME_H #include #endif #if HAVE_SYS_RESOURCE_H #include -#endif], - [struct rusage R;], - ac_cv_have_struct_rusage="yes", - ac_cv_have_struct_rusage="no") -]) -if test $ac_cv_have_struct_rusage = "yes" ; then - AC_DEFINE(HAVE_STRUCT_RUSAGE) -fi +#endif]) -AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [ - AC_TRY_COMPILE([#include +AC_CHECK_MEMBERS([struct iphdr.ip_hl],,,[ +#if HAVE_SYS_TYPES_H +#include +#endif #include #include #include @@ -1394,120 +1390,118 @@ #ifndef __CYGWIN__ #define iphdr ip #endif -#endif], - [struct iphdr ip; - ip.ip_hl= 0;], - ac_cv_have_ip_hl="yes", - ac_cv_have_ip_hl="no") -]) -if test $ac_cv_have_ip_hl = "yes" ; then - AC_DEFINE(HAVE_IP_HL) -fi +#endif]) dnl Check for typedefs AC_CHECK_SIZEOF(void *) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF_SYSTYPE(__int64) -AC_CHECK_SIZEOF_SYSTYPE(int16_t) -AC_CHECK_SIZEOF_SYSTYPE(uint16_t) -AC_CHECK_SIZEOF_SYSTYPE(u_int16_t) -AC_CHECK_SIZEOF_SYSTYPE(int32_t) -AC_CHECK_SIZEOF_SYSTYPE(uint32_t) -AC_CHECK_SIZEOF_SYSTYPE(u_int32_t) -AC_CHECK_SIZEOF_SYSTYPE(int64_t) -AC_CHECK_SIZEOF_SYSTYPE(uint64_t) -AC_CHECK_SIZEOF_SYSTYPE(u_int64_t) - -dnl int16_t -if test "x$ac_cv_sizeof_short" = "x2"; then - AC_CHECK_SYSTYPE(int16_t,short) -elif test "x$ac_cv_sizeof_int" = "x2"; then - AC_CHECK_SYSTYPE(int16_t,int) -fi -dnl u_int16t_t -if test "x$ac_cv_sizeof_uint16_t" = "x2"; then - AC_CHECK_SYSTYPE(u_int16_t,uint16_t) -elif test "x$ac_cv_sizeof_short" = "x2"; then - AC_CHECK_SYSTYPE(u_int16_t,unsigned short) -elif test "x$ac_cv_sizeof_int" = "x2"; then - AC_CHECK_SYSTYPE(u_int16_t,unsigned int) -fi -dnl int32_t -if test "x$ac_cv_sizeof_int" = "x4"; then - AC_CHECK_SYSTYPE(int32_t,int) -elif "x$ac_cv_sizeof_long" = "x4"; then - AC_CHECK_SYSTYPE(int32_t,long) -fi -dnl u_int32_t -if test "x$ac_cv_sizeof_uint32_t" = "x4"; then - AC_CHECK_SYSTYPE(u_int32_t,uint32_t) -elif test "x$ac_cv_sizeof_int" = "x4"; then - AC_CHECK_SYSTYPE(u_int32_t,unsigned int) -elif test "x$ac_cv_sizeof_long" = "x4"; then - AC_CHECK_SYSTYPE(u_int32_t,unsigned long) -fi -dnl int64_t -if test "x$ac_cv_sizeof_long" = "x8"; then - AC_CHECK_SYSTYPE(int64_t,long) -elif test "x$ac_cv_sizeof_long_long" = "x8"; then - AC_CHECK_SYSTYPE(int64_t,long long) -elif test "x$ac_cv_sizeof___int64" = "x8"; then - AC_CHECK_SYSTYPE(int64_t,__int64) -fi -dnl u_int64_t -if test "x$ac_cv_sizeof_uint64_t" = "x8"; then - AC_CHECK_SYSTYPE(u_int64_t,uint64_t) -elif test "x$ac_cv_sizeof_long" = "x8"; then - AC_CHECK_SYSTYPE(u_int64_t,unsigned long) -elif test "x$ac_cv_sizeof_long_long" = "x8"; then - AC_CHECK_SYSTYPE(u_int64_t,unsigned long long) -elif test "x$ac_cv_sizeof___int64" = "x8"; then - AC_CHECK_SYSTYPE(int64_t,unsigned __int64) -fi - -AC_CHECK_TYPE(pid_t, int) -AC_CHECK_TYPE(size_t, unsigned int) -AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_TYPE(off_t, int) -AC_CHECK_TYPE(mode_t, u_short) -AC_CHECK_TYPE(fd_mask, int) -AC_CHECK_SIZEOF_SYSTYPE(off_t, 4) -AC_CHECK_SIZEOF_SYSTYPE(size_t, 4) +dnl 16 bit integers - int16_t and u_int16_t +dnl if this is defined we trust it to be 16 bits +AC_CHECK_TYPE(int16_t, + AC_DEFINE(HAVE_INT16_T,1,[int16_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +AC_CHECK_TYPE(short,[ + AC_CHECK_SIZEOF(short,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_SHORT,1,[short is defined in system headers]) + ],,SQUID_DEFAULT_INCLUDES) + +dnl fallback #2 +AC_CHECK_TYPE(int,[ + AC_CHECK_SIZEOF(int,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_INT,1,[int is defined in system headers]) + ],,SQUID_DEFAULT_INCLUDES) + +dnl unsigned 16 bit ints - u_int16_t +dnl if this is defined we trust it to be 16 bits +AC_CHECK_TYPE(u_int16_t, + AC_DEFINE(HAVE_U_INT16_T,1,[u_int16_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +dnl if this is defined we trust it to be 16 bits +AC_CHECK_TYPE(uint16_t, + AC_DEFINE(HAVE_UINT16_T,1,[uint16_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl 32 bit signed int - int32_t +dnl if this is defined we trust it to be 32 bits +AC_CHECK_TYPE(int32_t, + AC_DEFINE(HAVE_INT32_T,1,[int32_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +AC_CHECK_TYPE(long,[ + AC_CHECK_SIZEOF(long,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_LONG,1,[long is defined in system headers]) + ],,SQUID_DEFAULT_INCLUDES) + +dnl 32 bit unsigned int - u_int32_t +dnl if this is defined we trust it to be 32 bits +AC_CHECK_TYPE(u_int32_t, + AC_DEFINE(HAVE_U_INT32_T,1,[u_int32_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +dnl if this is defined we trust it to be 32 bits +AC_CHECK_TYPE(uint32_t, + AC_DEFINE(HAVE_UINT32_T,1,[uint32_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl 64 bit signed - int64_t +dnl if this is defind we trust it to be 64 bits +AC_CHECK_TYPE(int64_t, + AC_DEFINE(HAVE_INT64_T,1,[int64_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +dnl if this is defind we trust it to be 64 bits +AC_CHECK_TYPE(__int64, + AC_DEFINE(HAVE___INT64,1,[__int64 is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #2 +AC_CHECK_TYPE(long long,[ + AC_CHECK_SIZEOF(long long,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_LONG_LONG,1,[long long is defined in system headers]) + ],,SQUID_DEFAULT_INCLUDES) + +dnl 64 bit unsigned - u_int64_t +dnl if this is defind we trust it to be 64 bits +AC_CHECK_TYPE(u_int64_t, + AC_DEFINE(HAVE_U_INT64_T,1,[u_int64_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +dnl fallback #1 +dnl if this is defind we trust it to be 64 bits +AC_CHECK_TYPE(uint64_t, + AC_DEFINE(HAVE_UINT64_T,1,[uint64_t is defined in system headers]), + ,SQUID_DEFAULT_INCLUDES) + +AC_CHECK_TYPE(pid_t, AC_DEFINE(HAVE_PID_T,1,[pid_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) +AC_CHECK_TYPE(size_t, [AC_CHECK_SIZEOF(size_t,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_SIZE_T,1,[size_t is defined by the system headers])],,SQUID_DEFAULT_INCLUDES) +AC_CHECK_TYPE(ssize_t, AC_DEFINE(HAVE_SSIZE_T,1,[ssize_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) +AC_CHECK_TYPE(off_t,[ AC_CHECK_SIZEOF(off_t,,SQUID_DEFAULT_INCLUDES) + AC_DEFINE(HAVE_OFF_T,1,[off_t is defined by the system headers])],,SQUID_DEFAULT_INCLUDES) +AC_CHECK_TYPE(mode_t, AC_DEFINE(HAVE_MODE_T,1,[mode_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) +AC_CHECK_TYPE(fd_mask, AC_DEFINE(HAVE_FD_MASK,1,[fd_mask is defined by the system headers]),,SQUID_DEFAULT_INCLUDES) dnl Check for special functions AC_FUNC_ALLOCA - -dnl Check for type in sys/socket.h -AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [ - AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]], [#include +AC_CHECK_TYPE(socklen_t,AC_DEFINE(HAVE_SOCKLEN_T,1,[socklen_t is defined by the system headers]),,[ +#include #include #if STDC_HEADERS #include #include -#endif], - ac_cv_type_socklen_t=yes, - ac_cv_type_socklen_t=no) -]) -if test $ac_cv_type_socklen_t = no; then - AC_DEFINE(socklen_t, int) -fi +#endif]) -dnl Check for mtyp_t in some headers -AC_CACHE_CHECK(for mtyp_t, ac_cv_type_mtyp_t, [ - AC_EGREP_CPP([mtyp_t[^a-zA-Z_0-9]], [#include +AC_CHECK_TYPE(mtyp_t,AC_DEFINE(HAVE_MTYP_T,1,[mtyp_t is defined by the system headers]),,[#include #include -#include ], - ac_cv_type_mtyp_t=yes, - ac_cv_type_mtyp_t=no) -]) -if test $ac_cv_type_mtyp_t = no; then - AC_DEFINE(mtyp_t, long) - fi +#include ]) dnl Check for needed libraries AC_CHECK_LIB(nsl, main) @@ -1527,7 +1521,7 @@ ], squid_cv_unixsocket=yes,squid_cv_unixsocket=no)]) if test x"$squid_cv_unixsocket" = x"yes"; then - AC_DEFINE(HAVE_UNIXSOCKET) + AC_DEFINE(HAVE_UNIXSOCKET,1,[Do we have unix sockets? (required for the winbind ntlm helper]) fi dnl end rip @@ -1638,13 +1632,13 @@ ;; *m88k*) CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_" - AC_DEFINE(GETTIMEOFDAY_NO_TZP) + AC_DEFINE(GETTIMEOFDAY_NO_TZP,1,[If gettimeofday is known to take only one argument]) ;; [*-*-solaris2.[0-4]]) - AC_DEFINE(GETTIMEOFDAY_NO_TZP) + AC_DEFINE(GETTIMEOFDAY_NO_TZP,1) ;; [*-sony-newsos[56]*]) - AC_DEFINE(GETTIMEOFDAY_NO_TZP) + AC_DEFINE(GETTIMEOFDAY_NO_TZP,1) ;; esac @@ -1771,18 +1765,18 @@ if test "$ac_cv_func_poll" = "yes" ; then SELECT_TYPE="poll" - AC_DEFINE(USE_POLL) + AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop]) elif test "$ac_cv_func_select" = "yes" ; then SELECT_TYPE="select" - AC_DEFINE(USE_SELECT) + AC_DEFINE(USE_SELECT,1,[Use select() for the IO loop]) elif test "$ac_cv_func_kqueue" = "yes" ; then SELECT_TYPE="kqueue" - AC_DEFINE(USE_KQUEUE) + AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop]) else echo "Eep! Can't find poll, kqueue or select!" echo "I'll try select and hope for the best." SELECT_TYPE="select" - AC_DEFINE(USE_SELECT) + AC_DEFINE(USE_SELECT,1) fi echo "Using ${SELECT_TYPE} for select loop." @@ -1804,7 +1798,7 @@ ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no") ) if test "$ac_cv_func_setresuid" = "yes" ; then - AC_DEFINE(HAVE_SETRESUID) + 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.]) fi AM_CONDITIONAL(NEED_OWN_SNPRINTF, false) @@ -1909,7 +1903,7 @@ if test "$USE_GNUREGEX" = "yes"; then REGEXLIB="-lregex" LIBREGEX="libregex.a" - AC_DEFINE(USE_GNUREGEX) + AC_DEFINE(USE_GNUREGEX,1,[Define if we should use GNU regex]) fi AC_SUBST(REGEXLIB) AC_SUBST(LIBREGEX) @@ -1948,7 +1942,7 @@ DEFAULT_FD_SETSIZE=256, DEFAULT_FD_SETSIZE=256) AC_MSG_RESULT($DEFAULT_FD_SETSIZE) -AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE) +AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, [Default FD_SETSIZE value]) dnl Not cached since people are likely to tune this @@ -2027,7 +2021,7 @@ SQUID_MAXFD=256) AC_MSG_RESULT($SQUID_MAXFD) fi -AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD) +AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD,[Maximum number of open filedescriptors]) if test "$SQUID_MAXFD" -lt 512 ; then echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your" echo " cache will be very busy. Please see the FAQ page" @@ -2057,11 +2051,11 @@ exit(0); } ], -SQUID_UDP_SO_SNDBUF=`cat conftestval`, -SQUID_UDP_SO_SNDBUF=16384, -SQUID_UDP_SO_SNDBUF=16384) -AC_MSG_RESULT($SQUID_UDP_SO_SNDBUF) -AC_DEFINE_UNQUOTED(SQUID_UDP_SO_SNDBUF, $SQUID_UDP_SO_SNDBUF) +SQUID_DETECT_UDP_SO_SNDBUF=`cat conftestval`, +SQUID_DETECT_UDP_SO_SNDBUF=16384, +SQUID_DETECT_UDP_SO_SNDBUF=16384) +AC_MSG_RESULT($SQUID_DETECT_UDP_SO_SNDBUF) +AC_DEFINE_UNQUOTED(SQUID_DETECT_UDP_SO_SNDBUF, $SQUID_DETECT_UDP_SO_SNDBUF,[UDP send buffer size]) dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default UDP receive buffer size) @@ -2083,11 +2077,11 @@ exit(0); } ], -SQUID_UDP_SO_RCVBUF=`cat conftestval`, -SQUID_UDP_SO_RCVBUF=16384, -SQUID_UDP_SO_RCVBUF=16384) -AC_MSG_RESULT($SQUID_UDP_SO_RCVBUF) -AC_DEFINE_UNQUOTED(SQUID_UDP_SO_RCVBUF, $SQUID_UDP_SO_RCVBUF) +SQUID_DETECT_UDP_SO_RCVBUF=`cat conftestval`, +SQUID_DETECT_UDP_SO_RCVBUF=16384, +SQUID_DETECT_UDP_SO_RCVBUF=16384) +AC_MSG_RESULT($SQUID_DETECT_UDP_SO_RCVBUF) +AC_DEFINE_UNQUOTED(SQUID_DETECT_UDP_SO_RCVBUF, $SQUID_DETECT_UDP_SO_RCVBUF,[UDP receive buffer size]) dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default TCP send buffer size) @@ -2113,7 +2107,7 @@ SQUID_TCP_SO_SNDBUF=16384, SQUID_TCP_SO_SNDBUF=16384) AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF) -AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF) +AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF,[TCP send buffer size]) dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default TCP receive buffer size) @@ -2139,7 +2133,7 @@ SQUID_TCP_SO_RCVBUF=16384, SQUID_TCP_SO_RCVBUF=16384) AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF) -AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF) +AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF,[TCP receive buffer size]) AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist, AC_TRY_COMPILE([#include ],[char *s = sys_errlist;], @@ -2147,14 +2141,14 @@ ac_cv_needs_sys_errlist="yes") ) if test "$ac_cv_needs_sys_errlist" = "yes" ; then - AC_DEFINE(NEED_SYS_ERRLIST) + AC_DEFINE(NEED_SYS_ERRLIST,1,[If we need to declare sys_errlist[] as external]) fi dnl Not cached since people are likely to change this AC_MSG_CHECKING(for libresolv _dns_ttl_ hack) AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;, [AC_MSG_RESULT(yes) -AC_DEFINE(LIBRESOLV_DNS_TTL_HACK)], +AC_DEFINE(LIBRESOLV_DNS_TTL_HACK,1,[If libresolv.a has been hacked to export _dns_ttl_])], AC_MSG_RESULT(no)) AC_MSG_CHECKING(if inet_ntoa() actually works) @@ -2182,7 +2176,7 @@ else AC_MSG_RESULT("no") echo "Will use our own inet_ntoa()." - LIBOBJS="$LIBOBJS inet_ntoa.o" + AC_LIBOBJ(inet_ntoa) # echo "WARNING: This looks bad, and probably prevents Squid from working." # echo " If you're on IRIX and using GCC 2.8, you probably need" # echo " to use the IRIX C compiler instead." @@ -2207,7 +2201,7 @@ ac_cv_func_statvfs=no) AC_MSG_RESULT($ac_cv_func_statvfs) if test "$ac_cv_func_statvfs" = "yes" ; then - AC_DEFINE(HAVE_STATVFS) + AC_DEFINE(HAVE_STATVFS,1,[If your system has statvfs(), and if it actually works!]) fi fi @@ -2233,7 +2227,7 @@ ac_cv_have_res_nsaddr_list="yes", ac_cv_have_res_nsaddr_list="no")) if test $ac_cv_have_res_nsaddr_list = "yes" ; then - AC_DEFINE(HAVE_RES_NSADDR_LIST) + AC_DEFINE(HAVE_RES_NSADDR_LIST,1,[If _res structure has nsaddr_list member]) fi if test $ac_cv_have_res_nsaddr_list = "no" ; then @@ -2259,7 +2253,7 @@ ac_cv_have_res_ns_list="yes", ac_cv_have_res_ns_list="no")) if test $ac_cv_have_res_ns_list = "yes" ; then - AC_DEFINE(HAVE_RES_NS_LIST) + AC_DEFINE(HAVE_RES_NS_LIST,1,[If _res structure has ns_list member]) fi fi @@ -2318,7 +2312,7 @@ dnl src/fs/ufs/Makefile \ dnl src/repl/heap/Makefile \ dnl src/repl/lru/Makefile \ -AC_OUTPUT([\ +AC_CONFIG_FILES([\ Makefile \ lib/Makefile \ scripts/Makefile \ @@ -2370,3 +2364,4 @@ helpers/external_acl/wbinfo_group/Makefile \ helpers/external_acl/winbind_group/Makefile \ ]) +AC_OUTPUT Index: squid/helpers/ntlm_auth/SMB/smbval/std-defines.h diff -u squid/helpers/ntlm_auth/SMB/smbval/std-defines.h:1.2 squid/helpers/ntlm_auth/SMB/smbval/std-defines.h:1.2.22.1 --- squid/helpers/ntlm_auth/SMB/smbval/std-defines.h:1.2 Fri Jun 28 08:01:13 2002 +++ squid/helpers/ntlm_auth/SMB/smbval/std-defines.h Thu Jul 25 04:29:50 2002 @@ -26,7 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "squid_types.h" +#include "config.h" #define BOOL int16_t #define int16 int16_t #define uint16 u_int16_t Index: squid/helpers/ntlm_auth/SMB/smbval/std-includes.h diff -u squid/helpers/ntlm_auth/SMB/smbval/std-includes.h:1.2 squid/helpers/ntlm_auth/SMB/smbval/std-includes.h:1.2.22.1 --- squid/helpers/ntlm_auth/SMB/smbval/std-includes.h:1.2 Fri Jun 28 08:01:14 2002 +++ squid/helpers/ntlm_auth/SMB/smbval/std-includes.h Thu Jul 25 04:29:50 2002 @@ -24,7 +24,7 @@ */ /* the types are provided by squid's configure preocess */ -#include "squid_types.h" +#include "config.h" #define BOOL int16_t #define int16 int16_t Index: squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c diff -u squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c:1.2 squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c:1.2.22.1 --- squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c:1.2 Fri Jun 28 08:01:15 2002 +++ squid/helpers/ntlm_auth/fakeauth/fakeauth_auth.c Thu Jul 25 04:29:50 2002 @@ -13,7 +13,6 @@ */ #include "config.h" -#include "squid_types.h" #include "ntlmauth.h" #include "ntlm.h" Index: squid/include/config.h diff -u squid/include/config.h:1.5 squid/include/config.h:1.5.42.4 --- squid/include/config.h:1.5 Tue Nov 13 14:19:32 2001 +++ squid/include/config.h Thu Jul 25 05:49:04 2002 @@ -120,26 +120,121 @@ * the return codes of programs in if statements. These options * need to be overridden. */ -#ifndef socklen_t -#define socklen_t int #endif -#ifndef fd_mask -#define fd_mask unsigned long + +/* Typedefs for missing entries on a system */ + +#include "squid_types.h" + +/* int16_t */ +#ifndef HAVE_INT16_T +#if HAVE_SHORT && SIZEOF_SHORT == 2 +typedef short int16_t; +#elif HAVE_INT && SIZEOF_INT == 2 +typedef int int16_t; +#else +#error NO 16 bit signed type available +#endif +#endif + +/* u_int16_t */ +#ifndef HAVE_U_INT16_T +#if HAVE_UINT16_T +typedef uint16_t u_int16_t; +#else +typedef unsigned int16_t u_int16_t; +#endif +#endif + +/* int32_t */ +#ifndef HAVE_INT32_T +#if HAVE_INT && SIZEOF_INT == 4 +typedef int int32_t; +#elif HAVE_LONG && SIZEOF_LONG == 4 +typedef long int32_t; +#else +#error NO 32 bit signed type available +#endif +#endif + +/* u_int32_t */ +#ifndef HAVE_U_INT32_T +#if HAVE_UINT32_T +typedef uint32_t u_int32_t; +#else +typedef unsigned int32_t u_int32_t; #endif #endif +/* int64_t */ +#ifndef HAVE_INT64_T +#if HAVE___INT64 +typedef __int64 int64_t; +#elif HAVE_LONG && SIZEOF_LONG == 8 +typedef long int64_t; +#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8 +typedef long long int64_t; +#else +#error NO 64 bit signed type available +#endif +#endif + +/* u_int64_t */ +#ifndef HAVE_U_INT64_T +#if HAVE_UINT64_T +typedef uint64_t u_int64_t; +#else +typedef unsigned int64_t u_int64_t; +#endif +#endif + + +#ifndef HAVE_PID_T +typedef int pid_t; +#endif + +#ifndef HAVE_SIZE_T +typedef unsigned int size_t; +#endif + +#ifndef HAVE_SSIZE_T +typedef int ssize_t; +#endif + +#ifndef HAVE_OFF_T +typedef int off_t; +#endif + +#ifndef HAVE_MODE_T +typedef unsigned short mode_t; +#endif + +#ifndef HAVE_FD_MASK +typedef unsigned long fd_mask; +#endif + +#ifndef HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + +#ifndef HAVE_MTYP_T +typedef long mtyp_t; +#endif + #if !defined(CACHEMGR_HOSTNAME) #define CACHEMGR_HOSTNAME "" #endif -#if SQUID_UDP_SO_SNDBUF > 16384 -#undef SQUID_UDP_SO_SNDBUF +#if SQUID_DETECT_UDP_SO_SNDBUF > 16384 #define SQUID_UDP_SO_SNDBUF 16384 +#else +#define SQUID_UDP_SO_SNDBUF SQUID_DETECT_UDP_SO_SNDBUF #endif -#if SQUID_UDP_SO_RCVBUF > 16384 -#undef SQUID_UDP_SO_RCVBUF +#if SQUID_DETECT_UDP_SO_RCVBUF > 16384 #define SQUID_UDP_SO_RCVBUF 16384 +#else +#define SQUID_UDP_SO_RCVBUF SQUID_DETECT_UDP_SO_RCVBUF #endif #ifdef HAVE_MEMCPY Index: squid/include/md5.h diff -u squid/include/md5.h:1.8 squid/include/md5.h:1.8.34.1 --- squid/include/md5.h:1.8 Tue Nov 13 14:19:32 2001 +++ squid/include/md5.h Thu Jul 25 04:29:51 2002 @@ -52,7 +52,7 @@ * documentation and/or software. */ -#include "squid_types.h" +#include "config.h" /* MD5 context. */ typedef struct { Index: squid/include/ntlmauth.h diff -u squid/include/ntlmauth.h:1.9 squid/include/ntlmauth.h:1.9.34.1 --- squid/include/ntlmauth.h:1.9 Tue Nov 13 14:19:32 2001 +++ squid/include/ntlmauth.h Thu Jul 25 04:29:51 2002 @@ -54,7 +54,7 @@ #define SQUID_NTLMAUTH_H /* int*_t */ -#include "squid_types.h" +#include "config.h" /* All of this cruft is little endian */ #ifdef WORDS_BIGENDIAN Index: squid/lib/rfc1123.c diff -u squid/lib/rfc1123.c:1.6 squid/lib/rfc1123.c:1.6.34.1 --- squid/lib/rfc1123.c:1.6 Thu Oct 18 13:52:10 2001 +++ squid/lib/rfc1123.c Wed Jul 24 16:51:20 2002 @@ -245,7 +245,7 @@ tm->tm_isdst = -1; #ifdef HAVE_TIMEGM t = timegm(tm); -#elif HAVE_TM_GMTOFF +#elif HAVE_TM_TM_GMTOFF t = mktime(tm); { struct tm *local = localtime(&t); Index: squid/src/pinger.c diff -u squid/src/pinger.c:1.4 squid/src/pinger.c:1.4.86.1 --- squid/src/pinger.c:1.4 Fri Jan 12 00:20:33 2001 +++ squid/src/pinger.c Wed Jul 24 16:51:21 2002 @@ -224,15 +224,15 @@ #endif debug(42, 9) ("pingerRecv: %d bytes from %s\n", n, inet_ntoa(from.sin_addr)); ip = (struct iphdr *) (void *) pkt; -#if HAVE_IP_HL +#if HAVE_STRUCT_IPHDR_IP_HL iphdrlen = ip->ip_hl << 2; -#else /* HAVE_IP_HL */ +#else /* HAVE_STRUCT_IPHDR_IP_HL */ #if WORDS_BIGENDIAN iphdrlen = (ip->ip_vhl >> 4) << 2; #else iphdrlen = (ip->ip_vhl & 0xF) << 2; #endif -#endif /* HAVE_IP_HL */ +#endif /* HAVE_STRUCT_IPHDR_IP_HL */ icmp = (struct icmphdr *) (void *) (pkt + iphdrlen); if (icmp->icmp_type != ICMP_ECHOREPLY) return; Index: squid/src/stat.c diff -u squid/src/stat.c:1.19 squid/src/stat.c:1.17.8.2 --- squid/src/stat.c:1.19 Tue Sep 24 03:59:16 2002 +++ squid/src/stat.c Sat Oct 5 18:18:23 2002 @@ -561,7 +561,7 @@ t = mp.arena + mp.hblkhd; storeAppendPrintf(sentry, "\tTotal size: %6d KB\n", t >> 10); -#if HAVE_EXT_MALLINFO +#if HAVE_STRUCT_MALLINFO_MXFAST storeAppendPrintf(sentry, "\tmax size of small blocks:\t%d\n", mp.mxfast); storeAppendPrintf(sentry, "\tnumber of small blocks in a holding block:\t%d\n", mp.nlblks); @@ -572,7 +572,7 @@ mp.allocated); storeAppendPrintf(sentry, "\tbytes used in maintaining the free tree:\t%d\n", mp.treeoverhead); -#endif /* HAVE_EXT_MALLINFO */ +#endif /* HAVE_STRUCT_MALLINFO_MXFAST */ #endif /* HAVE_MALLINFO */ storeAppendPrintf(sentry, "Memory accounted for:\n"); #if !(HAVE_MSTATS && HAVE_GNUMALLOC_H) && HAVE_MALLINFO && HAVE_STRUCT_MALLINFO Index: squid/src/tools.c diff -u squid/src/tools.c:1.28 squid/src/tools.c:1.24.6.2 --- squid/src/tools.c:1.28 Sun Sep 15 04:06:33 2002 +++ squid/src/tools.c Sat Oct 5 18:18:24 2002 @@ -150,7 +150,7 @@ t = mp.fsmblks + mp.fordblks; fprintf(debug_log, "\tTotal free: %6d KB %d%%\n", t >> 10, percent(t, mp.arena)); -#if HAVE_EXT_MALLINFO +#if HAVE_STRUCT_MALLINFO_MXFAST fprintf(debug_log, "\tmax size of small blocks:\t%d\n", mp.mxfast); fprintf(debug_log, "\tnumber of small blocks in a holding block:\t%d\n", @@ -163,7 +163,7 @@ mp.allocated); fprintf(debug_log, "\tbytes used in maintaining the free tree:\t%d\n", mp.treeoverhead); -#endif /* HAVE_EXT_MALLINFO */ +#endif /* HAVE_STRUCT_MALLINFO_MXFAST */ #endif /* HAVE_MALLINFO */ }