httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pt...@pobox.com
Subject [PATCH] flood: Fixed Win32 build when not using OpenSSL
Date Mon, 03 Feb 2003 23:18:53 GMT
Summary:
  Fixed the Win32 build to exclude the OpenSSL libraries when we
  build without OpenSSL.

This patch changes the Windows flood build so that it links successfully
when you are building flood without OpenSSL.  The changes move all
the link decisions regarding OpenSSL usage to Makefile.win.  When you
now build flood without the OpenSSL libraries, MSDEV will display the
following message (which will not break the build):
  flood.exe - 0 error(s), 11 warning(s)
  The following environment variables were not found
  $(LINKSSL)

NOTE: This patch upgrades the flood_test.dsp to DevStudio 6 format.
I previously sent a patch for this upgrade in an e-mail titled:
  [PATCH] flood: Upgraded flood_test.dsp to MS DevStudio 6 format

Below are summaries of the per-file changes.

flood.dsp:
  * Replaced OpenSSL libraries and lib path with LINKSSL.
flood_test.dsp:
  * Replaced OpenSSL libraries and lib path with LINKSSL.
  * Upgraded to DevStudio 6 format so I can verify that
    flood_test.exe builds with and without the OpenSSL libraries.
Makefile.win:
  * Changed macro SSLBIN to include the OPENSSLPATH directory.
    The change consolidates the usage to just the SSLBIN definition.
    References to $(OPENSSLPATH)\$(SSLBIN) become $(SSLBIN).
  * Removed setting SSLBIN from floodenv.bat.  The DSP files
    no longer reference the SSLBIN variable directly.  Previously,
    when you built flood without the OpenSSL libraries, floodenv.bat
    would try to unset SSLBIN.  If you did not run floodenv.bat
    before invoking the makefile, the build would fail.  NMAKE would
    invoke floodenv.bat, which tries to unset a variable that is
    not defined---which results in an error in Windows (NT and 2000).
  * We set the LINKSSL variable to include the libraries and add
    the library's include path.  When you build without OpenSSL,
    the variable will be undefined and we will no longer include
    the OpenSSL libraries.

I verified these changes by building the debug and release configurations
of flood and flood_test.  I also built those configurations with the
debug and release builds of OpenSSL 0.9.7.  For a sanity check, I ran
the resulting executables with no input to verify they load successfully.
They correctly complained about improper XML input.

Index: Makefile.win
===================================================================
RCS file: /home/cvspublic/httpd-test/flood/Makefile.win,v
retrieving revision 1.1
diff -u -r1.1 Makefile.win
--- Makefile.win	31 May 2002 07:57:16 -0000	1.1
+++ Makefile.win	3 Feb 2003 22:24:30 -0000
@@ -86,9 +86,9 @@
 [del config.h]
 !ENDIF
 !IFDEF DEBUG
-SSLBIN=out32dll.dbg
+SSLBIN=$(OPENSSLPATH)\out32dll.dbg
 !ELSE
-SSLBIN=out32dll
+SSLBIN=$(OPENSSLPATH)\out32dll
 !ENDIF
 HAVE_SSL=1
 !ENDIF
@@ -108,7 +108,9 @@
 	echo set APRUTILPATH=$(APRUTILPATH)>>floodenv.bat
 	echo set OPENSSLPATH=$(OPENSSLPATH)>>floodenv.bat
 	echo set REGEXPATH=$(REGEXPATH)>>floodenv.bat
-	echo set SSLBIN=$(SSLBIN)>>floodenv.bat
+!IF "$(HAVE_SSL)" == "1"
+	echo set LINKSSL=libeay32.lib ssleay32.lib /libpath:"$(SSLBIN)">>floodenv.bat
+!ENDIF
 
 regex.h: $(REGEXPATH)\pcreposix.h
 	copy "$(REGEXPATH)\pcreposix.h" regex.h < <<
@@ -193,8 +195,8 @@
 	copy LICENSE "$(INSTDIR)\LICENSE.txt" <.y
 	copy $(LONG)\flood.exe "$(INSTDIR)\bin" <.y
 !IF EXIST("$(OPENSSLPATH)")
-	copy $(OPENSSLPATH)\$(SSLBIN)\libeay32.dll "$(INSTDIR)\bin" <.y
-	copy $(OPENSSLPATH)\$(SSLBIN)\ssleay32.dll "$(INSTDIR)\bin" <.y
+	copy $(SSLBIN)\libeay32.dll "$(INSTDIR)\bin" <.y
+	copy $(SSLBIN)\ssleay32.dll "$(INSTDIR)\bin" <.y
 	xcopy $(OPENSSLPATH)\certs "$(INSTDIR)\certs" < .a
 	type << >> "$(INSTDIR)\README.txt"
 
Index: flood.dsp
===================================================================
RCS file: /home/cvspublic/httpd-test/flood/flood.dsp,v
retrieving revision 1.4
diff -u -r1.4 flood.dsp
--- flood.dsp	5 Jun 2002 06:25:19 -0000	1.4
+++ flood.dsp	3 Feb 2003 22:24:30 -0000
@@ -50,7 +50,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib /nologo
/subsystem:console /map /machine:I386
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
libeay32.lib ssleay32.lib /nologo /subsystem:console /map /machine:I386 /libpath:"$(APRPATH)\LibR"
/libpath:"$(APRUTILPATH)\LibR" /libpath:"$(OPENSSLPATH)\$(SSLBIN)" /libpath:"$(REGEXPATH)\LibR"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
/nologo /subsystem:console /map /machine:I386 /libpath:"$(APRPATH)\LibR" /libpath:"$(APRUTILPATH)\LibR"
$(LINKSSL) /libpath:"$(REGEXPATH)\LibR"
 
 !ELSEIF  "$(CFG)" == "flood - Win32 Debug"
 
@@ -74,7 +74,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib /nologo
/subsystem:console /incremental:no /map /debug /machine:I386
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /map /debug /machine:I386
/libpath:"$(APRPATH)\LibD" /libpath:"$(APRUTILPATH)\LibD" /libpath:"$(OPENSSLPATH)\$(SSLBIN)"
/libpath:"$(REGEXPATH)\LibD"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
/nologo /subsystem:console /incremental:no /map /debug /machine:I386 /libpath:"$(APRPATH)\LibD"
/libpath:"$(APRUTILPATH)\LibD" $(LINKSSL) /libpath:"$(REGEXPATH)\LibD"
 
 !ENDIF 
 
Index: flood_test.dsp
===================================================================
RCS file: /home/cvspublic/httpd-test/flood/flood_test.dsp,v
retrieving revision 1.1
diff -u -r1.1 flood_test.dsp
--- flood_test.dsp	31 May 2002 08:27:07 -0000	1.1
+++ flood_test.dsp	3 Feb 2003 22:24:30 -0000
@@ -1,5 +1,5 @@
 # Microsoft Developer Studio Project File - Name="flood_test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
 # ** DO NOT EDIT **
 
 # TARGTYPE "Win32 (x86) Console Application" 0x0103
@@ -22,6 +22,7 @@
 !MESSAGE 
 
 # Begin Project
+# PROP AllowPerConfigDependencies 0
 # PROP Scc_ProjName ""
 # PROP Scc_LocalPath ""
 CPP=cl.exe
@@ -49,7 +50,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib /nologo
/subsystem:console /map /machine:I386
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
libeay32.lib ssleay32.lib /nologo /subsystem:console /map /machine:I386 /libpath:"$(APRPATH)\LibR"
/libpath:"$(APRUTILPATH)\LibR" /libpath:"$(OPENSSLPATH)\$(SSLBIN)" /libpath:"$(REGEXPATH)\LibR"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
/nologo /subsystem:console /map /machine:I386 /libpath:"$(APRPATH)\LibR" /libpath:"$(APRUTILPATH)\LibR"
$(LINKSSL) /libpath:"$(REGEXPATH)\LibR"
 
 !ELSEIF  "$(CFG)" == "flood_test - Win32 Debug"
 
@@ -73,7 +74,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib /nologo
/subsystem:console /incremental:no /map /debug /machine:I386
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /map /debug /machine:I386
/libpath:"$(APRPATH)\LibD" /libpath:"$(APRUTILPATH)\LibD" /libpath:"$(OPENSSLPATH)\$(SSLBIN)"
/libpath:"$(REGEXPATH)\LibD"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib apr.lib aprutil.lib pcreposix.lib
/nologo /subsystem:console /incremental:no /map /debug /machine:I386 /libpath:"$(APRPATH)\LibD"
/libpath:"$(APRUTILPATH)\LibD" $(LINKSSL) /libpath:"$(REGEXPATH)\LibD"
 
 !ENDIF 
 

Mime
View raw message