- Enabled filtering banners by size rather than URL
[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.1.1.1 2001/05/15 13:58:50 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.1.1.1  2001/05/15 13:58:50  oes
32 dnl Initial import of version 2.9.3 source tree
33 dnl
34 dnl 
35 AC_INIT(jcc.c)
36 AC_CONFIG_HEADER(config.h)
37
38 VERSION_MAJOR=2
39 VERSION_MINOR=9
40 VERSION_POINT=4
41
42 AC_SUBST(VERSION_MAJOR)
43 AC_SUBST(VERSION_MINOR)
44 AC_SUBST(VERSION_POINT)
45
46 AC_DEFINE_UNQUOTED(VERSION_MAJOR,${VERSION_MAJOR})
47 AC_DEFINE_UNQUOTED(VERSION_MINOR,${VERSION_MINOR})
48 AC_DEFINE_UNQUOTED(VERSION_POINT,${VERSION_POINT})
49 AC_DEFINE_UNQUOTED(VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}")
50
51 dnl Checks for programs.
52 dnl AC_PROG_CXX
53 AC_PROG_CC
54 AC_PROG_CPP
55 dnl AC_PROG_INSTALL
56 dnl AC_PROG_LN_S
57 dnl AC_PROG_MAKE_SET
58 dnl RANLIB is for PCRE:
59 dnl AC_PROG_RANLIB
60
61 AC_MINGW32
62 AC_CYGWIN
63 AC_EXEEXT
64 AC_OBJEXT
65
66 dnl Checks for libraries.
67 dnl AC_CHECK_LIB(pcre, pcre_compile)
68 dnl AC_CHECK_LIB(pcreposix, regcomp, pcre)
69
70 dnl Checks for header files.
71 AC_HEADER_STDC
72 dnl AC_HEADER_SYS_WAIT
73 dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h)
74 dnl limits.h is for PCRE:
75 dnl AC_CHECK_HEADERS(limits.h)
76
77 dnl Checks for typedefs, structures, and compiler characteristics.
78 AC_C_CONST
79 AC_TYPE_SIZE_T
80
81 dnl Checks for library functions.
82 dnl AC_TYPE_SIGNAL
83 dnl AC_CHECK_FUNC(strstr)
84 dnl bcopy and memmove are for PCRE
85 AC_CHECK_FUNCS(strerror bcopy memmove)
86
87 dnl Build type
88
89 AC_ARG_ENABLE(mingw32,
90 [  --enable-mingw32        Use mingw32 for a Windows GUI],
91 [if test $enableval = yes; then
92     WIN_ONLY=
93     CYGWIN_FLAGS="-mwindows -mno-cygwin"
94     echo "Using mingw32 (Win32 GUI)"
95   else
96     WIN_ONLY=#
97     if test "$CYGWIN" = "yes"; then
98       CYGWIN_FLAGS="-mno-win32"
99       echo "Using Cygnus (Win32 command line)"
100     else
101       CYGWIN_FLAGS=
102     fi
103   fi],
104 [if test "$MINGW32" = "yes"; then
105     WIN_ONLY=
106     CYGWIN_FLAGS="-mwindows -mno-cygwin"
107     echo "Using mingw32 (Win32 GUI)"
108   else
109     WIN_ONLY=#
110     if test "$CYGWIN" = "yes"; then
111       CYGWIN_FLAGS="-mno-win32"
112       echo "Using Cygnus (Win32 command line)"
113     else
114       CYGWIN_FLAGS=
115     fi
116   fi])
117
118 AC_SUBST(WIN_ONLY)
119 AC_SUBST(CYGWIN_FLAGS)
120
121 SOLARIS_ONLY=#
122 AC_SUBST(SOLARIS_ONLY)
123
124 dnl Features
125
126 dnl Regex engine:
127
128 GNU_REGEX_ONLY=
129 PCRE_REGEX_ONLY=
130 NO_REGEX_ONLY=#
131
132 AC_ARG_ENABLE(regex,
133 [  --disable-regex         Don't allow regular expressions in the blockfile],
134 [if test $enableval = yes; then
135   AC_DEFINE(REGEX)
136 else
137   NO_REGEX_ONLY=
138   GNU_REGEX_ONLY=#
139   PCRE_REGEX_ONLY=#
140 fi],AC_DEFINE(REGEX))
141
142 AC_ARG_ENABLE(pcre-regex,
143 [  --disable-pcre-regex    Use old, slow GNU Regex instead of PCRE.],
144 [if test $enableval = yes; then
145   AC_DEFINE(PCRE)
146   GNU_REGEX_ONLY=#
147 else
148   PCRE_REGEX_ONLY=#
149 fi],[AC_DEFINE(PCRE)
150   GNU_REGEX_ONLY=#
151 ])
152
153 AC_SUBST(GNU_REGEX_ONLY)
154 AC_SUBST(PCRE_REGEX_ONLY)
155 AC_SUBST(NO_REGEX_ONLY)
156
157
158 dnl Other features:
159
160 AC_ARG_ENABLE(toggle,
161 [  --disable-toggle        Don't support temporary disable],
162 [if test $enableval = yes; then
163   AC_DEFINE(TOGGLE)
164 fi],AC_DEFINE(TOGGLE))
165
166 PCRS_ONLY=
167 AC_ARG_ENABLE(pcrs,
168 [  --disable-pcrs          Don't support arbitrary content modification],
169 [if test $enableval = yes; then
170   AC_DEFINE(PCRS)
171   AC_DEFINE(DENY_GZIP)
172 else
173   PCRS_ONLY=#
174 fi],[AC_DEFINE(PCRS) AC_DEFINE(DENY_GZIP)])
175 AC_SUBST(PCRS_ONLY)
176
177 AC_ARG_ENABLE(force,
178 [  --disable-force         Don't allow blockfle to be bypassed],
179 [if test $enableval = yes; then
180   AC_DEFINE(FORCE_LOAD)
181 fi],AC_DEFINE(FORCE_LOAD))
182
183 AC_ARG_ENABLE(killpopup,
184 [  --disable-killpopup     Never block popups],
185 [if test $enableval = yes; then
186   AC_DEFINE(KILLPOPUPS)
187 fi],AC_DEFINE(KILLPOPUPS))
188
189 AC_ARG_ENABLE(stats,
190 [  --disable-stats         Don't keep statistics],
191 [if test $enableval = yes; then
192   AC_DEFINE(STATISTICS)
193 fi],AC_DEFINE(STATISTICS))
194
195 AC_ARG_ENABLE(split-proxy-args,
196 [  --disable-split-proxy-args  One big show-proxy-args page, not one per file.],
197 [if test $enableval = yes; then
198   AC_DEFINE(SPLIT_PROXY_ARGS)
199 fi],AC_DEFINE(SPLIT_PROXY_ARGS))
200
201 AC_ARG_ENABLE(webdav,
202 [  --disable-webdav        Don't support WebDAV.  This option stops MS Outlook
203                           Express from accessing HotMail e-mail.],
204 [if test $enableval = yes; then
205   AC_DEFINE(WEBDAV)
206 fi],
207 AC_DEFINE(WEBDAV))
208
209 AC_ARG_ENABLE(ie-images,
210 [  --disable-ie-images     Don't auto-detect whether a request from MS Internet
211                           Explorer is for an image or HTML.],
212 [if test $enableval = yes; then
213   AC_DEFINE(DETECT_MSIE_IMAGES)
214 fi],
215 AC_DEFINE(DETECT_MSIE_IMAGES))
216
217 AC_ARG_ENABLE(image-list,
218 [  --disable-image-list    Don't try to figure out whether a request is for an
219                           image or HTML using the imagelist - assume HTML.],
220 [if test $enableval = yes; then
221   AC_DEFINE(USE_IMAGE_LIST)
222 fi],
223 AC_DEFINE(USE_IMAGE_LIST))
224
225 AC_ARG_ENABLE(acl-files,
226 [  --disable-acl-files     Prevents the use of ACL files to control access to
227                           the proxy by IP address.],
228 [if test $enableval = yes; then
229   AC_DEFINE(ACL_FILES)
230 fi],
231 AC_DEFINE(ACL_FILES))
232
233 AC_ARG_ENABLE(trust-files,
234 [  --disable-trust-files   Prevents the use of trust files.],
235 [if test $enableval = yes; then
236   AC_DEFINE(TRUST_FILES)
237 fi],
238 AC_DEFINE(TRUST_FILES))
239
240 AC_ARG_ENABLE(jar-files,
241 [  --disable-jar-files     Prevents the use of jar files to capture cookies.],
242 [if test $enableval = yes; then
243   AC_DEFINE(JAR_FILES)
244 fi],
245 AC_DEFINE(JAR_FILES))
246
247 LIBRARY_PCRE_ONLY=#
248 STATIC_PCRE_ONLY=
249 AC_ARG_ENABLE(static-pcre,
250 [  --disable-static-pcre   Link dynamically with the pcre and pcreposix
251                           libraries.  You must build the libraries seperately.],
252 [if test $enableval = no; then
253   LIBRARY_PCRE_ONLY=
254   STATIC_PCRE_ONLY=#
255 fi])
256 AC_SUBST(LIBRARY_PCRE_ONLY)
257 AC_SUBST(STATIC_PCRE_ONLY)
258
259 AC_OUTPUT(Makefile)
260