⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.bat

📁 mod_ssl-2.8.31-1.3.41.tar.gz 好用的ssl工具
💻 BAT
📖 第 1 页 / 共 2 页
字号:
@rem = '--*-CPerl-*--@echo offperl -x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9goto endofperl@rem ';#!perl -w#line 8####  configure.bat -- mod_ssl configuration script (Win32 version)####  ====================================================================##  Copyright (c) 1998-2006 Ralf S. Engelschall. All rights reserved.## ##  Redistribution and use in source and binary forms, with or without##  modification, are permitted provided that the following conditions##  are met:## ##  1. Redistributions of source code must retain the above copyright##     notice, this list of conditions and the following disclaimer. ## ##  2. Redistributions in binary form must reproduce the above copyright##     notice, this list of conditions and the following##     disclaimer in the documentation and/or other materials##     provided with the distribution.## ##  3. All advertising materials mentioning features or use of this##     software must display the following acknowledgment:##     "This product includes software developed by ##      Ralf S. Engelschall <rse@engelschall.com> for use in the##      mod_ssl project (http://www.modssl.org/)."## ##  4. The names "mod_ssl" must not be used to endorse or promote##     products derived from this software without prior written##     permission. For written permission, please contact##     rse@engelschall.com.## ##  5. Products derived from this software may not be called "mod_ssl"##     nor may "mod_ssl" appear in their names without prior##     written permission of Ralf S. Engelschall.## ##  6. Redistributions of any form whatsoever must retain the following##     acknowledgment:##     "This product includes software developed by ##      Ralf S. Engelschall <rse@engelschall.com> for use in the##      mod_ssl project (http://www.modssl.org/)."## ##  THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``AS IS'' AND ANY##  EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE##  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR##  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL RALF S. ENGELSCHALL OR##  HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT##  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;##  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)##  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,##  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)##  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED##  OF THE POSSIBILITY OF SUCH DAMAGE.##  ====================================================================##                             # ``Perl: The only language you can                             #   uuencode and not notice.''                             #              -- Unknownrequire 5.003;use strict;##   configuration#my $prefix  = ' +';my $prefixo = '   o';my $prefixe = '    ';my $apache  = '';my $ssl     = '';my $patch   = 'etc\patch.exe';(my $progname = $0) =~ s|.*[/\\]||;##   determine versions and give a friendly header#open(FP, '<pkg.sslmod\libssl.version');my $v = <FP>;$v =~ s|\n||;close(FP);my ($V_MODSSL, $V_APACHE) = ($v =~ m|^.*/(.+?)-(.+?)$|);my $V_MODSSL_NUM;if ($V_MODSSL =~ m|(\d+).(\d+)b(\d+)|) {    $V_MODSSL_NUM = sprintf("%d%02d0%02d", $1, $2, $3);}if ($V_MODSSL =~ m|(\d+).(\d+)\.(\d+)|) {    $V_MODSSL_NUM = sprintf("%d%02d1%02d", $1, $2, $3);}##   parse argument line#my $arg;my $usage = 0;my $help = 0;my $verbose = 0;my $i;#   fix Windows brain dead %X parsing which replaced the "=" charsfor ($i = 0; $i < $#ARGV; $i++) {    if ($ARGV[$i] =~ m/^--with-(apache|ssl|ssleay|patch)$/) {        $ARGV[$i] .= "=" . splice(@ARGV, $i+1, 1);    }}foreach $arg (@ARGV) {    if ($arg =~ m|--with-apache=(\S+)|) {        $apache = $1;        $apache =~ s|/|\\|g;        next;    }    elsif ($arg =~ m|--with-ssl(?:eay)?=(\S+)|) {        $ssl = $1;        $ssl =~ s|/|\\|g;        next;    }    elsif ($arg =~ m|--with-patch=(\S+)|) {        $patch = $1;        $patch =~ s|/|\\|g;        next;    }    elsif ($arg eq '--help') {        $help = 1;        last;    }    elsif ($arg eq '--verbose' or $arg eq '-v') {        $verbose = 1;        last;    }    $usage = 1;    last;}$usage = 1 if ($#ARGV == -1);$usage = 1 if ($apache eq '');$usage = 1 if ($ssl eq '');if ($usage) {    print STDERR "$progname: Bad argument line\n";    print STDERR "$progname: Usage: $progname [options]\n";    $help  = 1;}if ($help) {    print STDERR "Options are:\n";    print STDERR "  --with-apache=DIR  ...path to Apache 1.3.x source tree    [REQUIRED]\n";    print STDERR "  --with-ssl=DIR     ...path to OpenSSL source tree         [REQUIRED]\n";    print STDERR "  --with-patch=FILE  ...path to your vendor 'patch' program [OPTIONAL]\n";    print STDERR "  --help             ...this message                        [OPTIONAL]\n";    print STDERR "  --verbose          ...configure with verbosity            [OPTIONAL]\n";    exit(1);}##   give a friendly header#print "Configuring mod_ssl/$V_MODSSL for Apache/$V_APACHE\n";##   check for Apache 1.3#if (not -f "$apache\\src\\include\\httpd.h") {    print STDERR "$progname:Error: Cannot find Apache 1.3 source tree under $apache\n";    print STDERR "$progname:Hint:  Please specify location via --with-apache=DIR\n";    exit(1);}open(FP, "<$apache\\src\\include\\httpd.h");my $data = '';$data .= $_ while(<FP>);close(FP);my ($APV) = ($data =~ m|SERVER_BASEREVISION\s+\"(\d+\.\d+[.b]\d+).*?\"|);if ($V_APACHE ne $APV) {    print STDERR "Error: The mod_ssl/$V_MODSSL can be used for Apache/$V_APACHE only.\n";    print STDERR "Error: Your Apache source tree under $apache is version $APV.\n";    print STDERR "Hint:  Please use an extracted apache_$V_APACHE.tar.gz tarball\n";    print STDERR "Hint:  with the --with-apache option, only.\n";    exit(1);}print "$prefix Apache location: $apache (Version $APV)\n";##   check for OpenSSL#if (not ((    -f "$ssl\\include\\openssl\\ssl.h"           and -f "$ssl\\lib\\libeay32.lib"           and -f "$ssl\\lib\\ssleay32.lib"      ) or         (    -f "$ssl\\inc32\\openssl\\ssl.h"           and -f "$ssl\\out32dll\\libeay32.lib"           and -f "$ssl\\out32dll\\ssleay32.lib"      ) or         (    -f "$ssl\\inc32\\openssl\\ssl.h"           and -f "$ssl\\out32lib\\libeay32.lib"           and -f "$ssl\\out32lib\\ssleay32.lib"      ))) {    print STDERR "Error: Cannot find OpenSSL source or install tree under $ssl\n";    print STDERR "Hint:  Please specify location via --with-ssl=DIR\n";    exit(1);}print "$prefix OpenSSL location: $ssl\n"; ##   Apply patches#print "$prefix Applying packages to Apache source tree:\n";##   Applying: Extended API#print "$prefixo Extended API (EAPI)\n";open(FP, "$patch --forward --directory=$apache <pkg.eapi\\eapi.patch |") || die "$!";my $line;while (defined($line = <FP>)) {    if ($line =~ m/^\|Index:\s+(\S+).*/) {        my $f = $1;        $f =~ s|/|\\|g;        print "$prefixe patching: [FILE] $f\n" if ($verbose);    }    if ($line =~ m/saving rejects to file/) {        print STDERR "Error: Failed to apply patches to Apache source tree\n";        exit(1);    }}close(FP);print "$prefixe creating: [FILE] src\\README.EAPI\n" if ($verbose);system("copy /b pkg.eapi\\README.EAPI $apache\\src\\README.EAPI >nul:");print "$prefixe creating: [FILE] src\\ap\\ap_hook.c\n" if ($verbose);system("copy /b pkg.eapi\\ap_hook.c $apache\\src\\ap\\ap_hook.c >nul:");print "$prefixe creating: [FILE] src\\ap\\ap_ctx.c\n" if ($verbose);system("copy /b pkg.eapi\\ap_ctx.c $apache\\src\\ap\\ap_ctx.c >nul:");print "$prefixe creating: [FILE] src\\ap\\ap_mm.c\n" if ($verbose);system("copy /b pkg.eapi\\ap_mm.c $apache\\src\\ap\\ap_mm.c >nul:");print "$prefixe creating: [FILE] src\\include\\ap_hook.h\n" if ($verbose);system("copy /b pkg.eapi\\ap_hook.h $apache\\src\\include\\ap_hook.h >nul:");print "$prefixe creating: [FILE] src\\include\\ap_ctx.h\n" if ($verbose);system("copy /b pkg.eapi\\ap_ctx.h $apache\\src\\include\\ap_ctx.h >nul:");print "$prefixe creating: [FILE] src\\include\\ap_mm.h\n" if ($verbose);system("copy /b pkg.eapi\\ap_mm.h $apache\\src\\include\\ap_mm.h >nul:");##   Applying: Distribution Documents#print "$prefixo Distribution Documents\n";my $f;foreach $f ('README', 'LICENSE', 'INSTALL') {    print "$prefixe creating: [FILE] $f.SSL\n" if ($verbose);    system("copy /b $f $apache\\$f.SSL >nul:");}print "$prefixe creating: [FILE] src\\CHANGES.SSL\n" if ($verbose);system("copy /b CHANGES $apache\\src\\CHANGES.SSL >nul:");##   Applying: SSL Module Source#print "$prefixo SSL Module Source\n";open(FP, "$patch --forward --directory=$apache <pkg.sslmod\\sslmod.patch |") || die "$!";while (defined($line = <FP>)) {    if ($line =~ m/^\|Index:\s+(\S+).*/) {        my $f = $1;        $f =~ s|/|\\|g;        print "$prefixe patching: [FILE] $f\n" if ($verbose);    }}close(FP);if (not -d "$apache\\src\\modules\\ssl") {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -