cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 01/11/20 18:13:00 Modified:lib/ModPerl BuildOptions.pm Log: add missing LIBNAME option to the table Revision ChangesPath 1.12 +1 -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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- BuildOptions.pm 2001/10/20 18:59:28 1.11 +++ BuildOptions.pm 2001/11/21 02:13:00 1.12 @@ -164,3 +164,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)
cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 01/09/08 11:00:49 Modified:lib/ModPerl BuildOptions.pm Log: make sure path to APXS is absolute Submitted by: Philippe M . Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm Revision ChangesPath 1.9 +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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- BuildOptions.pm 2001/04/27 21:07:53 1.8 +++ BuildOptions.pm 2001/09/08 18:00:49 1.9 @@ -8,6 +8,8 @@ use constant VERBOSE => 1; use constant UNKNOWN_FATAL => 2; +use File::Spec; + sub init { my($self, $build) = @_; @@ -54,6 +56,11 @@ my $usage = usage(); die "Unknown Option: $key\nUsage:\n$usage"; } + +if($key eq 'MP_APXS') { +$val = File::Spec->canonpath(File::Spec->rel2abs($val)); +} + if ($self->{$key}) { $self->{$key} .= ' '; }
cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 01/04/27 14:07:54 Modified:lib/ModPerl BuildOptions.pm Log: add secret sauce Revision ChangesPath 1.8 +5 -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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- BuildOptions.pm 2001/04/04 05:41:06 1.7 +++ BuildOptions.pm 2001/04/27 21:07:53 1.8 @@ -40,6 +40,11 @@ $_ = "$continue $_" if $continue; +#example: +"MP_CCOPTS=-Werror" if $] >= 5.007 +if (s/^\+//) { +$_ = eval $_; +} + if (/^MP_/) { my($key, $val) = split $param_qr, $_, 2; $val ||= "";
cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 01/03/04 11:41:57 Modified:lib/Apache Build.pm lib/ModPerl BuildOptions.pm Log: MP_INCLUDE_DIR option to add -I include paths Revision ChangesPath 1.34 +4 -0 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.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Build.pm 2001/03/04 18:45:27 1.33 +++ Build.pm 2001/03/04 19:41:56 1.34 @@ -805,6 +805,10 @@ } push @inc, $ssl_dir if -d $ssl_dir; +if ($self->{MP_INCLUDE_DIR}) { +push @inc, split /\s+/, $self->{MP_INCLUDE_DIR}; +} + return \@inc; } 1.5 +1 -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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BuildOptions.pm 2001/03/03 23:11:01 1.4 +++ BuildOptions.pm 2001/03/04 19:41:57 1.5 @@ -146,3 +146,4 @@ DYNAMIC Build Apache::*.xs as dynamic extensions APXSPath to apxs XS_GLUE_DIR Directories containing extension glue +INCLUDE_DIR Add directories to search for header files
cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 01/01/03 21:57:40 Modified:.Makefile.PL lib/Apache Build.pm lib/ModPerl BuildOptions.pm Log: allow building with apxs Revision ChangesPath 1.24 +11 -6 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Makefile.PL 2001/01/02 20:35:41 1.23 +++ Makefile.PL 2001/01/04 05:57:39 1.24 @@ -33,12 +33,17 @@ system_sanity_check(); set_modperl_version(); -for my $path ($build->find) { -$build->dir($path); -my $mmn = $build->module_magic_number; -my $v = $build->httpd_version; -next unless $v; -last if $build->prompt_y("Configure mod_perl with $path?"); +if ($build->{MP_APXS}) { +print "Using $build->{MP_APXS}\n"; +} +else { +for my $path ($build->find) { +$build->dir($path); +my $mmn = $build->module_magic_number; +my $v = $build->httpd_version; +next unless $v; +last if $build->prompt_y("Configure mod_perl with $path?"); +} } my $httpd_version = $build->httpd_version; 1.25 +16 -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.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Build.pm 2001/01/04 04:08:20 1.24 +++ Build.pm 2001/01/04 05:57:39 1.25 @@ -740,19 +740,24 @@ return $typemaps; } -sub inc { +sub includes { my $self = shift; my $src = $self->dir; my $os = is_win32 ? 'win32' : 'unix'; -my @inc = (); +my @inc = $self->file_path("src/modules/perl"); + +my $ainc = $self->apxs('-q' => 'INCLUDEDIR'); +if (-d $ainc) { +push @inc, $ainc; +return \@inc; +} for ("$src/modules/perl", "$src/include", "$src/srclib/apr/include", "$src/srclib/apr-util/include", - "$src/os/$os", - $self->file_path("src/modules/perl")) + "$src/os/$os") { - push @inc, "-I$_" if -d $_; + push @inc, $_ if -d $_; } my $ssl_dir = "$src/../ssl/include"; @@ -760,12 +765,14 @@ my $build = $self->build_config; $ssl_dir = join '/', $self->{MP_SSL_BASE} || '', 'include'; } -push @inc, "-I$ssl_dir" if -d $ssl_dir; +push @inc, $ssl_dir if -d $ssl_dir; -my $ainc = $self->apxs('-q' => 'INCLUDEDIR'); -push @inc, "-I$ainc" if -d $ainc; +return \@inc; +} -return "@inc"; +sub inc { +my @includes = map { "-I$_" } @{ shift->includes }; +"@includes"; } sub ccflags { 1.3 +1 -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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BuildOptions.pm 2000/06/20 16:04:26 1.2 +++ BuildOptions.pm 2001/01/04 05:57:39 1.3 @@ -144,3 +144,4 @@ PROMPT_DEFAULT Accept default value for all would-be prompts OPTIONS_FILE Read options from given file DYNAMIC Build Apache::*.xs as dynamic extensions +APXSPath to apxs
cvs commit: modperl-2.0/lib/ModPerl BuildOptions.pm
dougm 00/06/08 21:30:12 Added: lib/ModPerl BuildOptions.pm Log: new module for dealing with mod_perl configuration options Revision ChangesPath 1.1 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === package ModPerl::BuildOptions; use strict; use warnings; my $param_qr = qr([\s=]+); use constant VERBOSE => 1; use constant UNKNOWN_FATAL => 2; sub init { my($self, $build) = @_; #@ARGV should override what's in .makepl_args.mod_perl2 #but @ARGV might also override the default MP_OPTS_FILE #so snag that first parse($build, [grep { /^MP_OPTIONS_FILE/ } @ARGV]); parse_file($build); parse_argv($build); if ($build->{MP_DEBUG} and $build->{MP_USE_GTOP}) { $build->{MP_USE_GTOP} = 0 unless $build->find_dlfile('gtop'); } } sub parse { my($self, $lines, $opts) = @_; $opts = VERBOSE|UNKNOWN_FATAL unless defined $opts; my $table = table(); my @unknown; my $continue = ""; for (@$lines) { #XXX: this "parser" should be more robust chomp; s/^\s+//; s/\s+$//; next if /^\#/ || /^$/; last if /^__END__/; $_ = "$continue $_" if $continue; if (/^MP_/) { my($key, $val) = split $param_qr, $_, 2; $val ||= ""; $continue = $val =~ s/\\$// ? $key : ""; if (!$table->{$key} and $opts & UNKNOWN_FATAL) { my $usage = usage(); die "Unknown Option: $key\nUsage:\n$usage"; } if ($self->{$key}) { $self->{$key} .= ' '; } $self->{$key} .= $val; print " $key = $val\n" if $opts & VERBOSE; } else { push @unknown, $_; } } return \@unknown; } sub parse_file { my $self = shift; my $fh; my @files = map { $_ . 'makepl_args.mod_perl2' } qw(./ ../ ./. ../.), "$ENV{HOME}/."; unshift @files, $self->{MP_OPTIONS_FILE} if $self->{MP_OPTIONS_FILE}; for my $file (@files) { if (open $fh, $file) { $self->{MP_OPTIONS_FILE} = $file; last; } $fh = undef; } return unless $fh; print "Reading Makefile.PL args from $self->{MP_OPTIONS_FILE}\n"; my $unknowns = parse($self, [<$fh>]); push @ARGV, @$unknowns if $unknowns; close $fh; } sub parse_argv { my $self = shift; return unless @ARGV; my @args = @ARGV; @ARGV = (); print "Reading Makefile.PL args from \@ARGV\n"; my $unknowns = parse($self, \@args); push @ARGV, @$unknowns if $unknowns; } sub usage { my $table = table(); my @opts = map { "$_ - $table->{$_}" } sort keys %$table; join "\n", @opts; } sub parse_table { my($fh) = @_; my %table; local $_; while (<$fh>) { chomp; s/^\s+//; s/\s+$//; next if /^\#/ || /^$/; last if /^__END__/; my($key, $val) = split /\s+/, $_, 2; $table{'MP_' . $key} = $val; } return \%table; } my $Table; sub table { $Table ||= parse_table(\*DATA); } 1; __DATA__ USE_GTOP Link with libgtop and enable libgtop reporting DEBUG Turning on debugging (-g -Wall -lperld) and tracing CCOPTSAdd to compiler flags TRACE Turn on tracing USE_DSO Build mod_perl as a dso INST_APACHE2 Install *.pm relative to Apache2/ directory PROMPT_DEFAULTAccept default value for all would-be prompts OPTIONS_FILE Read options from given file DYNAMIC Build Apache::*.xs as dynamic extensions