1 #ifndef CONFIG_H_INCLUDED
2 #define CONFIG_H_INCLUDED
3 /*********************************************************************
5 * File : $Source: /cvsroot/ijbswa/current/acconfig.h,v $
7 * Purpose : This file should be the first thing included in every
8 * .c file. (Before even system headers). It contains
9 * #define statements for various features. It was
10 * introduced because the compile command line started
11 * getting ludicrously long with feature defines.
13 * Copyright : Written by and Copyright (C) 2001 the SourceForge
14 * Privoxy team. http://www.privoxy.org/
16 * Based on the Internet Junkbuster originally written
17 * by and Copyright (C) 1997 Anonymous Coders and
18 * Junkbusters Corporation. http://www.junkbusters.com
20 * This program is free software; you can redistribute it
21 * and/or modify it under the terms of the GNU General
22 * Public License as published by the Free Software
23 * Foundation; either version 2 of the License, or (at
24 * your option) any later version.
26 * This program is distributed in the hope that it will
27 * be useful, but WITHOUT ANY WARRANTY; without even the
28 * implied warranty of MERCHANTABILITY or FITNESS FOR A
29 * PARTICULAR PURPOSE. See the GNU General Public
30 * License for more details.
32 * The GNU General Public License should be included with
33 * this file. If not, you can view it at
34 * http://www.gnu.org/copyleft/gpl.html
35 * or write to the Free Software Foundation, Inc., 59
36 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 *********************************************************************/
43 * Version number - Major (X._._)
48 * Version number - Minor (_.X._)
53 * Version number - Point (_._.X)
58 * Version number, as a string
63 * Status of the code: "alpha", "beta" or "stable".
68 * Should pcre be statically built in instead of linkling with libpcre?
69 * (This is determined by configure depending on the availiability of
70 * libpcre and user preferences). The name is ugly, but pcre needs it.
71 * Don't bother to change this here! Use configure instead.
76 * Should pcrs be statically built in instead of linkling with libpcrs?
77 * (This is determined by configure depending on the availiability of
78 * libpcrs and user preferences).
79 * Don't bother to change this here! Use configure instead.
84 * Allows the use of an ACL to control access to the proxy by IP address.
89 * Enables the web-based configuration (actionsfile) editor. If you
90 * have a shared proxy, you might want to turn this off.
92 #undef FEATURE_CGI_EDIT_ACTIONS
95 * Allows the use of jar files to capture cookies.
97 #undef FEATURE_COOKIE_JAR
100 * Locally redirect remote script-redirect URLs
102 #undef FEATURE_FAST_REDIRECTS
105 * Bypass filtering for 1 page only
107 #undef FEATURE_FORCE_LOAD
110 * Allow blocking using images as well as HTML.
111 * If you do not define this then everything is blocked as HTML.
113 * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
115 #undef FEATURE_IMAGE_BLOCKING
118 * Detect image requests automatically for MSIE. Will fall back to
119 * other image-detection methods (i.e. "+image" permission) for other
122 * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
124 * It detects the following header pair as an image request:
126 * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
129 * And the following as a HTML request:
131 * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
132 * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / *
134 * And no, I haven't got that backwards - IE is being wierd.
137 * 1) If you press shift-reload on a blocked HTML page, you get
138 * the image "blocked" page, not the HTML "blocked" page.
139 * 2) Once an image "blocked" page has been sent, viewing it
140 * in it's own browser window *should* bring up the HTML
141 * "blocked" page, but it doesn't. You need to clear the
142 * browser cache to get the HTML version again.
144 * These limitations are due to IE making inconsistent choices
145 * about which "Accept:" header to send.
147 #undef FEATURE_IMAGE_DETECT_MSIE
150 * Kills JavaScript popups - window.open, onunload, etc.
152 #undef FEATURE_KILL_POPUPS
155 * Use PNG instead of GIF for built-in images
157 #undef FEATURE_NO_GIFS
160 * Allow to shutdown Privoxy through the webinterface.
162 #undef FEATURE_GRACEFUL_TERMINATION
165 * Allow PCRE syntax in host patterns.
167 #undef FEATURE_EXTENDED_HOST_PATTERNS
170 * Keep outgoing connections alive if possible.
172 #undef FEATURE_CONNECTION_KEEP_ALIVE
175 * Use POSIX threads instead of native threads.
177 #undef FEATURE_PTHREAD
180 * Enables statistics function.
182 #undef FEATURE_STATISTICS
185 * Allow Privoxy to be "disabled" so it is just a normal non-blocking
186 * non-anonymizing proxy. This is useful if you're trying to access a
187 * blocked or broken site - just change the setting in the config file,
188 * or use the handy "Disable" menu option in the Windows GUI.
190 #undef FEATURE_TOGGLE
193 * Allows the use of trust files.
198 * Defined on Solaris only. Makes the system libraries thread safe.
203 * Defined on Solaris only. Without this, many important functions are not
204 * defined in the system headers.
206 #undef __EXTENSIONS__
210 * FIXME: Don't know what it does or why we need it.
211 * (presumably something to do with MultiThreading?)
215 /* If the (nonstandard and thread-safe) function gethostbyname_r
216 * is available, select which signature to use
218 #undef HAVE_GETHOSTBYNAME_R_6_ARGS
219 #undef HAVE_GETHOSTBYNAME_R_5_ARGS
220 #undef HAVE_GETHOSTBYNAME_R_3_ARGS
222 /* If the (nonstandard and thread-safe) function gethostbyaddr_r
223 * is available, select which signature to use
225 #undef HAVE_GETHOSTBYADDR_R_8_ARGS
226 #undef HAVE_GETHOSTBYADDR_R_7_ARGS
227 #undef HAVE_GETHOSTBYADDR_R_5_ARGS
229 /* Defined if you have gmtime_r and localtime_r with a signature
230 * of (struct time *, struct tm *)
233 #undef HAVE_LOCALTIME_R
235 /* Define to 'int' if <sys/socket.h> doesn't have it.
239 /* Define if pcre.h must be included as <pcre/pcre.h>
241 #undef PCRE_H_IN_SUBDIR
243 /* Define if pcreposix.h must be included as <pcre/pcreposix.h>
245 #undef PCREPOSIX_H_IN_SUBDIR
251 * FIXME: Don't know what it does or why we need it.
252 * (presumably something to do with ANSI Standard C?)
256 #endif /* ndef __STDC__ */
259 * Need to set up this define only for the Pthreads library for
260 * Win32, available from http://sources.redhat.com/pthreads-win32/
262 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
264 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
267 * BEOS does not currently support POSIX threads.
268 * This *should* be detected by ./configure, but let's be sure.
270 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
271 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
273 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
276 * On OpenBSD and maybe also FreeBSD, gcc doesn't define the cpp
277 * symbol unix; it defines __unix__ and sometimes not even that:
279 #if ( defined(__unix__) || defined(__NetBSD__) ) && !defined(unix)
284 * It's too easy to accidentally use a Cygwin or MinGW32 version of config.h
285 * under VC++, and it usually gives many wierd error messages. Let's make
286 * the error messages understandable, by bailing out now.
289 #error For MS VC++, please use vc_config_winthreads.h or vc_config_pthreads.h. You can usually do this by selecting the "Build", "Clean" menu option.
290 #endif /* def _MSC_VER */
292 #endif /* CONFIG_H_INCLUDED */