wolfSSL: Use LIBWOLFSSL_VERSION_HEX to decide whether or not to use WOLFSSL_X509_V_OK
[privoxy.git] / doc / webserver / user-manual / installation.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5   <title>Installation</title>
6   <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
7   <link rel="HOME" title="Privoxy 3.0.35 User Manual" href="index.html">
8   <link rel="PREVIOUS" title="Introduction" href="introduction.html">
9   <link rel="NEXT" title="What's New in this Release" href="whatsnew.html">
10   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
11   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
13 </head>
14 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
15   <div class="NAVHEADER">
16     <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
17       <tr>
18         <th colspan="3" align="center">Privoxy 3.0.35 User Manual</th>
19       </tr>
20       <tr>
21         <td width="10%" align="left" valign="bottom"><a href="introduction.html" accesskey="P">Prev</a></td>
22         <td width="80%" align="center" valign="bottom"></td>
23         <td width="10%" align="right" valign="bottom"><a href="whatsnew.html" accesskey="N">Next</a></td>
24       </tr>
25     </table>
26     <hr align="left" width="100%">
27   </div>
28   <div class="SECT1">
29     <h1 class="SECT1"><a name="INSTALLATION" id="INSTALLATION">2. Installation</a></h1>
30     <p><span class="APPLICATION">Privoxy</span> is available both in convenient pre-compiled packages for a wide range
31     of operating systems, and as raw source code. For most users, we recommend using the packages, which can be
32     downloaded from our <a href="https://sourceforge.net/projects/ijbswa/" target="_top">Privoxy Project Page</a>.</p>
33     <p>Note: On some platforms, the installer may remove previously installed versions, if found. (See below for your
34     platform). In any case <span class="emphasis"><i class="EMPHASIS">be sure to backup your old configuration if it is
35     valuable to you.</i></span> See the <a href="whatsnew.html#UPGRADERSNOTE">note to upgraders</a> section below.</p>
36     <div class="SECT2">
37       <h2 class="SECT2"><a name="INSTALLATION-PACKAGES" id="INSTALLATION-PACKAGES">2.1. Binary Packages</a></h2>
38       <p>How to install the binary packages depends on your operating system:</p>
39       <div class="SECT3">
40         <h3 class="SECT3"><a name="INSTALLATION-DEB" id="INSTALLATION-DEB">2.1.1. Debian and Ubuntu</a></h3>
41         <p>DEBs can be installed with <tt class="LITERAL">apt-get install privoxy</tt>, and will use <tt class=
42         "FILENAME">/etc/privoxy</tt> for the location of configuration files.</p>
43       </div>
44       <div class="SECT3">
45         <h3 class="SECT3"><a name="INSTALLATION-PACK-WIN" id="INSTALLATION-PACK-WIN">2.1.2. Windows</a></h3>
46         <p>Just double-click the installer, which will guide you through the installation process. You will find the
47         configuration files in the same directory as you installed <span class="APPLICATION">Privoxy</span> in.</p>
48         <p>Version 3.0.5 beta introduced full <span class="APPLICATION">Windows</span> service functionality. On
49         Windows only, the <span class="APPLICATION">Privoxy</span> program has two new command line arguments to
50         install and uninstall <span class="APPLICATION">Privoxy</span> as a <span class="emphasis"><i class=
51         "EMPHASIS">service</i></span>.</p>
52         <div class="VARIABLELIST">
53           <dl>
54             <dt>Arguments:</dt>
55             <dd>
56               <p><tt class="REPLACEABLE"><i>--install</i></tt>[:<tt class="REPLACEABLE"><i>service_name</i></tt>]</p>
57               <p><tt class="REPLACEABLE"><i>--uninstall</i></tt>[:<tt class="REPLACEABLE"><i>service_name</i></tt>]</p>
58             </dd>
59           </dl>
60         </div>
61         <p>After invoking <span class="APPLICATION">Privoxy</span> with <b class="COMMAND">--install</b>, you will need
62         to bring up the <span class="APPLICATION">Windows</span> service console to assign the user you want
63         <span class="APPLICATION">Privoxy</span> to run under, and whether or not you want it to run whenever the
64         system starts. You can start the <span class="APPLICATION">Windows</span> services console with the following
65         command: <b class="COMMAND">services.msc</b>. If you do not take the manual step of modifying <span class=
66         "APPLICATION">Privoxy's</span> service settings, it will not start. Note too that you will need to give Privoxy
67         a user account that actually exists, or it will not be permitted to write to its log and configuration
68         files.</p>
69       </div>
70       <div class="SECT3">
71         <h3 class="SECT3"><a name="INSTALLATION-MAC" id="INSTALLATION-MAC">2.1.3. Mac OS X</a></h3>
72         <p>Installation instructions for the OS X platform depend upon whether you downloaded a ready-built
73         installation package (.pkg or .mpkg) or have downloaded the source code.</p>
74       </div>
75       <div class="SECT3">
76         <h4 class="SECT3"><a name="OS-X-INSTALL-FROM-PACKAGE" id="OS-X-INSTALL-FROM-PACKAGE">2.1.4. Installation from
77         ready-built package</a></h4>
78         <p>The downloaded file will either be a .pkg (for OS X 10.5 upwards) or a bzipped .mpkg file (for OS X 10.4).
79         The former can be double-clicked as is and the installation will start; double-clicking the latter will unzip
80         the .mpkg file which can then be double-clicked to commence the installation.</p>
81         <p>The privoxy service will automatically start after a successful installation (and thereafter every time your
82         computer starts up) however you will need to configure your web browser(s) to use it. To do so, configure them
83         to use a proxy for HTTP and HTTPS at the address 127.0.0.1:8118.</p>
84         <p>To prevent the privoxy service from automatically starting when your computer starts up, remove or rename
85         the file <tt class="LITERAL">/Library/LaunchDaemons/org.ijbswa.privoxy.plist</tt> (on OS X 10.5 and higher) or
86         the folder named <tt class="LITERAL">/Library/StartupItems/Privoxy</tt> (on OS X 10.4 'Tiger').</p>
87         <p>To manually start or stop the privoxy service, use the scripts startPrivoxy.sh and stopPrivoxy.sh supplied
88         in /Applications/Privoxy. They must be run from an administrator account, using sudo.</p>
89         <p>To uninstall, run /Applications/Privoxy/uninstall.command as sudo from an administrator account.</p>
90       </div>
91       <div class="SECT3">
92         <h4 class="SECT3"><a name="OS-X-INSTALL-FROM-SOURCE" id="OS-X-INSTALL-FROM-SOURCE">2.1.5. Installation from
93         source</a></h4>
94         <p>To build and install the Privoxy source code on OS X you will need to obtain the macsetup module from the
95         Privoxy Sourceforge CVS repository (refer to Sourceforge help for details of how to set up a CVS client to have
96         read-only access to the repository). This module contains scripts that leverage the usual open-source tools
97         (available as part of Apple's free of charge Xcode distribution or via the usual open-source software package
98         managers for OS X (MacPorts, Homebrew, Fink etc.) to build and then install the privoxy binary and associated
99         files. The macsetup module's README file contains complete instructions for its use.</p>
100         <p>The privoxy service will automatically start after a successful installation (and thereafter every time your
101         computer starts up) however you will need to configure your web browser(s) to use it. To do so, configure them
102         to use a proxy for HTTP and HTTPS at the address 127.0.0.1:8118.</p>
103         <p>To prevent the privoxy service from automatically starting when your computer starts up, remove or rename
104         the file <tt class="LITERAL">/Library/LaunchDaemons/org.ijbswa.privoxy.plist</tt> (on OS X 10.5 and higher) or
105         the folder named <tt class="LITERAL">/Library/StartupItems/Privoxy</tt> (on OS X 10.4 'Tiger').</p>
106         <p>To manually start or stop the privoxy service, use the Privoxy Utility for Mac OS X (also part of the
107         macsetup module). This application can start and stop the privoxy service and display its log and configuration
108         files.</p>
109         <p>To uninstall, run the macsetup module's uninstall.sh as sudo from an administrator account.</p>
110       </div>
111       <div class="SECT3">
112         <h3 class="SECT3"><a name="INSTALLATION-FREEBSD" id="INSTALLATION-FREEBSD">2.1.6. FreeBSD and
113         ElectroBSD</a></h3>
114         <p>Privoxy is part of FreeBSD's Ports Collection, you can build and install it with <tt class="LITERAL">cd
115         /usr/ports/www/privoxy; make install clean</tt>.</p>
116         <p>If your system is configured to install binary packages you can try to install <span class=
117         "APPLICATION">Privoxy</span> with <tt class="LITERAL">pkg install privoxy</tt>.</p>
118       </div>
119     </div>
120     <div class="SECT2">
121       <h2 class="SECT2"><a name="INSTALLATION-SOURCE" id="INSTALLATION-SOURCE">2.2. Building from Source</a></h2>
122       <p>The most convenient way to obtain the <span class="APPLICATION">Privoxy</span> source code is to download the
123       source tarball from our <a href="https://sourceforge.net/projects/ijbswa/files/Sources/" target="_top">project
124       download page</a>, or you can get the up-to-the-minute, possibly unstable, development version from <a href=
125       "https://www.privoxy.org/" target="_top">https://www.privoxy.org/</a>.</p>
126       <p>To build <span class="APPLICATION">Privoxy</span> from source, <a href=
127       "http://www.gnu.org/software/autoconf/autoconf.html" target="_top">autoconf</a>, <a href=
128       "http://www.gnu.org/software/make/make.html" target="_top">GNU make (gmake)</a>, and, of course, a C compiler
129       like <a href="http://www.gnu.org/software/gcc/gcc.html" target="_top">gcc</a> are required.</p>
130       <p>When building from a source tarball, first unpack the source:</p>
131       <table border="0" bgcolor="#E0E0E0" width="100%">
132         <tr>
133           <td>
134             <pre class="SCREEN">  tar xzvf privoxy-3.0.35-beta-src.tar.gz
135   cd privoxy-3.0.35-beta</pre>
136           </td>
137         </tr>
138       </table>
139       <p>To build the development version, you can get the source code by doing:</p>
140       <table border="0" bgcolor="#E0E0E0" width="100%">
141         <tr>
142           <td>
143             <pre class="SCREEN">  cd &lt;root-dir&#62;
144   git clone https://www.privoxy.org/git/privoxy.git</pre>
145           </td>
146         </tr>
147       </table>
148       <p>This will create a directory named <tt class="FILENAME">&lt;root-dir&#62;/privoxy/</tt>, which will contain
149       the source tree.</p>
150       <p>Note that source code in Git is development quality, and may not be stable or well tested.</p>
151       <p>It is strongly recommended to not run <span class="APPLICATION">Privoxy</span> as root. You should
152       configure/install/run <span class="APPLICATION">Privoxy</span> as an unprivileged user, preferably by creating a
153       <span class="QUOTE">"privoxy"</span> user and group just for this purpose. See your local documentation for the
154       correct command line to do add new users and groups (something like <b class="COMMAND">adduser</b>, but the
155       command syntax may vary from platform to platform).</p>
156       <p><tt class="FILENAME">/etc/passwd</tt> might then look like:</p>
157       <table border="0" bgcolor="#E0E0E0" width="100%">
158         <tr>
159           <td>
160             <pre class="SCREEN">  privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell</pre>
161           </td>
162         </tr>
163       </table>
164       <p>And then <tt class="FILENAME">/etc/group</tt>, like:</p>
165       <table border="0" bgcolor="#E0E0E0" width="100%">
166         <tr>
167           <td>
168             <pre class="SCREEN">  privoxy:*:7777:</pre>
169           </td>
170         </tr>
171       </table>
172       <p>Some binary packages may do this for you.</p>
173       <p>Then, to build from either unpacked tarball or Git checkout:</p>
174       <table border="0" bgcolor="#E0E0E0" width="100%">
175         <tr>
176           <td>
177             <pre class="SCREEN">  autoheader
178   autoconf
179   ./configure      # (--help to see options)
180   make             # (the make from GNU, sometimes called gmake)
181   su               # Possibly required
182   make -n install  # (to see where all the files will go)
183   make -s install  # (to really install, -s to silence output)</pre>
184           </td>
185         </tr>
186       </table>
187       <p>Using GNU <b class="COMMAND">make</b>, you can have the first four steps automatically done for you by just
188       typing:</p>
189       <table border="0" bgcolor="#E0E0E0" width="100%">
190         <tr>
191           <td>
192             <pre class="SCREEN">  make</pre>
193           </td>
194         </tr>
195       </table>
196       <p>in the freshly downloaded or unpacked source directory.</p>
197       <p>To build an executable with security enhanced features so that users cannot easily bypass the proxy (e.g.
198       <span class="QUOTE">"Go There Anyway"</span>), or alter their own configurations, <b class=
199       "COMMAND">configure</b> like this:</p>
200       <table border="0" bgcolor="#E0E0E0" width="100%">
201         <tr>
202           <td>
203             <pre class="SCREEN">  ./configure  --disable-toggle  --disable-editor  --disable-force</pre>
204           </td>
205         </tr>
206       </table>
207       <p>Note that all of these options can also be disabled through the configuration file.</p>
208       <p><span class="emphasis"><i class="EMPHASIS">WARNING:</i></span> If installing as root, the install will fail
209       unless a non-root user or group is specified, or a <tt class="LITERAL">privoxy</tt> user and group already exist
210       on the system. If a non-root user is specified, and no group, then the installation will try to also use a group
211       of the same name as <span class="QUOTE">"user"</span>. If a group is specified (and no user), then the support
212       files will be installed as writable by that group, and owned by the user running the installation.</p>
213       <p><b class="COMMAND">configure</b> accepts <tt class="LITERAL">--with-user</tt> and <tt class=
214       "LITERAL">--with-group</tt> options for setting user and group ownership of the configuration files (which need
215       to be writable by the daemon). The specified <span class="emphasis"><i class="EMPHASIS">user must already
216       exist</i></span>. When starting <span class="APPLICATION">Privoxy</span>, it must be run as this same user to
217       insure write access to configuration and log files!</p>
218       <p>Alternately, you can specify <tt class="LITERAL">user</tt> and <tt class="LITERAL">group</tt> on the <b class=
219       "COMMAND">make</b> command line, but be sure both already exist:</p>
220       <table border="0" bgcolor="#E0E0E0" width="100%">
221         <tr>
222           <td>
223             <pre class="SCREEN">  make -s install  USER=privoxy GROUP=privoxy</pre>
224           </td>
225         </tr>
226       </table>
227       <p>The default installation path for <b class="COMMAND">make install</b> is <tt class="FILENAME">/usr/local</tt>.
228       This may of course be customized with the various <b class="COMMAND">./configure</b> path options. If you are
229       doing an install to anywhere besides <tt class="FILENAME">/usr/local</tt>, be sure to set the appropriate paths
230       with the correct configure options (<b class="COMMAND">./configure --help</b>). Non-privileged users must of
231       course have write access permissions to wherever the target installation is going.</p>
232       <p>If you do install to <tt class="FILENAME">/usr/local</tt>, the install will use <tt class=
233       "LITERAL">sysconfdir=$prefix/etc/privoxy</tt> by default. All other destinations, and the direct usage of
234       <tt class="LITERAL">--sysconfdir</tt> flag behave like normal, i.e. will not add the extra <tt class=
235       "FILENAME">privoxy</tt> directory. This is for a safer install, as there may already exist another program that
236       uses a file with the <span class="QUOTE">"config"</span> name, and thus makes <tt class=
237       "FILENAME">/usr/local/etc</tt> cleaner.</p>
238       <p>If installing to <tt class="FILENAME">/usr/local</tt>, the documentation will go by default to <tt class=
239       "FILENAME">$prefix/share/doc</tt>. But if this directory doesn't exist, it will then try <tt class=
240       "FILENAME">$prefix/doc</tt> and install there before creating a new <tt class="FILENAME">$prefix/share/doc</tt>
241       just for <span class="APPLICATION">Privoxy</span>.</p>
242       <p>Again, if the installs goes to <tt class="FILENAME">/usr/local</tt>, the <tt class=
243       "LITERAL">localstatedir</tt> (ie: <tt class="FILENAME">var/</tt>) will default to <tt class="FILENAME">/var</tt>
244       instead of <tt class="LITERAL">$prefix/var</tt> so the logs will go to <tt class=
245       "FILENAME">/var/log/privoxy/</tt>, and the pid file will be created in <tt class=
246       "FILENAME">/var/run/privoxy.pid</tt>.</p>
247       <p><b class="COMMAND">make install</b> will attempt to set the correct values in <tt class="FILENAME">config</tt>
248       (main configuration file). You should check this to make sure all values are correct. If appropriate, an init
249       script will be installed, but it is up to the user to determine how and where to start <span class=
250       "APPLICATION">Privoxy</span>. The init script should be checked for correct paths and values, if anything other
251       than a default install is done.</p>
252       <p>If install finds previous versions of local configuration files, most of these will not be overwritten, and
253       the new ones will be installed with a <span class="QUOTE">"new"</span> extension. default.action and
254       default.filter <span class="emphasis"><i class="EMPHASIS">will be overwritten</i></span>. You will then need to
255       manually update the other installed configuration files as needed. The default template files <span class=
256       "emphasis"><i class="EMPHASIS">will</i></span> be overwritten. If you have customized, local templates, these
257       should be stored safely in a separate directory and defined in <tt class="FILENAME">config</tt> by the
258       <span class="QUOTE">"templdir"</span> directive. It is of course wise to always back-up any important
259       configuration files <span class="QUOTE">"just in case"</span>. If a previous version of <span class=
260       "APPLICATION">Privoxy</span> is already running, you will have to restart it manually.</p>
261       <p>For more detailed instructions on how to build Redhat RPMs, Windows self-extracting installers, building on
262       platforms with special requirements etc, please consult the <a href=
263       "https://www.privoxy.org/developer-manual/newrelease.html" target="_top">developer manual</a>.</p>
264       <div class="SECT3">
265         <h3 class="SECT3"><a name="WINBUILD-CYGWIN" id="WINBUILD-CYGWIN">2.2.1. Windows</a></h3>
266         <div class="SECT4">
267           <h4 class="SECT4"><a name="WINBUILD-SETUP" id="WINBUILD-SETUP">2.2.1.1. Setup</a></h4>
268           <p>Install the Cygwin utilities needed to build <span class="APPLICATION">Privoxy</span>. If you have a 64
269           bit CPU (which most people do by now), get the Cygwin setup-x86_64.exe program <a href=
270           "https://cygwin.com/setup-x86_64.exe" target="_top">here</a> (the .sig file is <a href=
271           "https://cygwin.com/setup-x86_64.exe.sig" target="_top">here</a>).</p>
272           <p>Run the setup program and from View / Category select:</p>
273           <table border="0" bgcolor="#E0E0E0" width="100%">
274             <tr>
275               <td>
276                 <pre class="SCREEN">  Devel
277     autoconf 2.5
278     automake 1.15
279     binutils
280     cmake
281     gcc-core
282     gcc-g++
283     git
284     make
285     mingw64-i686-gcc-core
286     mingw64-i686-zlib
287   Editors
288     vim
289   Libs
290     libxslt: GNOME XSLT library (runtime)
291   Net
292     curl
293     openssh
294   Text
295     docbook-dssl
296     docbook-sgml31
297     docbook-utils
298     openjade
299   Utils
300     gnupg
301   Web
302     w3m</pre>
303               </td>
304             </tr>
305           </table>
306           <p>If you haven't already downloaded the Privoxy source code, get it now:</p>
307           <table border="0" bgcolor="#E0E0E0" width="100%">
308             <tr>
309               <td>
310                 <pre class="SCREEN">  mkdir &lt;root-dir&#62;
311   cd &lt;root-dir&#62;
312   git clone https://www.privoxy.org/git/privoxy.git</pre>
313               </td>
314             </tr>
315           </table>
316           <p>Get the source code (.zip or .tar.gz) for tidy from <a href="https://github.com/htacg/tidy-html5/releases"
317           target="_top">https://github.com/htacg/tidy-html5/releases</a>, unzip into &lt;root-dir&#62; and build the
318           software:</p>
319           <table border="0" bgcolor="#E0E0E0" width="100%">
320             <tr>
321               <td>
322                 <pre class="SCREEN">  cd &lt;root-dir&#62;
323   cd tidy-html5-x.y.z/build/cmake
324   cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
325   make &#38;&#38; make install</pre>
326               </td>
327             </tr>
328           </table>
329           <p>If you want to be able to make a Windows release package, get the NSIS .zip file from <a href=
330           "https://sourceforge.net/projects/nsis/files/NSIS%203/" target=
331           "_top">https://sourceforge.net/projects/nsis/files/NSIS%203/</a> and extract the NSIS directory to <tt class=
332           "LITERAL">/&lt;root-dir&#62;/nsis/</tt>. Then edit the <tt class="FILENAME">windows/GNUmakefile</tt> to set
333           the location of the NSIS executable - eg:</p>
334           <table border="0" bgcolor="#E0E0E0" width="100%">
335             <tr>
336               <td>
337                 <pre class="SCREEN">  # Path to NSIS
338   MAKENSIS = /&lt;root-dir&#62;/nsis/makensis.exe</pre>
339               </td>
340             </tr>
341           </table>
342           <p>Get the latest 8.x PCRE code from <a href="https://sourceforge.net/projects/pcre/files/pcre/" target=
343           "_top">PCRE https://sourceforge.net/projects/pcre/files/pcre/</a> and build the static PCRE libraries
344           with</p>
345           <table border="0" bgcolor="#E0E0E0" width="100%">
346             <tr>
347               <td>
348                 <pre class="SCREEN">  export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
349   export LDFLAGS="-fstack-protector-strong"
350   export CPPFLAGS="-DPCRE_STATIC"
351
352   ./configure  --host=i686-w64-mingw32 \
353                --prefix=/usr/local/i686-w64-mingw32 \
354                --enable-utf  --enable-unicode-properties \
355                --enable-jit \
356                --enable-newline-is-anycrlf \
357                --enable-pcre16 \
358                --enable-pcre32 \
359                --disable-pcregrep-libbz2 \
360                --disable-pcregrep-libz \
361                --disable-pcretest-libreadline \
362                --disable-stack-for-recursion  \
363                --enable-static --disable-shared \
364     &#38;&#38;  make</pre>
365               </td>
366             </tr>
367           </table>
368           <p>If you want to be able to have Privoxy do TLS Inspection, get the latest 2.28.x MBED-TLS library source
369           code from <a href="https://github.com/Mbed-TLS/mbedtls/tags" target=
370           "_top">https://github.com/Mbed-TLS/mbedtls/tags</a>, extract the tar file into <tt class=
371           "LITERAL">&lt;root-dir&gt;</tt> and build the static libraries with</p>
372           <table border="0" bgcolor="#E0E0E0" width="100%">
373             <tr>
374               <td>
375                 <pre class="PROGRAMLISTING">  export WINDOWS_BUILD=1
376   #  build for a Windows platform
377
378   unset DEBUG
379
380   export CC=i686-w64-mingw32-gcc
381   export LD=i686-w64-mingw32-gcc
382   export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
383   export LDFLAGS="${LDFLAGS} -fstack-protector-strong"
384
385   make lib
386   #  build the libraries</pre>
387               </td>
388             </tr>
389           </table>
390           <p>Get the brotli library from <a href="https://github.com/google/brotli/releases" target=
391           "_top">https://github.com/google/brotli/releases</a> and build the static libraries with</p>
392           <table border="0" bgcolor="#E0E0E0" width="100%">
393             <tr>
394               <td>
395                 <pre class="PROGRAMLISTING">  ./bootstrap
396   #  to create the GNU autotools files
397
398   autoconf
399
400   export CFLAGS="-O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2"
401   export LDFLAGS="${LDFLAGS} -fstack-protector-strong"
402
403   ./configure  --host=i686-w64-mingw32 \
404                --prefix=/usr/local/i686-w64-mingw32 \
405                --enable-static   \
406                --disable-shared  \
407                --with-gnu-ld     \
408                --disable-silent-rules \
409     &#38;&#38; make</pre>
410               </td>
411             </tr>
412           </table>
413         </div>
414         <div class="SECT4">
415           <h4 class="SECT4"><a name="WINBUILD-BUILD" id="WINBUILD-BUILD">2.2.1.2. Build</a></h4>
416           <p>To build just the Privoxy executable and not the whole installation package, do:</p>
417           <table border="0" bgcolor="#E0E0E0" width="100%">
418             <tr>
419               <td>
420                 <pre class="PROGRAMLISTING">  cd &lt;root-dir&#62;/privoxy
421   ./windows/MYconfigure &#38;&#38; make</pre>
422               </td>
423             </tr>
424           </table>
425           <p>Privoxy uses the <a href="https://en.wikipedia.org/wiki/GNU_build_system" target="_top">GNU Autotools</a>
426           for building software, so the process is:</p>
427           <table border="0" bgcolor="#E0E0E0" width="100%">
428             <tr>
429               <td>
430                 <pre class="PROGRAMLISTING">  autoheader              # creates config.h.in
431   autoconf                # uses config.h.in to create the configure shell script
432   ./configure [options]   # creates GNUmakefile
433   make        [options]   # builds the program</pre>
434               </td>
435             </tr>
436           </table>
437           <p>The usual <tt class="LITERAL">configure</tt> options for building a native Windows application under
438           cygwin are</p>
439           <table border="0" bgcolor="#E0E0E0" width="100%">
440             <tr>
441               <td>
442                 <pre class="LITERALLAYOUT">  --host=i686-w64-mingw32
443   --enable-mingw32
444   --enable-zlib
445   --enable-static-linking
446   --disable-pthread
447   --with-brotli
448   --with-mbedtls</pre>
449               </td>
450             </tr>
451           </table>
452           <p>You can set the <tt class="LITERAL">CFLAGS</tt> and <tt class="LITERAL">LDFLAGS</tt> envars before running
453           <tt class="LITERAL">configure</tt> to set compiler and linker flags. For example:</p>
454           <table border="0" bgcolor="#E0E0E0" width="100%">
455             <tr>
456               <td>
457                 <pre class="PROGRAMLISTING">  $ export CFLAGS="-O2"              # set gcc optimization level
458   $ export LDFLAGS="-Wl,--nxcompat"  # Enable DEP
459   $ ./configure --host=i686-w64-mingw32 --enable-mingw32  --enable-zlib \
460   &#62;             --enable-static-linking --disable-pthread
461   $ make                             # build Privoxy</pre>
462               </td>
463             </tr>
464           </table>
465           <p>See the <a href="../developer-manual/newrelease.html#NEWRELEASE-WINDOWS" target="_top">Developer's
466           Manual</a> for building a Windows release package.</p>
467         </div>
468       </div>
469     </div>
470     <div class="SECT2">
471       <h2 class="SECT2"><a name="INSTALLATION-KEEPUPDATED" id="INSTALLATION-KEEPUPDATED">2.3. Keeping your Installation
472       Up-to-Date</a></h2>
473       <p>If you wish to receive an email notification whenever we release updates of <span class=
474       "APPLICATION">Privoxy</span> or the actions file, <a href=
475       "https://lists.privoxy.org/mailman/listinfo/privoxy-announce" target="_top">subscribe to our announce mailing
476       list</a>, privoxy-announce@lists.privoxy.org.</p>
477       <p>In order not to lose your personal changes and adjustments when updating to the latest <tt class=
478       "LITERAL">default.action</tt> file we <span class="emphasis"><i class="EMPHASIS">strongly recommend</i></span>
479       that you use <tt class="LITERAL">user.action</tt> and <tt class="LITERAL">user.filter</tt> for your local
480       customizations of <span class="APPLICATION">Privoxy</span>. See the <a href="actions-file.html">Chapter on
481       actions files</a> for details.</p>
482     </div>
483   </div>
484   <div class="NAVFOOTER">
485     <hr align="left" width="100%">
486     <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
487       <tr>
488         <td width="33%" align="left" valign="top"><a href="introduction.html" accesskey="P">Prev</a></td>
489         <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>
490         <td width="33%" align="right" valign="top"><a href="whatsnew.html" accesskey="N">Next</a></td>
491       </tr>
492       <tr>
493         <td width="33%" align="left" valign="top">Introduction</td>
494         <td width="34%" align="center" valign="top">&nbsp;</td>
495         <td width="33%" align="right" valign="top">What's New in this Release</td>
496       </tr>
497     </table>
498   </div>
499 </body>
500 </html>