perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl/src/modules/perl Makefile
Date Sat, 23 Dec 2000 02:23:10 GMT
dougm       00/12/22 18:23:10

  Modified:    .        Changes Makefile.PL
               apaci    mod_perl.config.sh
               lib/Apache ExtUtils.pm
               src/modules/perl Makefile
  Log:
  if Perl is linked with -lpthread, then httpd needs to be linked with
  -lpthread, make sure that happens with USE_DSO=1, warn if USE_APXS=1
  
  disable uselargefile flags by default, enable with:
   Makefile.PL PERL_USELARGEFILES=1
  
  Revision  Changes    Path
  1.564     +6 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.563
  retrieving revision 1.564
  diff -u -r1.563 -r1.564
  --- Changes	2000/12/23 00:04:36	1.563
  +++ Changes	2000/12/23 02:23:07	1.564
  @@ -10,6 +10,12 @@
   
   =item 1.24_02-dev
   
  +if Perl is linked with -lpthread, then httpd needs to be linked with
  +-lpthread, make sure that happens with USE_DSO=1, warn if USE_APXS=1
  +
  +disable uselargefile flags by default, enable with:
  + Makefile.PL PERL_USELARGEFILES=1
  +
   adjust test output (modules/{cgi,constants}) to make 5.7.0-dev
   Test::Harness happy
   
  
  
  
  1.174     +35 -10    modperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl/Makefile.PL,v
  retrieving revision 1.173
  retrieving revision 1.174
  diff -u -r1.173 -r1.174
  --- Makefile.PL	2000/12/21 20:00:09	1.173
  +++ Makefile.PL	2000/12/23 02:23:08	1.174
  @@ -41,6 +41,7 @@
   
   my $Is_dougm = (defined($ENV{USER}) && ($ENV{USER} eq "dougm"));
   my $USE_THREADS;
  +my $thrlib = join '|', qw(-lpthread);
   
   if ($] < 5.005_60) {
       $USE_THREADS = (defined($Config{usethreads}) && 
  @@ -94,6 +95,7 @@
       $Apache::MyConfig::Setup{Apache_Src} ; 
   
   my $PWD = cwd;
  +$ENV{PERL5LIB} = "$PWD/lib";
   
   my %SSL = (
       "modules/ssl/apache_ssl.c" => "Ben-SSL",
  @@ -188,7 +190,9 @@
   $PERL_DEBUG = "";
   $PERL_DESTRUCT_LEVEL = "";
   $PERL_STATIC_EXTS = "";
  -$PERL_EXTRA_CFLAGS = $] >= 5.006 ? $Config{ccflags} : "";
  +$PERL_USELARGEFILES = 0;
  +$PERL_EXTRA_CFLAGS = "";
  +$PERL_EXTRA_LIBS = "";
   $SSLCacheServerPort = 8539;
   $SSL_BASE = ""; 
   $Port = $ENV{HTTP_PORT} || 8529;
  @@ -359,6 +363,10 @@
       $PERL_EXTRA_CFLAGS .= " -DPERL_SAFE_STARTUP=1";
   }
   
  +if ($PERL_USELARGEFILES and $] >= 5.006) {
  +    $PERL_EXTRA_CFLAGS .= " $Config{ccflags}";
  +}
  +
   for (keys %PassEnv) {
       $ENV{$_} = $$_ if $$_;
   }
  @@ -975,10 +983,18 @@
   	    $cmd .= qq(CFLAGS="$PERL_EXTRA_CFLAGS" );
   	}    
   	
  -	if ($USE_DSO) {		# override apache's notion of this flag
  -	  $cmd .= qq(LDFLAGS_SHLIB_EXPORT="$Config{ccdlflags}" );
  +	if ($USE_DSO) {
  +            # override apache's notion of this flag
  +            $cmd .= qq(LDFLAGS_SHLIB_EXPORT="$Config{ccdlflags}" );
  +
  +            #if Perl is linked with -lpthread, httpd needs tobe too
  +            if ($Config{libs} =~ /($thrlib)/) {
  +                $PERL_EXTRA_LIBS .= " $1";
  +            }
   	}
  -
  +        if ($PERL_EXTRA_LIBS) {
  +            $cmd .= qq(LIBS="$PERL_EXTRA_LIBS" );
  +        }
   	$cmd .= "./configure " .
   		  "--activate-module=src/modules/perl/libperl.a";
      
  @@ -1220,6 +1236,7 @@
   	HTTPD => $TARGET,
   	PORT => $PORT,
   	PWD => $PWD,
  +        PERL5LIB => "PERL5LIB=$ENV{PERL5LIB}",
   	SHRPENV => $Config{shrpenv},
   	CVSROOT => 'perl.apache.org:/home/cvs',
       },
  @@ -1338,16 +1355,16 @@
   	(cd ./apaci && $(MAKE) distclean)
   
   apxs_libperl:
  -	(cd ./apaci && $(MAKE))
  +	(cd ./apaci && $(PERL5LIB) $(MAKE))
   
   apxs_install: apxs_libperl
   	(cd ./apaci && $(MAKE) install;)
   
   apache_httpd: $(APACHE_SRC)/Makefile.tmpl
  -	(cd $(APACHE_SRC) && $(SHRPENV) $(MAKE) CC="$(CC)";)
  +	(cd $(APACHE_SRC) && $(PERL5LIB) $(SHRPENV) $(MAKE) CC="$(CC)";)
   
   apaci_httpd: 
  -	(cd $(APACHE_ROOT) && $(MAKE))
  +	(cd $(APACHE_ROOT) && $(PERL5LIB) $(MAKE))
   
   apaci_install: 
   	(cd $(APACHE_ROOT) && $(MAKE) install)
  @@ -1961,6 +1978,7 @@
      'Apache_Src' => \'$APACHE_SRC\',
      'SSL_BASE' => \'$SSL_BASE\',
      'APXS' => \'$WITH_APXS\',
  +   'PERL_USELARGEFILES' => \'$PERL_USELARGEFILES\',
   EOT
   
     foreach my $key (sort @callback_hooks) {
  @@ -2125,8 +2143,7 @@
   
   sub ccopts {
       unless ($Embed::ccopts) {
  -	$Embed::ccopts = `$^X -MExtUtils::Embed -e ccopts`;
  -
  +        $Embed::ccopts = "$Config{ccflags} -I$Config{archlibexp}/CORE";
   	if($USE_THREADS) {
   	    $Embed::ccopts .= " -DPERL_THREADS";
   	}
  @@ -2277,6 +2294,12 @@
       uselargefiles_check();
       dynaloader_check();
   
  +    if ($USE_APXS and $Config{libs} =~ /($thrlib)/) {
  +        my $lib = $1;
  +        phat_warn(<<EOF);
  +Your Perl is linked with $lib, make sure that your httpd is built with LIBS=$lib
  +EOF
  +    }
   }
   
   sub gdbm_check {
  @@ -2308,13 +2331,15 @@
   }
   
   sub uselargefiles_check {
  -    return unless $] >= 5.006 and $Config{uselargefiles} and $USE_APXS;
  +    return unless $] >= 5.006 and $Config{uselargefiles}
  +      and $PERL_USELARGEFILES and $USE_APXS;
       local $Apache::src::APXS = $WITH_APXS;
       my $cflags = Apache::src->new->apxs('-q' => 'CFLAGS') || '';
       return if $cflags =~ /LARGEFILE/;
   
       phat_warn(<<EOF);
   Your Perl is uselargefiles enabled, but Apache is not, suggestions:
  +    *) Rebuild mod_perl with Makefile.PL PERL_USELARGEFILES=0
       *) Rebuild Apache with CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
       *) Rebuild Perl with Configure -Uuselargefiles
       *) Let mod_perl build Apache (USE_DSO=1 instead of USE_APXS=1)
  
  
  
  1.21      +2 -2      modperl/apaci/mod_perl.config.sh
  
  Index: mod_perl.config.sh
  ===================================================================
  RCS file: /home/cvs/modperl/apaci/mod_perl.config.sh,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_perl.config.sh	2000/12/20 07:10:24	1.20
  +++ mod_perl.config.sh	2000/12/23 02:23:09	1.21
  @@ -107,8 +107,8 @@
   #   determine build tools and flags  
   #
   
  -#config_pm='-MApache::ExtUtils=%Config'
  -config_pm='-MConfig'
  +config_pm='-MApache::ExtUtils=%Config'
  +#config_pm='-MConfig'
   perl_cc="`$perl_interp $config_pm -e 'print $Config{cc}'`"
   perl_ccflags="`$perl_interp $config_pm -e 'print $Config{ccflags}'`"
   perl_optimize="`$perl_interp $config_pm -e 'print $Config{optimize}'`"
  
  
  
  1.21      +6 -0      modperl/lib/Apache/ExtUtils.pm
  
  Index: ExtUtils.pm
  ===================================================================
  RCS file: /home/cvs/modperl/lib/Apache/ExtUtils.pm,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ExtUtils.pm	2000/06/01 21:17:45	1.20
  +++ ExtUtils.pm	2000/12/23 02:23:09	1.21
  @@ -33,8 +33,14 @@
   *ccopts = \&ExtUtils::Embed::ccopts;
   
   sub Config_pm_fixup {
  +    eval { require Apache::MyConfig; };
       my %config_fixups = (
          ccdlflags => sub { s/-R\s+/-R/; },
  +       ccflags => sub {
  +           unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES}) {
  +               s/-D_LARGEFILE_SOURCE\s+-D_FILE_OFFSET_BITS=\d+//;
  +           }
  +       },
       );
   
       while (my($key, $sub) = each %config_fixups) {
  
  
  
  1.12      +4 -2      modperl/src/modules/perl/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Makefile,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile	2000/09/01 05:10:14	1.11
  +++ Makefile	2000/12/23 02:23:09	1.12
  @@ -50,7 +50,7 @@
   # 
   # Makefile for the Apache mod_perl library
   # 
  -# $Id: Makefile,v 1.11 2000/09/01 05:10:14 dougm Exp $
  +# $Id: Makefile,v 1.12 2000/12/23 02:23:09 dougm Exp $
   #
   
   #__ORIGINAL__
  @@ -104,7 +104,9 @@
   PERL_STATIC_EXTS =
   PERL5LIB=`$(PERL) -MConfig -e 'print $$Config{privlibexp}'`
   EXTUTILS_EMBED = $(PERL) -MExtUtils::Embed
  -PERL_CFG_CCFLAGS = `$(PERL) -MConfig -e 'print $$Config{ccflags}'`
  +#CONFIG_PM=-MConfig
  +CONFIG_PM='-MApache::ExtUtils=%Config'
  +PERL_CFG_CCFLAGS = `$(PERL) $(CONFIG_PM) -e 'print $$Config{ccflags}'`
   PERL_CFG_ARCHLIB = `$(PERL) -MConfig -e 'print $$Config{archlibexp}'`
   
   PERL_CCFLAGS = -I$(PERL_CFG_ARCHLIB)/CORE $(PERL_CFG_CCFLAGS) $(PERL_HOOKS) $(TRACE)
  
  
  

Mime
View raw message