mod_perl build on windows.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@755 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-03-06 00:02:45 +00:00
parent 95bbc9e70a
commit ce0bd79277
6 changed files with 264 additions and 8 deletions

View File

@ -78,10 +78,12 @@ typedef unsigned long in_addr_t;
#endif
#define PACKED
#include <io.h>
#ifndef WIN32IOP_H //macro collision with perl
#define write _write
#define open _open
#define close _close
#define read _read
#endif
#else
/* packed attribute */
#ifndef PACKED

View File

@ -24,6 +24,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="if not exist perlxsi.c perl -MExtUtils::Embed -e xsinit"
/>
<Tool
Name="VCCustomBuildTool"
@ -41,8 +42,8 @@
Name="VCCLCompilerTool"
AdditionalOptions="@compiler.opts"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;.."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FS_PERL_EXPORTS"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FS_PERL_EXPORTS;MULTIPLICITY;EMBED_PERL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -62,6 +63,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/EXPORT:xs_init"
OutputFile="$(OutDir)\Perl\$(ProjectName).dll"
LinkIncremental="2"
GenerateDebugInformation="true"
@ -91,7 +93,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="@xcopy $(InputDir)fs_perl.pm $(Outdir)\Perl\ /C /D /Y&#x0D;&#x0A;@if not exist $(Outdir)\Perl\freeswitch.pm xcopy $(InputDir)freeswitch.pm $(Outdir)\Perl\ /C /Y"
CommandLine="@xcopy $(InputDir)fs_perl.pm $(Outdir)\Perl\ /C /D /Y&#x0D;&#x0A;@if not exist $(Outdir)\Perl\freeswitch.pm xcopy $(InputDir)freeswitch.pm $(Outdir)\Perl\ /C /Y&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@ -104,6 +106,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="if not exist perlxsi.c perl -MExtUtils::Embed -e xsinit"
/>
<Tool
Name="VCCustomBuildTool"
@ -120,8 +123,8 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="@compiler.opts"
AdditionalIncludeDirectories="c:\perl\lib\CORE;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FS_PERL_EXPORTS"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FS_PERL_EXPORTS;MULTIPLICITY;EMBED_PERL"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -139,6 +142,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/EXPORT:xs_init"
OutputFile="$(OutDir)\Perl\$(ProjectName).dll"
LinkIncremental="1"
GenerateDebugInformation="true"
@ -170,7 +174,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="@xcopy $(InputDir)fs_perl.pm $(Outdir)\Perl\ /C /D /Y&#x0D;&#x0A;@if not exist $(Outdir)\Perl\freeswitch.pm xcopy $(InputDir)freeswitch.pm $(Outdir)\Perl\ /C /Y"
CommandLine="@xcopy $(InputDir)fs_perl.pm $(Outdir)\Perl\ /C /D /Y&#x0D;&#x0A;@if not exist $(Outdir)\Perl\freeswitch.pm xcopy $(InputDir)freeswitch.pm $(Outdir)\Perl\ /C /Y&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@ -193,6 +197,22 @@
<File
RelativePath=".\switch_swig_wrap.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
WarningLevel="0"
/>
</FileConfiguration>
</File>
</Filter>
<Filter

View File

@ -29,9 +29,15 @@
* mod_perl.c -- Perl
*
*/
#include <switch.h>
#ifdef _MSC_VER
#include <perlibs.h>
#pragma comment(lib, PERL_LIB)
#endif
#include <EXTERN.h>
#include <perl.h>
#include <switch.h>
static char *embedding[] = { "", "-e", "" };
EXTERN_C void xs_init(pTHX);

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="mod_perl"
ProjectGUID="{7B077E7F-1BE7-4291-AB86-55E527B25CAC}"
RootNamespace="mod_perl"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo $(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs mod_perl Debug"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="@compiler.opts"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;_CRT_SECURE_NO_DEPRECATE;MULTIPLICITY;EMBED_PERL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_perl.dll"
LinkIncremental="2"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/mod_perl.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/mod_perl.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo $(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs mod_perl Release"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="@compiler.opts"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;_CRT_SECURE_NO_DEPRECATE;MULTIPLICITY;EMBED_PERL"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_perl.dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
ImportLibrary="$(OutDir)/mod_perl.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\mod_perl.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1 +1 @@
#define PERL_LIB "C:\perl\lib\CORE\perl58.lib"
#define PERL_LIB "C:\\perl\\lib\\CORE\\perl58.lib"

View File

@ -163,6 +163,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cepstral", "..\..\src\m
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fs_perl", "..\..\src\mod\languages\mod_perl\fs_perl.vcproj", "{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_perl", "..\..\src\mod\languages\mod_perl\mod_perl.vcproj", "{7B077E7F-1BE7-4291-AB86-55E527B25CAC}"
ProjectSection(ProjectDependencies) = postProject
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -286,6 +295,10 @@ Global
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}.Debug|Win32.Build.0 = Debug|Win32
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}.Release|Win32.ActiveCfg = Release|Win32
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8}.Release|Win32.Build.0 = Release|Win32
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.ActiveCfg = Debug|Win32
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.Build.0 = Debug|Win32
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.ActiveCfg = Release|Win32
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -316,6 +329,7 @@ Global
{EC3E5C7F-EE09-47E2-80FE-546363D14A98} = {B8F5B47B-8568-46EB-B320-64C17D2A98BC}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
EndGlobalSection
EndGlobal