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