Missing make_path() added for re_filterfile.
[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.3 2001/05/22 18:46:04 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.3  2001/05/22 18:46:04  oes
32 dnl
33 dnl - Enabled filtering banners by size rather than URL
34 dnl   by adding patterns that replace all standard banner
35 dnl   sizes with the "Junkbuster" gif to the re_filterfile
36 dnl
37 dnl - Enabled filtering WebBugs by providing a pattern
38 dnl   which kills all 1x1 images
39 dnl
40 dnl - Added support for PCRE_UNGREEDY behaviour to pcrs,
41 dnl   which is selected by the (nonstandard and therefore
42 dnl   capital) letter 'U' in the option string.
43 dnl   It causes the quantifiers to be ungreedy by default.
44 dnl   Appending a ? turns back to greedy (!).
45 dnl
46 dnl - Added a new interceptor ijb-send-banner, which
47 dnl   sends back the "Junkbuster" gif. Without imagelist or
48 dnl   MSIE detection support, or if tinygif = 1, or the
49 dnl   URL isn't recognized as an imageurl, a lame HTML
50 dnl   explanation is sent instead.
51 dnl
52 dnl - Added new feature, which permits blocking remote
53 dnl   script redirects and firing back a local redirect
54 dnl   to the browser.
55 dnl   The feature is conditionally compiled, i.e. it
56 dnl   can be disabled with --disable-fast-redirects,
57 dnl   plus it must be activated by a "fast-redirects"
58 dnl   line in the config file, has its own log level
59 dnl   and of course wants to be displayed by show-proxy-args
60 dnl   Note: Boy, all the #ifdefs in 1001 locations and
61 dnl   all the fumbling with configure.in and acconfig.h
62 dnl   were *way* more work than the feature itself :-(
63 dnl
64 dnl - Because a generic redirect template was needed for
65 dnl   this, tinygif = 3 now uses the same.
66 dnl
67 dnl - Moved GIFs, and other static HTTP response templates
68 dnl   to project.h
69 dnl
70 dnl - Some minor fixes
71 dnl
72 dnl - Removed some >400 CRs again (Jon, you really worked
73 dnl   a lot! ;-)
74 dnl
75 dnl Revision 1.2  2001/05/20 01:21:20  jongfoster
76 dnl Version 2.9.4 checkin.
77 dnl - Merged popupfile and cookiefile, and added control over PCRS
78 dnl   filtering, in new "permissionsfile".
79 dnl - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
80 dnl   file error you now get a message box (in the Win32 GUI) rather
81 dnl   than the program exiting with no explanation.
82 dnl - Made killpopup use the PCRS MIME-type checking and HTTP-header
83 dnl   skipping.
84 dnl - Removed tabs from "config"
85 dnl - Moved duplicated url parsing code in "loaders.c" to a new funcition.
86 dnl - Bumped up version number.
87 dnl
88 dnl Revision 1.1.1.1  2001/05/15 13:58:50  oes
89 dnl Initial import of version 2.9.3 source tree
90 dnl
91 dnl 
92 AC_INIT(jcc.c)
93 AC_CONFIG_HEADER(config.h)
94
95 VERSION_MAJOR=2
96 VERSION_MINOR=9
97 VERSION_POINT=4
98
99 AC_SUBST(VERSION_MAJOR)
100 AC_SUBST(VERSION_MINOR)
101 AC_SUBST(VERSION_POINT)
102
103 AC_DEFINE_UNQUOTED(VERSION_MAJOR,${VERSION_MAJOR})
104 AC_DEFINE_UNQUOTED(VERSION_MINOR,${VERSION_MINOR})
105 AC_DEFINE_UNQUOTED(VERSION_POINT,${VERSION_POINT})
106 AC_DEFINE_UNQUOTED(VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}")
107
108 dnl Checks for programs.
109 dnl AC_PROG_CXX
110 AC_PROG_CC
111 AC_PROG_CPP
112 dnl AC_PROG_INSTALL
113 dnl AC_PROG_LN_S
114 dnl AC_PROG_MAKE_SET
115 dnl RANLIB is for PCRE:
116 dnl AC_PROG_RANLIB
117
118 AC_MINGW32
119 AC_CYGWIN
120 AC_EXEEXT
121 AC_OBJEXT
122
123 dnl Checks for libraries.
124 dnl AC_CHECK_LIB(pcre, pcre_compile)
125 dnl AC_CHECK_LIB(pcreposix, regcomp, pcre)
126
127 dnl Checks for header files.
128 AC_HEADER_STDC
129 dnl AC_HEADER_SYS_WAIT
130 dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h)
131 dnl limits.h is for PCRE:
132 dnl AC_CHECK_HEADERS(limits.h)
133
134 dnl Checks for typedefs, structures, and compiler characteristics.
135 AC_C_CONST
136 AC_TYPE_SIZE_T
137
138 dnl Checks for library functions.
139 dnl AC_TYPE_SIGNAL
140 dnl AC_CHECK_FUNC(strstr)
141 dnl bcopy and memmove are for PCRE
142 AC_CHECK_FUNCS(strerror bcopy memmove)
143
144 dnl Build type
145
146 AC_ARG_ENABLE(mingw32,
147 [  --enable-mingw32        Use mingw32 for a Windows GUI],
148 [if test $enableval = yes; then
149     WIN_ONLY=
150     CYGWIN_FLAGS="-mwindows -mno-cygwin"
151     echo "Using mingw32 (Win32 GUI)"
152   else
153     WIN_ONLY=#
154     if test "$CYGWIN" = "yes"; then
155       CYGWIN_FLAGS="-mno-win32"
156       echo "Using Cygnus (Win32 command line)"
157     else
158       CYGWIN_FLAGS=
159     fi
160   fi],
161 [if test "$MINGW32" = "yes"; then
162     WIN_ONLY=
163     CYGWIN_FLAGS="-mwindows -mno-cygwin"
164     echo "Using mingw32 (Win32 GUI)"
165   else
166     WIN_ONLY=#
167     if test "$CYGWIN" = "yes"; then
168       CYGWIN_FLAGS="-mno-win32"
169       echo "Using Cygnus (Win32 command line)"
170     else
171       CYGWIN_FLAGS=
172     fi
173   fi])
174
175 AC_SUBST(WIN_ONLY)
176 AC_SUBST(CYGWIN_FLAGS)
177
178 SOLARIS_ONLY=#
179 AC_SUBST(SOLARIS_ONLY)
180
181 dnl Features
182
183 dnl Regex engine:
184
185 GNU_REGEX_ONLY=
186 PCRE_REGEX_ONLY=
187 NO_REGEX_ONLY=#
188
189 AC_ARG_ENABLE(regex,
190 [  --disable-regex         Don't allow regular expressions in the blockfile],
191 [if test $enableval = yes; then
192   AC_DEFINE(REGEX)
193 else
194   NO_REGEX_ONLY=
195   GNU_REGEX_ONLY=#
196   PCRE_REGEX_ONLY=#
197 fi],AC_DEFINE(REGEX))
198
199 AC_ARG_ENABLE(pcre-regex,
200 [  --disable-pcre-regex    Use old, slow GNU Regex instead of PCRE.],
201 [if test $enableval = yes; then
202   AC_DEFINE(PCRE)
203   GNU_REGEX_ONLY=#
204 else
205   PCRE_REGEX_ONLY=#
206 fi],[AC_DEFINE(PCRE)
207   GNU_REGEX_ONLY=#
208 ])
209
210 AC_SUBST(GNU_REGEX_ONLY)
211 AC_SUBST(PCRE_REGEX_ONLY)
212 AC_SUBST(NO_REGEX_ONLY)
213
214
215 dnl Other features:
216
217 AC_ARG_ENABLE(toggle,
218 [  --disable-toggle        Don't support temporary disable],
219 [if test $enableval = yes; then
220   AC_DEFINE(TOGGLE)
221 fi],AC_DEFINE(TOGGLE))
222
223 PCRS_ONLY=
224 AC_ARG_ENABLE(pcrs,
225 [  --disable-pcrs          Don't support arbitrary content modification],
226 [if test $enableval = yes; then
227   AC_DEFINE(PCRS)
228   AC_DEFINE(DENY_GZIP)
229 else
230   PCRS_ONLY=#
231 fi],[AC_DEFINE(PCRS) AC_DEFINE(DENY_GZIP)])
232 AC_SUBST(PCRS_ONLY)
233
234 AC_ARG_ENABLE(force,
235 [  --disable-force         Don't allow blockfle to be bypassed],
236 [if test $enableval = yes; then
237   AC_DEFINE(FORCE_LOAD)
238 fi],AC_DEFINE(FORCE_LOAD))
239
240 AC_ARG_ENABLE(fast-redirects,
241 [  --disable-fast-redirects Don't support fast redirects],
242 [if test $enableval = yes; then
243   AC_DEFINE(FAST_REDIRECTS)
244 fi], AC_DEFINE(FAST_REDIRECTS))
245
246 AC_ARG_ENABLE(killpopup,
247 [  --disable-killpopup     Never block popups],
248 [if test $enableval = yes; then
249   AC_DEFINE(KILLPOPUPS)
250 fi],AC_DEFINE(KILLPOPUPS))
251
252 AC_ARG_ENABLE(stats,
253 [  --disable-stats         Don't keep statistics],
254 [if test $enableval = yes; then
255   AC_DEFINE(STATISTICS)
256 fi],AC_DEFINE(STATISTICS))
257
258 AC_ARG_ENABLE(split-proxy-args,
259 [  --disable-split-proxy-args  One big show-proxy-args page, not one per file.],
260 [if test $enableval = yes; then
261   AC_DEFINE(SPLIT_PROXY_ARGS)
262 fi],AC_DEFINE(SPLIT_PROXY_ARGS))
263
264 AC_ARG_ENABLE(webdav,
265 [  --disable-webdav        Don't support WebDAV.  This option stops MS Outlook
266                           Express from accessing HotMail e-mail.],
267 [if test $enableval = yes; then
268   AC_DEFINE(WEBDAV)
269 fi],
270 AC_DEFINE(WEBDAV))
271
272 AC_ARG_ENABLE(ie-images,
273 [  --disable-ie-images     Don't auto-detect whether a request from MS Internet
274                           Explorer is for an image or HTML.],
275 [if test $enableval = yes; then
276   AC_DEFINE(DETECT_MSIE_IMAGES)
277 fi],
278 AC_DEFINE(DETECT_MSIE_IMAGES))
279
280 AC_ARG_ENABLE(image-blocking,
281 [  --disable-image-blocking  Don't try to figure out whether a request is 
282                             for an image or HTML - assume HTML.],
283 [if test $enableval = yes; then
284   AC_DEFINE(IMAGE_BLOCKING)
285 fi],
286 AC_DEFINE(IMAGE_BLOCKING))
287
288 AC_ARG_ENABLE(acl-files,
289 [  --disable-acl-files     Prevents the use of ACL files to control access to
290                           the proxy by IP address.],
291 [if test $enableval = yes; then
292   AC_DEFINE(ACL_FILES)
293 fi],
294 AC_DEFINE(ACL_FILES))
295
296 AC_ARG_ENABLE(trust-files,
297 [  --disable-trust-files   Prevents the use of trust files.],
298 [if test $enableval = yes; then
299   AC_DEFINE(TRUST_FILES)
300 fi],
301 AC_DEFINE(TRUST_FILES))
302
303 AC_ARG_ENABLE(jar-files,
304 [  --disable-jar-files     Prevents the use of jar files to capture cookies.],
305 [if test $enableval = yes; then
306   AC_DEFINE(JAR_FILES)
307 fi],
308 AC_DEFINE(JAR_FILES))
309
310 LIBRARY_PCRE_ONLY=#
311 STATIC_PCRE_ONLY=
312 AC_ARG_ENABLE(static-pcre,
313 [  --disable-static-pcre   Link dynamically with the pcre and pcreposix
314                           libraries.  You must build the libraries seperately.],
315 [if test $enableval = no; then
316   LIBRARY_PCRE_ONLY=
317   STATIC_PCRE_ONLY=#
318 fi])
319 AC_SUBST(LIBRARY_PCRE_ONLY)
320 AC_SUBST(STATIC_PCRE_ONLY)
321
322 AC_OUTPUT(Makefile)
323