More updates for Windows builds suggested by Tom Donovan at apachelounge.

This commit is contained in:
brectanus 2008-02-13 18:10:04 +00:00
parent cc2110b187
commit f00e15cc0a
3 changed files with 36 additions and 17 deletions

View File

@ -1,7 +1,7 @@
12 Feb 2008 - 2.5.0-rc4
13 Feb 2008 - 2.5.0-rc4
-----------------------
* Updated code to be more portable so it builds with MS VC++ 8.
* Updated code to be more portable so it builds with MS VC++.
11 Feb 2008 - 2.5.0-rc3

View File

@ -6,31 +6,40 @@
# Path to Apache httpd installation
BASE = C:\Apache2
# Path to required libraries
# Paths to required libraries
LIBXML2 = C:\work\libxml2-2.6.31
LUA = C:\work\lua-5.1.3\src
LUA = C:\work\lua-5.1.3
PCRE = C:\work\httpd-2.2.8\srclib\pcre
# Linking libraries
LIBS = $(BASE)\lib\libhttpd.lib \
$(BASE)\lib\libapr-1.lib \
$(BASE)\lib\libaprutil-1.lib \
$(PCRE)\LibR\pcre.lib \
$(LIBXML2)\win32\bin.msvc\libxml2.lib \
$(LUA)\lua5.1.lib \
wsock32.lib
###########################################################################
###########################################################################
CC = cL
MT = mt
DEFS = /nologo /O2 /LD /W3 /wd4244 -DWIN32 -DWINNT -Dinline=APR_INLINE
DLL = mod_security2.so
INCLUDES = -I. -I$(PCRE) -I$(LIBXML2)\include -I$(LUA) -I$(BASE)\include
INCLUDES = -I. \
-I$(PCRE)\include -I$(PCRE) \
-I$(LIBXML2)\include \
-I$(LUA)\include -I$(LUA) \
-I$(BASE)\include
CFLAGS= -MD $(INCLUDES) $(DEFS)
LIBS = $(BASE)\lib\libhttpd.lib \
$(BASE)\lib\libapr-1.lib \
$(BASE)\lib\libaprutil-1.lib \
$(PCRE)\LibR\pcre.lib \
$(LIBXML2)\win32\bin.msvc\libxml2.lib \
$(LUA)\lua.lib \
wsock32.lib
LDFLAGS =
OBJS = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
re.obj re_operators.obj re_actions.obj re_tfns.obj re_variables.obj \
@ -53,10 +62,11 @@ mod_security2_config.h: mod_security2_config.hw
$(CC) $(CFLAGS) -c $< -Fo$@
$(DLL): mod_security2_config.h $(OBJS)
$(CC) $(CFLAGS) -LD $(OBJS) -Fe$(DLL) $(LIBS) /link
$(CC) $(CFLAGS) $(LDFLAGS) -LD $(OBJS) -Fe$(DLL) $(LIBS) /link
IF EXIST $(DLL).manifest $(MT) -manifest $(DLL).manifest -outputresource:$(DLL);2
install: $(DLL)
copy $(DLL) $(BASE)\modules
clean:
del $(OBJS) *.dll *.lib *.pdb *.idb *.ilk *.exp *.res *.rc *.bin mod_security2_config.h
del $(OBJS) $(DLL) *.dll *.lib *.pdb *.idb *.ilk *.exp *.res *.rc *.bin mod_security2_config.h *.manifest

View File

@ -3,7 +3,7 @@
<title>ModSecurity Reference Manual</title>
<articleinfo>
<releaseinfo>Version 2.5.0-rc4 (February 12, 2008)</releaseinfo>
<releaseinfo>Version 2.5.0-rc4 (February 13, 2008)</releaseinfo>
<copyright>
<year>2004-2008</year>
@ -391,6 +391,14 @@
<para>Install the ModSecurity module with: <literal>nmake -f
Makefile.win install</literal></para>
</listitem>
<listitem>
<para>Copy the <literal>libxml2.dll</literal> and
<literal>lua5.1.dll</literal> to the Apache
<literal>bin</literal> directory. Alternatively you can follow
the step below for using LoadFile to load these
libraries.</para>
</listitem>
</orderedlist>
</listitem>
</itemizedlist>
@ -400,7 +408,8 @@
<para>Edit the main Apache httpd config file (usually
<literal>httpd.conf</literal>)</para>
<para>On UNIX you must load libxml2 and lua before ModSecurity with
<para>On UNIX (and Windows if you did not copy the DLLs as stated
above) you must load libxml2 and lua5.1 before ModSecurity with
something like this:</para>
<para><programlisting>LoadFile /usr/lib/libxml2.so
@ -5765,4 +5774,4 @@ Server: Apache/2.x.x
</section>
</section>
</section>
</article>
</article>