1 dnl Process this file with autoconf to produce a configure script.
3 dnl $Id: configure.in,v 1.5 2001/06/29 13:26:27 oes 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.5 2001/06/29 13:26:27 oes
32 dnl Introduced #define CODE_STATUS
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.
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):
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.)
57 dnl Revision 1.3 2001/05/22 18:46:04 oes
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
63 dnl - Enabled filtering WebBugs by providing a pattern
64 dnl which kills all 1x1 images
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 (!).
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.
78 dnl - Added new feature, which permits blocking remote
79 dnl script redirects and firing back a local redirect
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 :-(
90 dnl - Because a generic redirect template was needed for
91 dnl this, tinygif = 3 now uses the same.
93 dnl - Moved GIFs, and other static HTTP response templates
96 dnl - Some minor fixes
98 dnl - Removed some >400 CRs again (Jon, you really worked
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
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.
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
119 AC_CONFIG_HEADER(config.h)
125 AC_SUBST(VERSION_MAJOR)
126 AC_SUBST(VERSION_MINOR)
127 AC_SUBST(VERSION_POINT)
129 dnl This can be "alpha", "beta", or "stable"
130 dnl and will be used for CGI output
132 AC_DEFINE(CODE_STATUS, "alpha")
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}")
139 dnl Checks for programs.
146 dnl RANLIB is for PCRE:
154 dnl Checks for libraries.
155 dnl AC_CHECK_LIB(pcre, pcre_compile)
156 dnl AC_CHECK_LIB(pcreposix, regcomp, pcre)
158 dnl Checks for header files.
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)
165 dnl Checks for typedefs, structures, and compiler characteristics.
169 dnl Checks for library functions.
171 dnl AC_CHECK_FUNC(strstr)
172 dnl bcopy and memmove are for PCRE
173 AC_CHECK_FUNCS(strerror bcopy memmove)
177 AC_ARG_ENABLE(mingw32,
178 [ --enable-mingw32 Use mingw32 for a Windows GUI],
179 [if test $enableval = yes; then
181 CYGWIN_FLAGS="-mwindows -mno-cygwin"
182 echo "Using mingw32 (Win32 GUI)"
185 if test "$CYGWIN" = "yes"; then
186 CYGWIN_FLAGS="-mno-win32"
187 echo "Using Cygnus (Win32 command line)"
192 [if test "$MINGW32" = "yes"; then
194 CYGWIN_FLAGS="-mwindows -mno-cygwin"
195 echo "Using mingw32 (Win32 GUI)"
198 if test "$CYGWIN" = "yes"; then
199 CYGWIN_FLAGS="-mno-win32"
200 echo "Using Cygnus (Win32 command line)"
207 AC_SUBST(CYGWIN_FLAGS)
210 AC_SUBST(SOLARIS_ONLY)
221 [ --disable-regex Don't allow regular expressions in the blockfile],
222 [if test $enableval = yes; then
228 fi],AC_DEFINE(REGEX))
230 AC_ARG_ENABLE(pcre-regex,
231 [ --disable-pcre-regex Use old, slow GNU Regex instead of PCRE.],
232 [if test $enableval = yes; then
241 AC_SUBST(GNU_REGEX_ONLY)
242 AC_SUBST(PCRE_REGEX_ONLY)
243 AC_SUBST(NO_REGEX_ONLY)
248 AC_ARG_ENABLE(toggle,
249 [ --disable-toggle Don't support temporary disable],
250 [if test $enableval = yes; then
252 fi],AC_DEFINE(TOGGLE))
256 [ --disable-pcrs Don't support arbitrary content modification],
257 [if test $enableval = yes; then
262 fi],[AC_DEFINE(PCRS) AC_DEFINE(DENY_GZIP)])
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))
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))
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))
284 [ --disable-stats Don't keep statistics],
285 [if test $enableval = yes; then
286 AC_DEFINE(STATISTICS)
287 fi],AC_DEFINE(STATISTICS))
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))
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
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)
309 AC_DEFINE(DETECT_MSIE_IMAGES))
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)
317 AC_DEFINE(IMAGE_BLOCKING))
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
325 AC_DEFINE(ACL_FILES))
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)
332 AC_DEFINE(TRUST_FILES))
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
339 AC_DEFINE(JAR_FILES))
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
350 AC_SUBST(LIBRARY_PCRE_ONLY)
351 AC_SUBST(STATIC_PCRE_ONLY)