+><DIV
+CLASS="SECT3"
+><H3
+CLASS="SECT3"
+><A
+NAME="WINBUILD-CYGWIN"
+>2.2.1. Windows</A
+></H3
+><DIV
+CLASS="SECT4"
+><H4
+CLASS="SECT4"
+><A
+NAME="WINBUILD-SETUP"
+>2.2.1.1. Setup</A
+></H4
+><P
+> Install the Cygwin utilities needed to build <SPAN
+CLASS="APPLICATION"
+>Privoxy</SPAN
+>.
+ If you have a 64 bit CPU (which most people do by now), get the
+ Cygwin setup-x86_64.exe program <A
+HREF="https://cygwin.com/setup-x86_64.exe"
+TARGET="_top"
+>here</A
+>
+ (the .sig file is <A
+HREF="https://cygwin.com/setup-x86_64.exe.sig"
+TARGET="_top"
+>here</A
+>).
+ </P
+><P
+> Run the setup program and from View / Category select:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+> Devel
+ autoconf 2.5
+ automake 1.15
+ binutils
+ cmake
+ gcc-core
+ gcc-g++
+ git
+ make
+ mingw64-i686-gcc-core
+ mingw64-i686-zlib
+ Editors
+ vim
+ Libs
+ libxslt: GNOME XSLT library (runtime)
+ Net
+ curl
+ openssh
+ Text
+ docbook-dssl
+ docbook-sgml31
+ docbook-utils
+ openjade
+ Utils
+ gnupg
+ Web
+ w3m</PRE
+></TD
+></TR
+></TABLE
+><P
+> If you haven't already downloaded the Privoxy source code, get it now:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+> mkdir <root-dir>
+ cd <root-dir>
+ git clone https://www.privoxy.org/git/privoxy.git</PRE
+></TD
+></TR
+></TABLE
+><P
+> Get the source code (.zip or .tar.gz) for tidy from
+ <A
+HREF="https://github.com/htacg/tidy-html5/releases"
+TARGET="_top"
+> https://github.com/htacg/tidy-html5/releases</A
+>,
+ unzip into <root-dir> and build the software:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+> cd <root-dir>
+ cd tidy-html5-x.y.z/build/cmake
+ cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
+ make && make install</PRE
+></TD
+></TR
+></TABLE
+><P
+> If you want to be able to make a Windows release package, get the NSIS .zip file from
+
+ <A
+HREF="https://sourceforge.net/projects/nsis/files/NSIS%203/"
+TARGET="_top"
+> https://sourceforge.net/projects/nsis/files/NSIS%203/</A
+>
+ and extract the NSIS directory to <TT
+CLASS="LITERAL"
+>privoxy/windows</TT
+>.
+ Then edit the windows/GNUmakefile to set the location of the NSIS executable - eg:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="SCREEN"
+># Path to NSIS
+MAKENSIS = ./nsis/makensis.exe</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="SECT4"
+><H4
+CLASS="SECT4"
+><A
+NAME="WINBUILD-BUILD"
+>2.2.1.2. Build</A
+></H4
+><P
+> To build just the Privoxy executable and not the whole installation package, do:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> cd <root-dir>/privoxy
+ ./windows/MYconfigure && make</PRE
+></TD
+></TR
+></TABLE
+><P
+> Privoxy uses the <A
+HREF="https://en.wikipedia.org/wiki/GNU_build_system"
+TARGET="_top"
+>GNU Autotools</A
+>
+ for building software, so the process is:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> $ autoheader # creates config.h.in
+ $ autoconf # uses config.h.in to create the configure shell script
+ $ ./configure [options] # creates GNUmakefile
+ $ make [options] # builds the program</PRE
+></TD
+></TR
+></TABLE
+><P
+> The usual <TT
+CLASS="LITERAL"
+>configure</TT
+> options for building a native Windows application under cygwin are
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="LITERALLAYOUT"
+> --host=i686-w64-mingw32
+ --enable-mingw32
+ --enable-zlib
+ --enable-static-linking
+ --disable-pthread
+ --disable-dynamic-pcre</PRE
+></TD
+></TR
+></TABLE
+><P
+> You can set the <TT
+CLASS="LITERAL"
+>CFLAGS</TT
+> and <TT
+CLASS="LITERAL"
+>LDFLAGS</TT
+> envars before
+ running <TT
+CLASS="LITERAL"
+>configure</TT
+> to set compiler and linker flags. For example:
+ </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+> $ export CFLAGS="-O2" # set gcc optimization level
+ $ export LDFLAGS="-Wl,--nxcompat" # Enable DEP
+ $ ./configure --host=i686-w64-mingw32 --enable-mingw32 --enable-zlib \
+ > --enable-static-linking --disable-pthread --disable-dynamic-pcre
+ $ make # build Privoxy</PRE
+></TD
+></TR
+></TABLE
+><P
+> See the <A
+HREF="../developer-manual/newrelease.html#NEWRELEASE-WINDOWS"
+TARGET="_top"
+>Developer's Manual</A
+>
+ for building a Windows release package.
+ </P
+></DIV
+></DIV