upload process established. run make webserver and
[privoxy.git] / config.h.in
1 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
2 #ifndef CONFIG_H_INCLUDED
3 #define CONFIG_H_INCLUDED
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/acconfig.h,v $
7  *
8  * Purpose     :  This file should be the first thing included in every
9  *                .c file.  (Before even system headers).  It contains 
10  *                #define statements for various features.  It was
11  *                introduced because the compile command line started
12  *                getting ludicrously long with feature defines.
13  *
14  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
15  *                IJBSWA team.  http://ijbswa.sourceforge.net
16  *
17  *                Based on the Internet Junkbuster originally written
18  *                by and Copyright (C) 1997 Anonymous Coders and 
19  *                Junkbusters Corporation.  http://www.junkbusters.com
20  *
21  *                This program is free software; you can redistribute it 
22  *                and/or modify it under the terms of the GNU General
23  *                Public License as published by the Free Software
24  *                Foundation; either version 2 of the License, or (at
25  *                your option) any later version.
26  *
27  *                This program is distributed in the hope that it will
28  *                be useful, but WITHOUT ANY WARRANTY; without even the
29  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
30  *                PARTICULAR PURPOSE.  See the GNU General Public
31  *                License for more details.
32  *
33  *                The GNU General Public License should be included with
34  *                this file.  If not, you can view it at
35  *                http://www.gnu.org/copyleft/gpl.html
36  *                or write to the Free Software Foundation, Inc., 59
37  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
38  *
39  * Revisions   :
40  *    $Log: acconfig.h,v $
41  *    Revision 1.12  2001/09/13 19:56:37  jongfoster
42  *    Reverting to revision 1.10 - previous checking was majorly broken.
43  *
44  *    Revision 1.10  2001/07/30 22:08:36  jongfoster
45  *    Tidying up #defines:
46  *    - All feature #defines are now of the form FEATURE_xxx
47  *    - Permanently turned off WIN_GUI_EDIT
48  *    - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS
49  *
50  *    Revision 1.9  2001/07/29 19:08:52  jongfoster
51  *    Changing _CONFIG_H to CONFIG_H_INCLUDED.
52  *    Also added protection against using a MinGW32 or CygWin version of
53  *    config.h from within MS Visual C++
54  *
55  *    Revision 1.8  2001/07/29 17:09:17  jongfoster
56  *    Major changes to build system in order to fix these bugs:
57  *    - pthreads under Linux was broken - changed -lpthread to -pthread
58  *    - Compiling in MinGW32 mode under CygWin now correctly detects
59  *      which shared libraries are available
60  *    - Solaris support (?) (Not tested under Solaris yet)
61  *
62  *    Revision 1.7  2001/07/25 22:53:59  jongfoster
63  *    Will #error if pthreads is enabled under BeOs
64  *
65  *    Revision 1.6  2001/07/15 17:54:29  jongfoster
66  *    Renaming #define STATIC to STATIC_PCRE
67  *    Adding new #define FEATURE_PTHREAD that will be used to enable
68  *    POSIX threads support.
69  *
70  *    Revision 1.5  2001/07/13 13:48:37  oes
71  *     - (Fix:) Copied CODE_STATUS #define from config.h.in
72  *     - split REGEX #define into REGEX_GNU and REGEX_PCRE
73  *       and removed PCRE.
74  *       (REGEX = REGEX_GNU || REGEX_PCRE per project.h)
75  *     - Moved STATIC (for pcre) here from Makefile.in
76  *     - Introduced STATIC_PCRS #define to allow for dynaimc linking with
77  *       libpcrs
78  *     - Removed PCRS #define, since pcrs is now needed for CGI anyway
79  *
80  *    Revision 1.4  2001/05/29 09:50:24  jongfoster
81  *    Unified blocklist/imagelist/permissionslist.
82  *    File format is still under discussion, but the internal changes
83  *    are (mostly) done.
84  *
85  *    Also modified interceptor behaviour:
86  *    - We now intercept all URLs beginning with one of the following
87  *      prefixes (and *only* these prefixes):
88  *        * http://i.j.b/
89  *        * http://ijbswa.sf.net/config/
90  *        * http://ijbswa.sourceforge.net/config/
91  *    - New interceptors "home page" - go to http://i.j.b/ to see it.
92  *    - Internal changes so that intercepted and fast redirect pages
93  *      are not replaced with an image.
94  *    - Interceptors now have the option to send a binary page direct
95  *      to the client. (i.e. ijb-send-banner uses this)
96  *    - Implemented show-url-info interceptor.  (Which is why I needed
97  *      the above interceptors changes - a typical URL is
98  *      "http://i.j.b/show-url-info?url=www.somesite.com/banner.gif".
99  *      The previous mechanism would not have intercepted that, and
100  *      if it had been intercepted then it then it would have replaced
101  *      it with an image.)
102  *
103  *    Revision 1.3  2001/05/26 01:26:34  jongfoster
104  *    New #define, WIN_GUI_EDIT, enables the (embryonic) Win32 GUI editor.
105  *    This #define cannot be set from ./configure - there's no point, it
106  *    doesn't work yet.  See feature request # 425722
107  *
108  *    Revision 1.2  2001/05/22 17:43:35  oes
109  *
110  *    - Enabled filtering banners by size rather than URL
111  *      by adding patterns that replace all standard banner
112  *      sizes with the "Junkbuster" gif to the re_filterfile
113  *
114  *    - Enabled filtering WebBugs by providing a pattern
115  *      which kills all 1x1 images
116  *
117  *    - Added support for PCRE_UNGREEDY behaviour to pcrs,
118  *      which is selected by the (nonstandard and therefore
119  *      capital) letter 'U' in the option string.
120  *      It causes the quantifiers to be ungreedy by default.
121  *      Appending a ? turns back to greedy (!).
122  *
123  *    - Added a new interceptor ijb-send-banner, which
124  *      sends back the "Junkbuster" gif. Without imagelist or
125  *      MSIE detection support, or if tinygif = 1, or the
126  *      URL isn't recognized as an imageurl, a lame HTML
127  *      explanation is sent instead.
128  *
129  *    - Added new feature, which permits blocking remote
130  *      script redirects and firing back a local redirect
131  *      to the browser.
132  *      The feature is conditionally compiled, i.e. it
133  *      can be disabled with --disable-fast-redirects,
134  *      plus it must be activated by a "fast-redirects"
135  *      line in the config file, has its own log level
136  *      and of course wants to be displayed by show-proxy-args
137  *      Note: Boy, all the #ifdefs in 1001 locations and
138  *      all the fumbling with configure.in and acconfig.h
139  *      were *way* more work than the feature itself :-(
140  *
141  *    - Because a generic redirect template was needed for
142  *      this, tinygif = 3 now uses the same.
143  *
144  *    - Moved GIFs, and other static HTTP response templates
145  *      to project.h
146  *
147  *    - Many minor fixes
148  *
149  *    - Removed some >400 CRs again (Jon, you really worked
150  *      a lot! ;-)
151  *
152  *    Revision 1.1.1.1  2001/05/15 13:58:45  oes
153  *    Initial import of version 2.9.3 source tree
154  *
155  *
156  *********************************************************************/
157 \f
158
159
160 /*
161  * Version number - Major (X._._)
162  */
163 #undef VERSION_MAJOR
164
165 /*
166  * Version number - Minor (_.X._)
167  */
168 #undef VERSION_MINOR
169
170 /*
171  * Version number - Point (_._.X)
172  */
173 #undef VERSION_POINT
174
175 /*
176  * Version number, as a string
177  */
178 #undef VERSION
179
180 /*
181  * Status of the code: "alpha", "beta" or "stable".
182  */
183 #undef CODE_STATUS
184
185 /*
186  * Regular expression matching for URLs.  (Highly recommended).
187  * If neither of these are defined then you can ony use prefix matching.
188  * Don't bother to change this here! Use configure instead.
189  */
190 #undef REGEX_GNU
191 #undef REGEX_PCRE
192
193 /* 
194  * Should pcre be statically built in instead of linkling with libpcre?
195  * (This is determined by configure depending on the availiability of
196  * libpcre and user preferences). The name is ugly, but pcre needs it.
197  * Don't bother to change this here! Use configure instead.
198  */
199 #undef STATIC_PCRE
200
201 /* 
202  * Should pcrs be statically built in instead of linkling with libpcrs?
203  * (This is determined by configure depending on the availiability of
204  * libpcrs and user preferences).
205  * Don't bother to change this here! Use configure instead.
206  */
207 #undef STATIC_PCRS
208
209 /*
210  * Allows the use of an ACL to control access to the proxy by IP address.
211  */
212 #undef FEATURE_ACL
213
214 /*
215  * Allows the use of jar files to capture cookies.
216  */
217 #undef FEATURE_COOKIE_JAR
218
219 /*
220  * If a stream is compressed via gzip, then it cannot be filtered through
221  * the PCRE regexps.  (Commonly happens with Netscape browsers).
222  * This forces it to be uncompressed.
223  */
224 #undef FEATURE_DENY_GZIP
225
226 /*
227  * Locally redirect remote script-redirect URLs
228  */
229 #undef FEATURE_FAST_REDIRECTS
230
231 /*
232  * Bypass filtering for 1 page only
233  */
234 #undef FEATURE_FORCE_LOAD
235
236 /*
237  * Allow blocking using images as well as HTML.
238  * If you do not define this then everything is blocked as HTML.
239  *
240  * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
241  */
242 #undef FEATURE_IMAGE_BLOCKING
243
244 /*
245  * Detect image requests automatically for MSIE.  Will fall back to
246  * other image-detection methods (i.e. "+image" permission) for other
247  * browsers.
248  *
249  * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
250  *
251  * It detects the following header pair as an image request:
252  *
253  * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
254  * Accept: * / *
255  *
256  * And the following as a HTML request:
257  *
258  * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
259  * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / *
260  *
261  * And no, I haven't got that backwards - IE is being wierd.
262  *
263  * Known limitations: 
264  * 1) If you press shift-reload on a blocked HTML page, you get
265  *    the image "blocked" page, not the HTML "blocked" page.
266  * 2) Once an image "blocked" page has been sent, viewing it 
267  *    in it's own browser window *should* bring up the HTML
268  *    "blocked" page, but it doesn't.  You need to clear the 
269  *    browser cache to get the HTML version again.
270  *
271  * These limitations are due to IE making inconsistent choices
272  * about which "Accept:" header to send.
273  */
274 #undef FEATURE_IMAGE_DETECT_MSIE
275
276 /*
277  * Kills JavaScript popups - window.open, onunload, etc.
278  */
279 #undef FEATURE_KILL_POPUPS
280
281 /*
282  * Use POSIX threads instead of native threads.
283  */
284 #undef FEATURE_PTHREAD
285
286 /*
287  * Enables statistics function.
288  */
289 #undef FEATURE_STATISTICS
290
291 /*
292  * Allow JunkBuster to be "disabled" so it is just a normal non-blocking
293  * non-anonymizing proxy.  This is useful if you're trying to access a
294  * blocked or broken site - just change the setting in the config file,
295  * or use the handy "Disable" menu option in the Windows GUI.
296  */
297 #undef FEATURE_TOGGLE
298
299 /*
300  * Allows the use of trust files.
301  */
302 #undef FEATURE_TRUST
303
304 /*
305  * Defined on Solaris only.  Makes the system libraries thread safe.
306  */
307 #undef _REENTRANT
308
309 /*
310  * Defined on Solaris only.  Without this, many important functions are not
311  * defined in the system headers.
312  */
313 #undef __EXTENSIONS__
314
315 /*
316  * Defined always.
317  * FIXME: Don't know what it does or why we need it.
318  * (presumably something to do with MultiThreading?)
319  */
320 #undef __MT__
321
322
323 /* Define if you have the `bcopy' function. */
324 #undef HAVE_BCOPY
325
326 /* Define if you have the <inttypes.h> header file. */
327 #undef HAVE_INTTYPES_H
328
329 /* Define if you have the `memmove' function. */
330 #undef HAVE_MEMMOVE
331
332 /* Define if you have the <memory.h> header file. */
333 #undef HAVE_MEMORY_H
334
335 /* Define if you have the <stdint.h> header file. */
336 #undef HAVE_STDINT_H
337
338 /* Define if you have the <stdlib.h> header file. */
339 #undef HAVE_STDLIB_H
340
341 /* Define if you have the `strerror' function. */
342 #undef HAVE_STRERROR
343
344 /* Define if you have the <strings.h> header file. */
345 #undef HAVE_STRINGS_H
346
347 /* Define if you have the <string.h> header file. */
348 #undef HAVE_STRING_H
349
350 /* Define if you have the <sys/stat.h> header file. */
351 #undef HAVE_SYS_STAT_H
352
353 /* Define if you have the <sys/types.h> header file. */
354 #undef HAVE_SYS_TYPES_H
355
356 /* Define if you have the <unistd.h> header file. */
357 #undef HAVE_UNISTD_H
358
359 /* The size of a `char *', as computed by sizeof. */
360 #undef SIZEOF_CHAR_P
361
362 /* The size of a `int', as computed by sizeof. */
363 #undef SIZEOF_INT
364
365 /* The size of a `long', as computed by sizeof. */
366 #undef SIZEOF_LONG
367
368 /* The size of a `long long', as computed by sizeof. */
369 #undef SIZEOF_LONG_LONG
370
371 /* The size of a `size_t', as computed by sizeof. */
372 #undef SIZEOF_SIZE_T
373
374 /* Define if you have the ANSI C header files. */
375 #undef STDC_HEADERS
376
377 /* Define to empty if `const' does not conform to ANSI C. */
378 #undef const
379
380 /* Define to `unsigned' if <sys/types.h> does not define. */
381 #undef size_t
382
383 /*
384  * Defined always.
385  * FIXME: Don't know what it does or why we need it.
386  * (presumably something to do with ANSI Standard C?)
387  */
388 #ifndef __STDC__
389 #define __STDC__ 1
390 #endif /* ndef __STDC__ */
391
392 /*
393  * Need to set up this define only for the Pthreads library for
394  * Win32, available from http://sources.redhat.com/pthreads-win32/
395  */
396 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
397 #define __CLEANUP_C
398 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
399
400 /*
401  * BEOS does not currently support POSIX threads.
402  * This *should* be detected by ./configure, but let's be sure.
403  */
404 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
405 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
406
407 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
408
409
410 /*
411  * It's too easy to accidentally use a Cygwin or MinGW32 version of config.h
412  * under VC++, and it usually gives many wierd error messages.  Let's make
413  * the error messages understandable, by bailing out now.
414  */
415 #ifdef _MSC_VER
416 #error For MS VC++, please use config.h.win or config.h.win32threads.win.  You can usually do this by selecting the "Build", "Clean" menu option.
417 #endif /* def _MSC_VER */
418
419 #endif /* CONFIG_H_INCLUDED */