cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm

2003-02-20 Thread randyk
randyk  2003/02/19 21:19:14

  Modified:lib/ModPerl BuildOptions.pm
  Log:
  Reviewed by: stas
  
  Revision  ChangesPath
  1.17  +7 -0  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BuildOptions.pm   21 May 2002 16:48:29 -  1.16
  +++ BuildOptions.pm   20 Feb 2003 05:19:14 -  1.17
  @@ -3,6 +3,7 @@
   use strict;
   use warnings;
   
  +use Apache::Build ();
   my $param_qr = qr([\s=]+);
   
   use constant VERBOSE => 1;
  @@ -66,6 +67,12 @@
   if($key eq 'MP_APXS') {
   $val = File::Spec->canonpath(File::Spec->rel2abs($val));
   }
  +
  + # MP_AP_PREFIX may not contain spaces
  + if ($key eq 'MP_AP_PREFIX' && Apache::Build::WIN32()) {
  +require Win32;
  + $val = Win32::GetShortPathName($val);
  + }
   
   if ($self->{$key}) {
   $self->{$key} .= ' ';
  
  
  



cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm

2002-05-21 Thread dougm

dougm   02/05/21 09:48:29

  Modified:lib/Apache Build.pm
   lib/ModPerl BuildOptions.pm
  Log:
  allow MP_AP_PREFIX to be a source tree directory
  
  Revision  ChangesPath
  1.87  +10 -9 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Build.pm  21 May 2002 16:19:51 -  1.86
  +++ Build.pm  21 May 2002 16:48:29 -  1.87
  @@ -65,10 +65,6 @@
   return "include/ directory not found in $prefix";
   }
   
  -if (-e "$prefix/CHANGES") {
  -return "$prefix is a build directory (need an install directory)";
  -}
  -
   return '';
   }
   
  @@ -556,7 +552,7 @@
   
   return $self->{dir} if $self->{dir};
   
  -if(IS_MOD_PERL_BUILD) {
  +if (IS_MOD_PERL_BUILD) {
   my $build = $self->build_config;
   
   if ($dir = $build->{'dir'}) {
  @@ -566,6 +562,8 @@
   }
   }
   
  +$dir ||= $self->{MP_AP_PREFIX};
  +
   # we not longer install Apache headers, so dont bother looking in @INC
   # might end up finding 1.x headers anyhow
   #unless ($dir and -d $dir) {
  @@ -1051,10 +1049,13 @@
   
   push @inc, $self->mp_include_dir;
   
  -my $ainc = $self->apxs('-q' => 'INCLUDEDIR');
  -if (-d $ainc) {
  -push @inc, $ainc;
  -return \@inc;
  +my $prefix = $self->{MP_AP_PREFIX};
  +if (-d $prefix and not -e "$prefix/CHANGES") {
  +my $ainc = $self->apxs('-q' => 'INCLUDEDIR');
  +if (-d $ainc) {
  +push @inc, $ainc;
  +return \@inc;
  +}
   }
   
   for ("$src/modules/perl", "$src/include",
  
  
  
  1.16  +1 -1  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- BuildOptions.pm   21 May 2002 16:19:51 -  1.15
  +++ BuildOptions.pm   21 May 2002 16:48:29 -  1.16
  @@ -164,7 +164,7 @@
   OPTIONS_FILE Read options from given file
   STATIC_EXTS  Build Apache::*.xs as static extensions
   APXSPath to apxs
  -AP_PREFIXApache installation prefix
  +AP_PREFIXApache installation or source tree prefix
   XS_GLUE_DIR Directories containing extension glue
   INCLUDE_DIR Add directories to search for header files
   GENERATE_XS Generate XS code based on httpd version
  
  
  



cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm

2002-05-21 Thread dougm

dougm   02/05/21 09:19:51

  Modified:.Makefile.PL
   lib/Apache Build.pm
   lib/ModPerl BuildOptions.pm
  Log:
  enable both MP_USE_{DSO,STATIC} by default, specifying one turns off the other.
  
  Revision  ChangesPath
  1.81  +7 -5  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- Makefile.PL   19 May 2002 19:46:08 -  1.80
  +++ Makefile.PL   21 May 2002 16:19:51 -  1.81
  @@ -203,13 +203,15 @@
   
   $code->generate($build);
   
  -warning sprintf "mod_perl will be built %s as %s",
  -  $build->is_dynamic ? "shared" : "static",
  -$build->{"MODPERL_LIB"};
  +for my $type (qw(DSO STATIC)) {
  +next unless $build->{"MP_USE_$type"};
  +warning "mod_perl \L$type\E library will be built as ".
  +  $build->{"MODPERL_LIB_$type"};
  +}
   
   if ($build->is_dynamic) {
   warning "You'll need to add the following to httpd.conf:",
  -" LoadModule perl_module modules/$build->{MODPERL_LIB}\n";
  +" LoadModule perl_module modules/$build->{MODPERL_LIB_DSO}\n";
   }
   
   if ($build->{MP_INST_APACHE2}) {
  @@ -337,7 +339,7 @@
   sub os_check_hpux {
   my $ccflags = $build->perl_config('ccflags');
   
  -if ($build->{MP_USE_DSO} and $Config{ld} eq 'ld') {
  +if ($build->is_dynamic and $Config{ld} eq 'ld') {
   unless ($ccflags =~ /\+z/i) {
   $build->phat_warn(<{MP_USE_DSO} || $self->{MP_USE_APXS};
  -}
  +sub is_dynamic { shift->{MP_USE_DSO} }
   
   sub default_dir {
   my $build = shift->build_config;
  @@ -909,13 +906,17 @@
   print $fh $self->canon_make_attr('libname', $self->{MP_LIBNAME});
   print $fh $self->canon_make_attr('dlext', 'so'); #always use .so
   
  -print $fh $self->canon_make_attr('lib_shared',
  -   "$self->{MP_LIBNAME}.$self->{MODPERL_DLEXT}");
  -
  -print $fh $self->canon_make_attr('lib_static',
  -   "$self->{MP_LIBNAME}$self->{MODPERL_LIB_EXT}");
  +my %libs = (
  +dso=> "$self->{MP_LIBNAME}.$self->{MODPERL_DLEXT}",
  +static => "$self->{MP_LIBNAME}$self->{MODPERL_LIB_EXT}",
  +);
   
  +#XXX short-term compat for Apache::TestConfigPerl
  +$libs{shared} = $libs{dso};
   
  +while (my($type, $lib) = each %libs) {
  +print $fh $self->canon_make_attr("lib_$type", $libs{$type});
  +}
   
   print $fh $self->canon_make_attr('libperl',
join '/',
  @@ -931,9 +932,12 @@
   print $fh $self->canon_make_attr($method, @{ $code->$method() });
   }
   
  -print $fh $self->canon_make_attr('lib', $self->is_dynamic ?
  - $self->{MODPERL_LIB_SHARED} :
  - $self->{MODPERL_LIB_STATIC});
  +my @libs;
  +for my $type (map { uc } keys %libs) {
  +push @libs, $self->{"MODPERL_LIB_$type"} if $self->{"MP_USE_$type"};
  +}
  +
  +print $fh $self->canon_make_attr('lib', "@libs");
   
   for my $q (qw(LIBEXECDIR)) {
   print $fh $self->canon_make_attr("AP_$q",
  @@ -956,8 +960,8 @@
   lib: $(MODPERL_LIB)
   
   install:
  - $(MODPERL_TEST_F) $(MODPERL_LIB_SHARED) && \
  - $(MODPERL_CP) $(MODPERL_LIB_SHARED) $(MODPERL_AP_LIBEXECDIR)
  + $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
  + $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
   
   .SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s
   
  
  
  
  1.15  +4 -1  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- BuildOptions.pm   6 Apr 2002 16:24:51 -   1.14
  +++ BuildOptions.pm   21 May 2002 16:19:51 -  1.15
  @@ -24,7 +24,10 @@
   $build->{MP_USE_GTOP} = 0 unless $build->find_dlfile('gtop');
   }
   
  -$build->{MP_USE_DSO} = 1 unless $build->{MP_USE_STATIC};
  +unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
  +$build->{MP_USE_DSO} = $build->{MP_USE_STATIC} = 1;
  +}
  +
   $build->{MP_GENERATE_XS} = 1 unless exists $build->{MP_GENERATE_XS};
   }
   
  
  
  



cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm

2002-04-06 Thread dougm

dougm   02/04/06 08:24:51

  Modified:.Makefile.PL
   lib/Apache Build.pm
   lib/ModPerl BuildOptions.pm
  Log:
  a few s/libmodperl/mod_perl/
  
  Revision  ChangesPath
  1.68  +2 -2  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- Makefile.PL   6 Apr 2002 16:15:18 -   1.67
  +++ Makefile.PL   6 Apr 2002 16:24:51 -   1.68
  @@ -103,8 +103,8 @@
   }
   
   if (Apache::Build::is_win32()) {
  -#Makefile.PL's in WrapXS/ just need to pass the -e libmodperl.lib test
  -#the real libmodperl.lib will be in place when WrapXS/ dll's are
  +#Makefile.PL's in WrapXS/ just need to pass the -e mod_perl.lib test
  +#the real mod_perl.lib will be in place when WrapXS/ dll's are
   #actually linked
   my $lib = "src/modules/perl/$build->{MP_LIBNAME}.lib";
   unless (-e $lib) {
  
  
  
  1.78  +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- Build.pm  6 Apr 2002 14:56:46 -   1.77
  +++ Build.pm  6 Apr 2002 16:24:51 -   1.78
  @@ -809,7 +809,7 @@
   
   sub modperl_libs_MSWin32 {
   my $self = shift;
  -#XXX: install/use libmodperl.lib for 3rd party xs modules
  +#XXX: install/use mod_perl.lib for 3rd party xs modules
   "$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.lib";
   }
   
  
  
  
  1.14  +1 -1  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- BuildOptions.pm   15 Dec 2001 23:45:05 -  1.13
  +++ BuildOptions.pm   6 Apr 2002 16:24:51 -   1.14
  @@ -165,4 +165,4 @@
   XS_GLUE_DIR Directories containing extension glue
   INCLUDE_DIR Add directories to search for header files
   GENERATE_XS Generate XS code based on httpd version
  -LIBNAME Name of the modperl dso library (default is libmodperl)
  +LIBNAME Name of the modperl dso library (default is mod_perl)