1 dnl Process this file with autoconf to produce a configure script.
3 dnl $Id: configure.in,v 1.4 2001/05/29 09:50:24 jongfoster Exp $
5 dnl Written by and Copyright (C) 2001 the SourceForge
6 dnl IJBSWA team. http://ijbswa.sourceforge.net
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
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.
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.
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.
30 dnl $Log: configure.in,v $
31 dnl Revision 1.4 2001/05/29 09:50:24 jongfoster
32 dnl Unified blocklist/imagelist/permissionslist.
33 dnl File format is still under discussion, but the internal changes
34 dnl are (mostly) done.
36 dnl Also modified interceptor behaviour:
37 dnl - We now intercept all URLs beginning with one of the following
38 dnl prefixes (and *only* these prefixes):
40 dnl * http://ijbswa.sf.net/config/
41 dnl * http://ijbswa.sourceforge.net/config/
42 dnl - New interceptors "home page" - go to http://i.j.b/ to see it.
43 dnl - Internal changes so that intercepted and fast redirect pages
44 dnl are not replaced with an image.
45 dnl - Interceptors now have the option to send a binary page direct
46 dnl to the client. (i.e. ijb-send-banner uses this)
47 dnl - Implemented show-url-info interceptor. (Which is why I needed
48 dnl the above interceptors changes - a typical URL is
49 dnl "http://i.j.b/show-url-info?url=www.somesite.com/banner.gif".
50 dnl The previous mechanism would not have intercepted that, and
51 dnl if it had been intercepted then it then it would have replaced
52 dnl it with an image.)
54 dnl Revision 1.3 2001/05/22 18:46:04 oes
56 dnl - Enabled filtering banners by size rather than URL
57 dnl by adding patterns that replace all standard banner
58 dnl sizes with the "Junkbuster" gif to the re_filterfile
60 dnl - Enabled filtering WebBugs by providing a pattern
61 dnl which kills all 1x1 images
63 dnl - Added support for PCRE_UNGREEDY behaviour to pcrs,
64 dnl which is selected by the (nonstandard and therefore
65 dnl capital) letter 'U' in the option string.
66 dnl It causes the quantifiers to be ungreedy by default.
67 dnl Appending a ? turns back to greedy (!).
69 dnl - Added a new interceptor ijb-send-banner, which
70 dnl sends back the "Junkbuster" gif. Without imagelist or
71 dnl MSIE detection support, or if tinygif = 1, or the
72 dnl URL isn't recognized as an imageurl, a lame HTML
73 dnl explanation is sent instead.
75 dnl - Added new feature, which permits blocking remote
76 dnl script redirects and firing back a local redirect
78 dnl The feature is conditionally compiled, i.e. it
79 dnl can be disabled with --disable-fast-redirects,
80 dnl plus it must be activated by a "fast-redirects"
81 dnl line in the config file, has its own log level
82 dnl and of course wants to be displayed by show-proxy-args
83 dnl Note: Boy, all the #ifdefs in 1001 locations and
84 dnl all the fumbling with configure.in and acconfig.h
85 dnl were *way* more work than the feature itself :-(
87 dnl - Because a generic redirect template was needed for
88 dnl this, tinygif = 3 now uses the same.
90 dnl - Moved GIFs, and other static HTTP response templates
93 dnl - Some minor fixes
95 dnl - Removed some >400 CRs again (Jon, you really worked
98 dnl Revision 1.2 2001/05/20 01:21:20 jongfoster
99 dnl Version 2.9.4 checkin.
100 dnl - Merged popupfile and cookiefile, and added control over PCRS
101 dnl filtering, in new "permissionsfile".
102 dnl - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
103 dnl file error you now get a message box (in the Win32 GUI) rather
104 dnl than the program exiting with no explanation.
105 dnl - Made killpopup use the PCRS MIME-type checking and HTTP-header
107 dnl - Removed tabs from "config"
108 dnl - Moved duplicated url parsing code in "loaders.c" to a new funcition.
109 dnl - Bumped up version number.
111 dnl Revision 1.1.1.1 2001/05/15 13:58:50 oes
112 dnl Initial import of version 2.9.3 source tree
116 AC_CONFIG_HEADER(config.h)
122 AC_SUBST(VERSION_MAJOR)
123 AC_SUBST(VERSION_MINOR)
124 AC_SUBST(VERSION_POINT)
126 dnl This can be "alpha", "beta", or "stable"
127 dnl and will be used for CGI output
129 AC_DEFINE(CODE_STATUS, "alpha")
131 AC_DEFINE_UNQUOTED(VERSION_MAJOR,${VERSION_MAJOR})
132 AC_DEFINE_UNQUOTED(VERSION_MINOR,${VERSION_MINOR})
133 AC_DEFINE_UNQUOTED(VERSION_POINT,${VERSION_POINT})
134 AC_DEFINE_UNQUOTED(VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}")
136 dnl Checks for programs.
143 dnl RANLIB is for PCRE:
151 dnl Checks for libraries.
152 dnl AC_CHECK_LIB(pcre, pcre_compile)
153 dnl AC_CHECK_LIB(pcreposix, regcomp, pcre)
155 dnl Checks for header files.
157 dnl AC_HEADER_SYS_WAIT
158 dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h)
159 dnl limits.h is for PCRE:
160 dnl AC_CHECK_HEADERS(limits.h)
162 dnl Checks for typedefs, structures, and compiler characteristics.
166 dnl Checks for library functions.
168 dnl AC_CHECK_FUNC(strstr)
169 dnl bcopy and memmove are for PCRE
170 AC_CHECK_FUNCS(strerror bcopy memmove)
174 AC_ARG_ENABLE(mingw32,
175 [ --enable-mingw32 Use mingw32 for a Windows GUI],
176 [if test $enableval = yes; then
178 CYGWIN_FLAGS="-mwindows -mno-cygwin"
179 echo "Using mingw32 (Win32 GUI)"
182 if test "$CYGWIN" = "yes"; then
183 CYGWIN_FLAGS="-mno-win32"
184 echo "Using Cygnus (Win32 command line)"
189 [if test "$MINGW32" = "yes"; then
191 CYGWIN_FLAGS="-mwindows -mno-cygwin"
192 echo "Using mingw32 (Win32 GUI)"
195 if test "$CYGWIN" = "yes"; then
196 CYGWIN_FLAGS="-mno-win32"
197 echo "Using Cygnus (Win32 command line)"
204 AC_SUBST(CYGWIN_FLAGS)
207 AC_SUBST(SOLARIS_ONLY)
218 [ --disable-regex Don't allow regular expressions in the blockfile],
219 [if test $enableval = yes; then
225 fi],AC_DEFINE(REGEX))
227 AC_ARG_ENABLE(pcre-regex,
228 [ --disable-pcre-regex Use old, slow GNU Regex instead of PCRE.],
229 [if test $enableval = yes; then
238 AC_SUBST(GNU_REGEX_ONLY)
239 AC_SUBST(PCRE_REGEX_ONLY)
240 AC_SUBST(NO_REGEX_ONLY)
245 AC_ARG_ENABLE(toggle,
246 [ --disable-toggle Don't support temporary disable],
247 [if test $enableval = yes; then
249 fi],AC_DEFINE(TOGGLE))
253 [ --disable-pcrs Don't support arbitrary content modification],
254 [if test $enableval = yes; then
259 fi],[AC_DEFINE(PCRS) AC_DEFINE(DENY_GZIP)])
263 [ --disable-force Don't allow blockfle to be bypassed],
264 [if test $enableval = yes; then
265 AC_DEFINE(FORCE_LOAD)
266 fi],AC_DEFINE(FORCE_LOAD))
268 AC_ARG_ENABLE(fast-redirects,
269 [ --disable-fast-redirects Don't support fast redirects],
270 [if test $enableval = yes; then
271 AC_DEFINE(FAST_REDIRECTS)
272 fi], AC_DEFINE(FAST_REDIRECTS))
274 AC_ARG_ENABLE(killpopup,
275 [ --disable-killpopup Never block popups],
276 [if test $enableval = yes; then
277 AC_DEFINE(KILLPOPUPS)
278 fi],AC_DEFINE(KILLPOPUPS))
281 [ --disable-stats Don't keep statistics],
282 [if test $enableval = yes; then
283 AC_DEFINE(STATISTICS)
284 fi],AC_DEFINE(STATISTICS))
286 AC_ARG_ENABLE(split-proxy-args,
287 [ --disable-split-proxy-args One big show-proxy-args page, not one per file.],
288 [if test $enableval = yes; then
289 AC_DEFINE(SPLIT_PROXY_ARGS)
290 fi],AC_DEFINE(SPLIT_PROXY_ARGS))
292 AC_ARG_ENABLE(webdav,
293 [ --disable-webdav Don't support WebDAV. This option stops MS Outlook
294 Express from accessing HotMail e-mail.],
295 [if test $enableval = yes; then
300 AC_ARG_ENABLE(ie-images,
301 [ --disable-ie-images Don't auto-detect whether a request from MS Internet
302 Explorer is for an image or HTML.],
303 [if test $enableval = yes; then
304 AC_DEFINE(DETECT_MSIE_IMAGES)
306 AC_DEFINE(DETECT_MSIE_IMAGES))
308 AC_ARG_ENABLE(image-blocking,
309 [ --disable-image-blocking Don't try to figure out whether a request is
310 for an image or HTML - assume HTML.],
311 [if test $enableval = yes; then
312 AC_DEFINE(IMAGE_BLOCKING)
314 AC_DEFINE(IMAGE_BLOCKING))
316 AC_ARG_ENABLE(acl-files,
317 [ --disable-acl-files Prevents the use of ACL files to control access to
318 the proxy by IP address.],
319 [if test $enableval = yes; then
322 AC_DEFINE(ACL_FILES))
324 AC_ARG_ENABLE(trust-files,
325 [ --disable-trust-files Prevents the use of trust files.],
326 [if test $enableval = yes; then
327 AC_DEFINE(TRUST_FILES)
329 AC_DEFINE(TRUST_FILES))
331 AC_ARG_ENABLE(jar-files,
332 [ --disable-jar-files Prevents the use of jar files to capture cookies.],
333 [if test $enableval = yes; then
336 AC_DEFINE(JAR_FILES))
340 AC_ARG_ENABLE(static-pcre,
341 [ --disable-static-pcre Link dynamically with the pcre and pcreposix
342 libraries. You must build the libraries seperately.],
343 [if test $enableval = no; then
347 AC_SUBST(LIBRARY_PCRE_ONLY)
348 AC_SUBST(STATIC_PCRE_ONLY)