在 Windows 64 上安装 apxs

在 Windows 64 上安装 apxs

我正在尝试将运行在 Windows 7 上的本地主机 apache2.2 设置为 Flash 流媒体服务器。到目前为止,我发现我需要安装 mod_flv,这意味着我需要 apxs。

我从以下网址找到了适用于 win32 的 apxs在 Windows 上构建 Apache 模块,但当我尝试运行配置工具它在不存在的 /lib 文件夹而不是 /bin 中查找 libhttpd.dll

在 util.pl 第 27 行第 2 行,C:\Program Files (x86)\Apache Software Foundation\Apache2.2/lib 下未找到 libhttpd 库。

我是否需要针对 win64 做一些不同的事情,或者我可以对 util.pl 文件进行一些更改(如下)

use File::Spec::Functions;

sub usage {
    my $script = shift;
    print <<"END";

 Usage: perl $script [--with-apache2=C:\Path\to\Apache2]
        perl $script [--with-apache-prog=httpd.exe]
        perl $script --help

Options:

  --with-apache2=C:\Path\to\Apache2 : specify the top-level Apache2 directory
  --with-apache-prog=Apache.exe     : specify the Apache2 program name
  --help                            : print this help message

With no options specified, an attempt will be made to find a suitable 
Apache2 directory with a program name of "Apache.exe".

END
    exit;
}

sub check_httpd {
  my ($apache, $progname) = @_;

  die qq{No libhttpd library found under $apache/lib}
    unless -e qq{$apache/lib/libhttpd.lib};

  die qq{No httpd header found under $apache/include}
    unless -e qq{$apache/include/httpd.h};

  my $vers = qx{"$apache/bin/$progname" -v};
  die qq{"$apache" does not appear to be version 2}
    unless $vers =~ m!Apache/2!;

  return 1;
}

sub check_apr {
  (my $prefix) = @_;
  my ($dir);

  my $lib = catdir $prefix, 'lib';
  opendir($dir, $lib) or die qq{Cannot opendir $lib: $!};
  my @libs = grep /^libapr\b\S+lib$/, readdir $dir;
  closedir $dir;
  die qq{Unable to find apr lib beneath $lib} unless (scalar @libs > 0);

  die qq{No apr.h header found under $prefix/include}
    unless -e qq{$prefix/include/apr.h};

  my $bin = catdir $prefix, 'bin';
  opendir($dir, $bin) or die qq{Cannot opendir $bin: $!};
  my @bins = grep /^libapr\b\S+dll$/, readdir $dir;
  closedir $dir;
  die qq{Unable to find apr dll beneath $bin} unless (scalar @bins > 0);

  return 1;
}

sub check_apu {
  (my $prefix) = @_;
  my ($dir);

  my $lib = catdir $prefix, 'lib';
  opendir($dir, $lib) or die qq{Cannot opendir $lib: $!};
  my @libs = grep /^libaprutil\b\S+lib$/, readdir $dir;
  closedir $dir;
  die qq{Unable to find aprutil lib beneath $lib} unless (scalar @libs > 0);

  die qq{No apu.h header found under $prefix/include}
    unless -e qq{$prefix/include/apu.h};

  my $bin = catdir $prefix, 'bin';
  opendir($dir, $bin) or die qq{Cannot opendir $bin: $!};
  my @bins = grep /^libaprutil\b\S+dll$/, readdir $dir;
  closedir $dir;
  die qq{Unable to find aprutil dll beneath $bin} unless (scalar @bins > 0);

  return 1;
}

1;

相关内容