win_compiling.html revision 3ebc47c97ee0d9a45b18666a70a80bffb18c4eb2
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <meta name="generator" content="HTML Tidy, see www.w3.org" />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <title>Compiling Apache for Microsoft Windows</title>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <!--#include virtual="header.html" -->
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <h1 align="center">Compiling Apache for Microsoft Windows</h1>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <p>There are many important points before you begin compiling
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Apache. See <a href="windows.html">Using Apache with Microsoft
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <p>Compiling Apache requires the following environment to be
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync properly installed;</p>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Make sure you have at least 50 MB of free disk space
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync available. After installation Apache requires approximately
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync 10 MB of disk space, plus space for log and cache files,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync which can grow rapidly. The actual disk space requirements
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync will vary considerably based on your chosen configuration and
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync any third-party modules or libraries.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Microsoft Visual C++ 5.0 or higher.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Apache can be built using the command line tools, or from
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync within the Visual Studio IDE Workbench. The command line
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync build requires the environment to reflect the PATH, INCLUDE,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync LIB and other variables that can be configured with the
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync vcvars32 batch file:
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync "c:\Program Files\DevStudio\VC\Bin\vcvars32.bat"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync The Windows Platform SDK.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Visual C++ 5.0 builds require an updated Microsoft Windows
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Platform SDK to enable some Apache features. For command line
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync builds, the Platform SDK environment is prepared by the
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync setenv batch file:
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync "c:\Program Files\Platform SDK\setenv.bat"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync The Platform SDK files distributed with Visual C++ 6.0 and
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync later are sufficient, so users of later version may skip
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync this requirement.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <strong>Note</strong> that the Windows Platform SDK update
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync is required to enable all supported mod_isapi features.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Without a recent update, Apache will issue warnings under
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync MSVC++ 5.0 that some mod_isapi features will be disabled.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Look for the update at <a
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync href="http://msdn.microsoft.com/downloads/sdks/platform/platform.asp">
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync http://msdn.microsoft.com/downloads/sdks/platform/platform.asp</a>.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync To install Apache within the build system, several files are
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync modified using the awk.exe utility. awk was chosen since it
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync is a very small download (compared with Perl or WSH/VB) and
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync accomplishes the task of generating files. Brian Kernighan's
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync site has a compiled native Win32 binary,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <a href="http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync >http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe</a> which
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync you must save with the name awk.exe rather than awk95.exe.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Note that Developer Studio IDE will only find awk.exe from
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync the <u>T</u>ools menu <u>O</u>ptions... Directories tab list of
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Executable file paths. Add the path for awk.exe to this list,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync and your system PATH environment variable, as needed.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <li>[Optional] OpenSSL libraries (for mod_ssl and ab.exe with ssl support)<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <strong>Caution: there are significant restrictions and
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync prohibitions on the use and distribution of strong cryptography
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync and patented intellectual property throughout the world.</strong>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync OpenSSL includes strong cryptography controlled by both export
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync regulations and domestic law, as well as intellectual property
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync protected by patent, in the United States and elsewhere. Neither
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync the Apache Software Foundation nor the OpenSSL project can provide
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync legal advise regarding possession, use, or distribution of the code
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync provided by the OpenSSL project. <strong>Consult your own legal
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync counsel, you are responsible for your own actions.</strong><br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync OpenSSL must be installed into a srclib subdirectory named openssl,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync obtained from <a href="http://www.openssl.org/source/"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync >http://www.openssl.org/source/</a>, in order to compile mod_ssl
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync or the abs project (ab.exe with SSL support.) To prepare OpenSSL
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync for both release and debug builds of Apache, and disable the patent
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync protected features in 0.9.6c (as built by the ASF for binary
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync distribution from the United States), you might use the following
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync build commands;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync perl util\mkfiles.pl >MINFO
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync perl util\mk1mf.pl dll no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync perl util\mk1mf.pl dll debug no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile.dbg
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync perl util\mkdef.pl 32 libeay no-asm no-mdc2 no-rc5 no-idea >ms\libeay32.def
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync perl util\mkdef.pl 32 ssleay no-asm no-mdc2 no-rc5 no-idea >ms\ssleay32.def
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <li>[Optional] zlib sources (for mod_deflate)<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Zlib must be installed into a srclib subdirectory named zlib,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync however those sources need not be compiled. The build system will
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync compile the compression sources directly into the mod_deflate
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync module. Zlib can be obtained from <a href="http://www.gzip.org/zlib/"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync >http://www.gzip.org/zlib/</a> -- mod_deflate is confirmed to
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync build correctly with version 1.1.4.<br />
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <h3><a id="commandbuild" name="commandbuild">Command-Line
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync <p>First, unpack the Apache distribution into an appropriate
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync directory. Open a command-line prompt and cd to that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync directory.</p>
nmake /f Makefile.win _apacher
nmake /f Makefile.win _apached
VisualStudio workspace, Apache.dsw, is provided. This workspace
invokes Makefile.win to move the compiled executables and dlls.
7.0 (.net) must convert Apache.dsw plus the .dsp files into an
perl srclib\apr\build\fixwin32mak.pl
sysincl.dat file, which must list all exceptions. Update this