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