Version -> 2.9.5
[privoxy.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl 
3 dnl $Id: configure.in,v 1.5 2001/06/29 13:26:27 oes Exp $
4 dnl 
5 dnl Written by and Copyright (C) 2001 the SourceForge
6 dnl IJBSWA team.  http://ijbswa.sourceforge.net
7 dnl
8 dnl Based on the Internet Junkbuster originally written
9 dnl by and Copyright (C) 1997 Anonymous Coders and 
10 dnl Junkbusters Corporation.  http://www.junkbusters.com
11 dnl
12 dnl This program is free software; you can redistribute it 
13 dnl and/or modify it under the terms of the GNU General
14 dnl Public License as published by the Free Software
15 dnl Foundation; either version 2 of the License, or (at
16 dnl your option) any later version.
17 dnl 
18 dnl This program is distributed in the hope that it will
19 dnl be useful, but WITHOUT ANY WARRANTY; without even the
20 dnl implied warranty of MERCHANTABILITY or FITNESS FOR A
21 dnl PARTICULAR PURPOSE.  See the GNU General Public
22 dnl License for more details.
23 dnl 
24 dnl The GNU General Public License should be included with
25 dnl this file.  If not, you can view it at
26 dnl http://www.gnu.org/copyleft/gpl.html
27 dnl or write to the Free Software Foundation, Inc., 59
28 dnl Temple Place - Suite 330, Boston, MA  02111-1307, USA.
29 dnl 
30 dnl $Log: configure.in,v $
31 dnl Revision 1.5  2001/06/29 13:26:27  oes
32 dnl Introduced #define CODE_STATUS
33 dnl
34 dnl Revision 1.4  2001/05/29 09:50:24  jongfoster
35 dnl Unified blocklist/imagelist/permissionslist.
36 dnl File format is still under discussion, but the internal changes
37 dnl are (mostly) done.
38 dnl
39 dnl Also modified interceptor behaviour:
40 dnl - We now intercept all URLs beginning with one of the following
41 dnl   prefixes (and *only* these prefixes):
42 dnl     * http://i.j.b/
43 dnl     * http://ijbswa.sf.net/config/
44 dnl     * http://ijbswa.sourceforge.net/config/
45 dnl - New interceptors "home page" - go to http://i.j.b/ to see it.
46 dnl - Internal changes so that intercepted and fast redirect pages
47 dnl   are not replaced with an image.
48 dnl - Interceptors now have the option to send a binary page direct
49 dnl   to the client. (i.e. ijb-send-banner uses this)
50 dnl - Implemented show-url-info interceptor.  (Which is why I needed
51 dnl   the above interceptors changes - a typical URL is
52 dnl   "http://i.j.b/show-url-info?url=www.somesite.com/banner.gif".
53 dnl   The previous mechanism would not have intercepted that, and
54 dnl   if it had been intercepted then it then it would have replaced
55 dnl   it with an image.)
56 dnl
57 dnl Revision 1.3  2001/05/22 18:46:04  oes
58 dnl
59 dnl - Enabled filtering banners by size rather than URL
60 dnl   by adding patterns that replace all standard banner
61 dnl   sizes with the "Junkbuster" gif to the re_filterfile
62 dnl
63 dnl - Enabled filtering WebBugs by providing a pattern
64 dnl   which kills all 1x1 images
65 dnl
66 dnl - Added support for PCRE_UNGREEDY behaviour to pcrs,
67 dnl   which is selected by the (nonstandard and therefore
68 dnl   capital) letter 'U' in the option string.
69 dnl   It causes the quantifiers to be ungreedy by default.
70 dnl   Appending a ? turns back to greedy (!).
71 dnl
72 dnl - Added a new interceptor ijb-send-banner, which
73 dnl   sends back the "Junkbuster" gif. Without imagelist or
74 dnl   MSIE detection support, or if tinygif = 1, or the
75 dnl   URL isn't recognized as an imageurl, a lame HTML
76 dnl   explanation is sent instead.
77 dnl
78 dnl - Added new feature, which permits blocking remote
79 dnl   script redirects and firing back a local redirect
80 dnl   to the browser.
81 dnl   The feature is conditionally compiled, i.e. it
82 dnl   can be disabled with --disable-fast-redirects,
83 dnl   plus it must be activated by a "fast-redirects"
84 dnl   line in the config file, has its own log level
85 dnl   and of course wants to be displayed by show-proxy-args
86 dnl   Note: Boy, all the #ifdefs in 1001 locations and
87 dnl   all the fumbling with configure.in and acconfig.h
88 dnl   were *way* more work than the feature itself :-(
89 dnl
90 dnl - Because a generic redirect template was needed for
91 dnl   this, tinygif = 3 now uses the same.
92 dnl
93 dnl - Moved GIFs, and other static HTTP response templates
94 dnl   to project.h
95 dnl
96 dnl - Some minor fixes
97 dnl
98 dnl - Removed some >400 CRs again (Jon, you really worked
99 dnl   a lot! ;-)
100 dnl
101 dnl Revision 1.2  2001/05/20 01:21:20  jongfoster
102 dnl Version 2.9.4 checkin.
103 dnl - Merged popupfile and cookiefile, and added control over PCRS
104 dnl   filtering, in new "permissionsfile".
105 dnl - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
106 dnl   file error you now get a message box (in the Win32 GUI) rather
107 dnl   than the program exiting with no explanation.
108 dnl - Made killpopup use the PCRS MIME-type checking and HTTP-header
109 dnl   skipping.
110 dnl - Removed tabs from "config"
111 dnl - Moved duplicated url parsing code in "loaders.c" to a new funcition.
112 dnl - Bumped up version number.
113 dnl
114 dnl Revision 1.1.1.1  2001/05/15 13:58:50  oes
115 dnl Initial import of version 2.9.3 source tree
116 dnl
117 dnl 
118 AC_INIT(jcc.c)
119 AC_CONFIG_HEADER(config.h)
120
121 VERSION_MAJOR=2
122 VERSION_MINOR=9
123 VERSION_POINT=5
124
125 AC_SUBST(VERSION_MAJOR)
126 AC_SUBST(VERSION_MINOR)
127 AC_SUBST(VERSION_POINT)
128
129 dnl This can be "alpha", "beta", or "stable"
130 dnl and will be used for CGI output
131 dnl
132 AC_DEFINE(CODE_STATUS, "alpha")
133
134 AC_DEFINE_UNQUOTED(VERSION_MAJOR,${VERSION_MAJOR})
135 AC_DEFINE_UNQUOTED(VERSION_MINOR,${VERSION_MINOR})
136 AC_DEFINE_UNQUOTED(VERSION_POINT,${VERSION_POINT})
137 AC_DEFINE_UNQUOTED(VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}")
138
139 dnl Checks for programs.
140 dnl AC_PROG_CXX
141 AC_PROG_CC
142 AC_PROG_CPP
143 dnl AC_PROG_INSTALL
144 dnl AC_PROG_LN_S
145 dnl AC_PROG_MAKE_SET
146 dnl RANLIB is for PCRE:
147 dnl AC_PROG_RANLIB
148
149 AC_MINGW32
150 AC_CYGWIN
151 AC_EXEEXT
152 AC_OBJEXT
153
154 dnl Checks for libraries.
155 dnl AC_CHECK_LIB(pcre, pcre_compile)
156 dnl AC_CHECK_LIB(pcreposix, regcomp, pcre)
157
158 dnl Checks for header files.
159 AC_HEADER_STDC
160 dnl AC_HEADER_SYS_WAIT
161 dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h)
162 dnl limits.h is for PCRE:
163 dnl AC_CHECK_HEADERS(limits.h)
164
165 dnl Checks for typedefs, structures, and compiler characteristics.
166 AC_C_CONST
167 AC_TYPE_SIZE_T
168
169 dnl Checks for library functions.
170 dnl AC_TYPE_SIGNAL
171 dnl AC_CHECK_FUNC(strstr)
172 dnl bcopy and memmove are for PCRE
173 AC_CHECK_FUNCS(strerror bcopy memmove)
174
175 dnl Build type
176
177 AC_ARG_ENABLE(mingw32,
178 [  --enable-mingw32        Use mingw32 for a Windows GUI],
179 [if test $enableval = yes; then
180     WIN_ONLY=
181     CYGWIN_FLAGS="-mwindows -mno-cygwin"
182     echo "Using mingw32 (Win32 GUI)"
183   else
184     WIN_ONLY=#
185     if test "$CYGWIN" = "yes"; then
186       CYGWIN_FLAGS="-mno-win32"
187       echo "Using Cygnus (Win32 command line)"
188     else
189       CYGWIN_FLAGS=
190     fi
191   fi],
192 [if test "$MINGW32" = "yes"; then
193     WIN_ONLY=
194     CYGWIN_FLAGS="-mwindows -mno-cygwin"
195     echo "Using mingw32 (Win32 GUI)"
196   else
197     WIN_ONLY=#
198     if test "$CYGWIN" = "yes"; then
199       CYGWIN_FLAGS="-mno-win32"
200       echo "Using Cygnus (Win32 command line)"
201     else
202       CYGWIN_FLAGS=
203     fi
204   fi])
205
206 AC_SUBST(WIN_ONLY)
207 AC_SUBST(CYGWIN_FLAGS)
208
209 SOLARIS_ONLY=#
210 AC_SUBST(SOLARIS_ONLY)
211
212 dnl Features
213
214 dnl Regex engine:
215
216 GNU_REGEX_ONLY=
217 PCRE_REGEX_ONLY=
218 NO_REGEX_ONLY=#
219
220 AC_ARG_ENABLE(regex,
221 [  --disable-regex         Don't allow regular expressions in the blockfile],
222 [if test $enableval = yes; then
223   AC_DEFINE(REGEX)
224 else
225   NO_REGEX_ONLY=
226   GNU_REGEX_ONLY=#
227   PCRE_REGEX_ONLY=#
228 fi],AC_DEFINE(REGEX))
229
230 AC_ARG_ENABLE(pcre-regex,
231 [  --disable-pcre-regex    Use old, slow GNU Regex instead of PCRE.],
232 [if test $enableval = yes; then
233   AC_DEFINE(PCRE)
234   GNU_REGEX_ONLY=#
235 else
236   PCRE_REGEX_ONLY=#
237 fi],[AC_DEFINE(PCRE)
238   GNU_REGEX_ONLY=#
239 ])
240
241 AC_SUBST(GNU_REGEX_ONLY)
242 AC_SUBST(PCRE_REGEX_ONLY)
243 AC_SUBST(NO_REGEX_ONLY)
244
245
246 dnl Other features:
247
248 AC_ARG_ENABLE(toggle,
249 [  --disable-toggle        Don't support temporary disable],
250 [if test $enableval = yes; then
251   AC_DEFINE(TOGGLE)
252 fi],AC_DEFINE(TOGGLE))
253
254 PCRS_ONLY=
255 AC_ARG_ENABLE(pcrs,
256 [  --disable-pcrs          Don't support arbitrary content modification],
257 [if test $enableval = yes; then
258   AC_DEFINE(PCRS)
259   AC_DEFINE(DENY_GZIP)
260 else
261   PCRS_ONLY=#
262 fi],[AC_DEFINE(PCRS) AC_DEFINE(DENY_GZIP)])
263 AC_SUBST(PCRS_ONLY)
264
265 AC_ARG_ENABLE(force,
266 [  --disable-force         Don't allow blockfle to be bypassed],
267 [if test $enableval = yes; then
268   AC_DEFINE(FORCE_LOAD)
269 fi],AC_DEFINE(FORCE_LOAD))
270
271 AC_ARG_ENABLE(fast-redirects,
272 [  --disable-fast-redirects Don't support fast redirects],
273 [if test $enableval = yes; then
274   AC_DEFINE(FAST_REDIRECTS)
275 fi], AC_DEFINE(FAST_REDIRECTS))
276
277 AC_ARG_ENABLE(killpopup,
278 [  --disable-killpopup     Never block popups],
279 [if test $enableval = yes; then
280   AC_DEFINE(KILLPOPUPS)
281 fi],AC_DEFINE(KILLPOPUPS))
282
283 AC_ARG_ENABLE(stats,
284 [  --disable-stats         Don't keep statistics],
285 [if test $enableval = yes; then
286   AC_DEFINE(STATISTICS)
287 fi],AC_DEFINE(STATISTICS))
288
289 AC_ARG_ENABLE(split-proxy-args,
290 [  --disable-split-proxy-args  One big show-proxy-args page, not one per file.],
291 [if test $enableval = yes; then
292   AC_DEFINE(SPLIT_PROXY_ARGS)
293 fi],AC_DEFINE(SPLIT_PROXY_ARGS))
294
295 AC_ARG_ENABLE(webdav,
296 [  --disable-webdav        Don't support WebDAV.  This option stops MS Outlook
297                           Express from accessing HotMail e-mail.],
298 [if test $enableval = yes; then
299   AC_DEFINE(WEBDAV)
300 fi],
301 AC_DEFINE(WEBDAV))
302
303 AC_ARG_ENABLE(ie-images,
304 [  --disable-ie-images     Don't auto-detect whether a request from MS Internet
305                           Explorer is for an image or HTML.],
306 [if test $enableval = yes; then
307   AC_DEFINE(DETECT_MSIE_IMAGES)
308 fi],
309 AC_DEFINE(DETECT_MSIE_IMAGES))
310
311 AC_ARG_ENABLE(image-blocking,
312 [  --disable-image-blocking  Don't try to figure out whether a request is 
313                             for an image or HTML - assume HTML.],
314 [if test $enableval = yes; then
315   AC_DEFINE(IMAGE_BLOCKING)
316 fi],
317 AC_DEFINE(IMAGE_BLOCKING))
318
319 AC_ARG_ENABLE(acl-files,
320 [  --disable-acl-files     Prevents the use of ACL files to control access to
321                           the proxy by IP address.],
322 [if test $enableval = yes; then
323   AC_DEFINE(ACL_FILES)
324 fi],
325 AC_DEFINE(ACL_FILES))
326
327 AC_ARG_ENABLE(trust-files,
328 [  --disable-trust-files   Prevents the use of trust files.],
329 [if test $enableval = yes; then
330   AC_DEFINE(TRUST_FILES)
331 fi],
332 AC_DEFINE(TRUST_FILES))
333
334 AC_ARG_ENABLE(jar-files,
335 [  --disable-jar-files     Prevents the use of jar files to capture cookies.],
336 [if test $enableval = yes; then
337   AC_DEFINE(JAR_FILES)
338 fi],
339 AC_DEFINE(JAR_FILES))
340
341 LIBRARY_PCRE_ONLY=#
342 STATIC_PCRE_ONLY=
343 AC_ARG_ENABLE(static-pcre,
344 [  --disable-static-pcre   Link dynamically with the pcre and pcreposix
345                           libraries.  You must build the libraries seperately.],
346 [if test $enableval = no; then
347   LIBRARY_PCRE_ONLY=
348   STATIC_PCRE_ONLY=#
349 fi])
350 AC_SUBST(LIBRARY_PCRE_ONLY)
351 AC_SUBST(STATIC_PCRE_ONLY)
352
353 AC_OUTPUT(Makefile)
354