Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 91342 invoked from network); 14 Mar 2005 07:59:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Mar 2005 07:59:41 -0000 Received: (qmail 27111 invoked by uid 500); 14 Mar 2005 07:59:39 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 27087 invoked by uid 500); 14 Mar 2005 07:59:38 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 27017 invoked by uid 99); 14 Mar 2005 07:59:38 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=FORGED_RCVD_HELO,INFO_TLD X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from c10.shuttle.de (HELO saturn.ecos.de) (194.95.226.10) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 13 Mar 2005 23:59:34 -0800 Received: from lnx1.i.ecos.de (unknown [194.95.226.11]) by saturn.ecos.de (Postfix) with ESMTP id 1217AD88FA; Mon, 14 Mar 2005 08:59:27 +0100 (MET) Received: from wingr2 (unknown [10.11.12.250]) by lnx1.i.ecos.de (Postfix) with ESMTP id EF0C6FFE53; Mon, 14 Mar 2005 08:59:26 +0100 (CET) From: "Gerald Richter" To: "'Gavin Carr'" Cc: Subject: RE: Embperl2 on RHEL Date: Mon, 14 Mar 2005 08:59:20 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0040_01C52874.1C4B9540" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcUoFyWXMQHIduLJQsWqVkX95SxVrAAVHyYQ In-Reply-To: <20050313215243.GA9973@openfusion.com.au> Message-Id: <20050314075926.EF0C6FFE53@lnx1.i.ecos.de> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0040_01C52874.1C4B9540 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Could you try if the attached Makefile.PL solves your problem? Gerald -------------------------------------------------------------------------= -- Gerald Richter ecos electronic communication services gmbh IT-Securityl=F6sungen * Webapplikationen mit = Apache/Perl/mod_perl/Embperl Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: richter@ecos.de Voice: +49 6133 939-122 WWW: http://www.ecos.de/ Fax: +49 6133 939-333 -------------------------------------------------------------------------= -- ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info CeBIT 2005: Sie finden uns in Halle 7 Stand C22/8 (CEFIS-Area) -------------------------------------------------------------------------= -- =20 > -----Original Message----- > From: Gavin Carr [mailto:gavin@openfusion.com.au]=20 > Sent: Sunday, March 13, 2005 10:53 PM > To: Gerald Richter > Cc: embperl@perl.apache.org > Subject: Re: Embperl2 on RHEL >=20 > On Sun, Mar 13, 2005 at 02:48:05PM +0100, Gerald Richter wrote: > > > Embperl2 seems to have compilation problems on RedHat Enterprise=20 > > > Linux 3 and 4 because RedHat have split the APR libraries into=20 > > > separate packages from the httpd apache packages.=20 > Specifically, all=20 > > > the apr include headers are found in /usr/include/apr-0=20 > rather than=20 > > > being included in /usr/include/httpd. > >=20 > > Could you please run the attached Makefile.PL and send me=20 > the output,=20 > > then I should be able to add some autodetection >=20 > Output is attached. >=20 > I was wrong about RHEL3 too - this only affects RHEL4 boxes,=20 > by the looks. >=20 > > > - is there a nice way of forcing this additional include=20 > directory=20 > > > at build > > > time using the current code? > >=20 > > You have to edit Makefile, after running Makefile.PL >=20 > Presumably multiple Makefiles, though, right - you produce 12=20 > or so from your Makefile.PL. > I was hoping there might be support for: >=20 > perl Makefile.PL INC=3D-I/usr/include/apr-0 >=20 > or something like that.=20 >=20 > Cheers, > Gavin >=20 >=20 ------=_NextPart_000_0040_01C52874.1C4B9540 Content-Type: application/octet-stream; name="Makefile.PL" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Makefile.PL" #=0A= # Building Makefile for Embperl=0A= #=0A= # (C) 1997-2004 G.Richter (richter@dev.ecos.de) / ECOS=0A= #=0A= # $Id: Makefile.PL,v 1.75 2005/01/15 20:17:26 richter Exp $=0A= #=0A= =0A= =0A= use ExtUtils::MakeMaker;=0A= use Cwd qw {abs_path cwd} ;=0A= use Config ;=0A= use File::Basename ;=0A= use Data::Dumper ;=0A= =0A= $win32 =3D ($Config{osname} =3D~ /win32/i) ;=0A= $aix =3D ($Config{osname} =3D~ /aix/i);=0A= $dynlib =3D {};=0A= print "\nRunning on Win 32\n" if ($win32) ;=0A= =0A= $EP2 =3D -f "epcmd2.c" ; =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= =0A= %neededmodules =3D=0A= ( =0A= 'mod_perl.c' =3D> { name =3D> 'perl_module', =0A= path =3D> ['$apache_src/modules/perl/libperl.so', = '$EPBINDIR/modules/libperl.so', '$apache_src/mod_perl.so', = '$apache_src/modules/mod_perl.so'],=0A= win32path =3D> ['$mpdll', '$mpdll/apachemoduleperl.dll', = '$mpdll/mod_perl.so', '$EPBINDIR/modules/apachemoduleperl.dll', = '$EPBINDIR/modules/mod_perl.so'],=0A= file =3D> ['libperl.so', 'apachemoduleperl.dll', 'mod_perl.so'],=0A= filetext =3D> 'libperl.so or mod_perl.so',=0A= win32filetext =3D> 'ApacheModulePerl.dll or mod_perl.so',=0A= },=0A= 'mod_dir.c' =3D> { name =3D> 'dir_module', =0A= path =3D> ['$apache_src/modules/standard/mod_dir.so', = '$EPBINDIR/modules/mod_dir.so', '$apache_src/mod_dir.so'],=0A= win32path =3D> ['$apache_src/modules/standard/apachemoduledir.dll', = '$EPBINDIR/modules/apachemoduledir.dll', '$EPBINDIR/modules/mod_dir.so'],=0A= file =3D> ['mod_dir.so', 'apachemoduledir.dll'],=0A= win32filetext =3D> 'ApacheModuleDir.dll or mod_dir.so',=0A= },=0A= =0A= 'mod_env.c' =3D> { name =3D> 'env_module', =0A= path =3D> ['$apache_src/modules/standard/mod_env.so', = '$EPBINDIR/modules/mod_env.so', '$apache_src/mod_env.so'],=0A= win32path =3D> ['$apache_src/modules/standard/apachemoduleenv.dll', = '$EPBINDIR/modules/apachemoduleenv.dll', '$EPBINDIR/modules/mod_env.so'],=0A= file =3D> ['mod_env.so', 'apachemoduleenv.dll'],=0A= win32filetext =3D> 'ApacheModuleEnv.dll or mod_env.so',=0A= },=0A= =0A= 'mod_mime.c' =3D> { name =3D> 'mime_module', =0A= path =3D> ['$apache_src/modules/standard/mod_mime.so', = '$EPBINDIR/modules/mod_mime.so', '$apache_src/mod_mime.so'],=0A= win32path =3D> = ['$apache_src/modules/standard/apachemodulemime.dll', = '$EPBINDIR/modules/apachemodulemime.dll', = '$EPBINDIR/modules/mod_mime.so'],=0A= file =3D> ['mod_mime.so', 'apachemodulemime.dll'],=0A= win32filetext =3D> 'ApacheModuleMime.dll or mod_mime.so',=0A= },=0A= =0A= 'mod_alias.c' =3D> { name =3D> 'alias_module', =0A= path =3D> ['$apache_src/modules/standard/mod_alias.so', = '$EPBINDIR/modules/mod_alias.so', '$apache_src/mod_alias.so'],=0A= win32path =3D> = ['$apache_src/modules/standard/apachemodulealias.dll', = '$EPBINDIR/modules/apachemodulealias.dll', = '$EPBINDIR/modules/mod_alias.so'],=0A= file =3D> ['mod_alias.so', 'apachemodulealias.dll'],=0A= win32filetext =3D> 'ApacheModuleAlias.dll or mod_alias.so',=0A= },=0A= =0A= 'mod_cgi.c' =3D> { name =3D> 'cgi_module', =0A= path =3D> ['$apache_src/modules/standard/mod_cgi.so', = '$EPBINDIR/modules/mod_cgi.so', '$apache_src/mod_cgi.so'],=0A= win32path =3D> ['$apache_src/modules/standard/apachemodulecgi.dll', = '$EPBINDIR/modules/apachemodulecgi.dll', '$EPBINDIR/modules/mod_cgi.so'],=0A= file =3D> ['mod_cgi.so', 'apachemodulecgi.dll'],=0A= win32filetext =3D> 'ApacheModuleCgi.dll or mod_cgi.so',=0A= },=0A= =0A= 'mod_actions.c' =3D> { =0A= name =3D> 'action_module', =0A= name2 =3D> 'actions_module', =0A= path =3D> ['$apache_src/modules/standard/mod_actions.so', = '$EPBINDIR/modules/mod_actions.so', '$apache_src/mod_actions.so'],=0A= win32path =3D> = ['$apache_src/modules/standard/apachemoduleactions.dll', = '$EPBINDIR/modules/apachemoduleactions.dll', = '$EPBINDIR/modules/mod_actions.so'],=0A= file =3D> ['mod_actions.so','apachemoduleactions.dll'],=0A= win32filetext =3D> 'ApacheModuleActions.dll or mod_actions.so',=0A= },=0A= =0A= =0A= ) ;=0A= =0A= =0A= =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= sub MY::test_via_harness =0A= {=0A= my ($txt) =3D shift -> MM::test_via_harness (@_) ;=0A= $txt =3D~ s/PERL_DL_NONLAZY=3D1/PERL_DL_NONLAZY=3D0/ ;=0A= if ($win32)=0A= {=0A= if (!($txt =3D~ s/\$\(FULLPERL\)/SET = PATH=3D\$\(PATH\)\;$EPENVPATH\n\t\$\(FULLPERL\)/ ))=0A= {=0A= $txt =3D~ s/\$\(FULLPERLRUN\)/SET = PATH=3D\$\(PATH\)\;$EPENVPATH\n\t\$\(FULLPERLRUN\)/ =0A= }=0A= }=0A= return $txt ;=0A= }=0A= =0A= sub MY::test_via_script =0A= {=0A= my ($txt) =3D shift -> MM::test_via_script (@_) ;=0A= $txt =3D~ s/PERL_DL_NONLAZY=3D1/PERL_DL_NONLAZY=3D0/ ;=0A= if ($win32)=0A= {=0A= if (!($txt =3D~ s/\$\(FULLPERL\)/SET = PATH=3D\$\(PATH\)\;$EPENVPATH\n\t\$\(FULLPERL\)/ ))=0A= {=0A= $txt =3D~ s/\$\(FULLPERLRUN\)/SET = PATH=3D\$\(PATH\)\;$EPENVPATH\n\t\$\(FULLPERLRUN\)/ =0A= }=0A= }=0A= $txt =3D~ s/\$\(TEST_FILE\)/\$(TEST_FILE) \$(TESTARGS)/g ;=0A= =0A= return $txt ;=0A= }=0A= =0A= =0A= sub MY::test=0A= =0A= {=0A= my ($txt) =3D shift -> MM::test (@_) ;=0A= =0A= =0A= $txt .=3D qq{=0A= =0A= testdbinit : pure_all=0A= \t\@echo set args -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) = -I\$(PERL_LIB) \$(TEST_FILE) \$(TESTARGS) > dbinitembperl=0A= =0A= testdbbreak : pure_all=0A= \t\@echo set args -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) = -I\$(PERL_LIB) \$(TEST_FILE) --dbgbreak \$(TESTARGS) > dbinitembperl=0A= \t\@echo r >> dbinitembperl=0A= =0A= =0A= testddd : testdbinit=0A= \tPERL_DL_NONLAZY=3D0 ddd -x dbinitembperl \$(FULLPERL) =0A= =0A= testgdb : testdbinit=0A= \tPERL_DL_NONLAZY=3D0 gdb -x dbinitembperl \$(FULLPERL) =0A= =0A= testdddb : testdbbreak=0A= \tPERL_DL_NONLAZY=3D0 ddd -x dbinitembperl \$(FULLPERL) =0A= =0A= testgdbb : testdbbreak=0A= \tPERL_DL_NONLAZY=3D0 gdb -x dbinitembperl \$(FULLPERL) =0A= =0A= start : pure_all=0A= \tPERL_DL_NONLAZY=3D0 \$(FULLPERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) = -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) \$(TEST_FILE) --start -m \$(TESTARGS)=0A= =0A= stop : pure_all=0A= \tPERL_DL_NONLAZY=3D0 \$(FULLPERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) = -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) \$(TEST_FILE) --kill -m \$(TESTARGS)=0A= =0A= =0A= } ;=0A= $txt =3D~ s/\tPERL_DL_NONLAZY=3D0 /\tSET = PATH=3D\$\(PATH\)\;$EPENVPATH\n\t/g if ($win32) ;=0A= =0A= $txt =3D~ s/\@cd/\n#\t\@cd/ ; # remove tests for subdirs=0A= $txt =3D~ s/\$\(NOECHO\) cd/\n#\t\$\(NOECHO\) cd/ ; # remove = tests for subdirs=0A= =0A= $txt =3D~ s/\r\n/\n/g ; # make doesn't like \r\n!=0A= =0A= =0A= return $txt ;=0A= }=0A= =0A= =0A= =0A= sub MY::top_targets=0A= {=0A= my ($txt) =3D shift -> MM::top_targets (@_) ;=0A= =0A= $txt =3D~ s/subdirs :: .*?\n\s+\@\$\(NOOP\).*?\n//s ; # remove top = target for subdir=0A= =0A= return $txt ;=0A= }=0A= =0A= =0A= sub MY::xs_c =0A= {=0A= my ($txt) =3D shift -> MM::xs_c (@_) ;=0A= $txt =3D~ s/\&\&/\n\t/ if ($win32) ;=0A= return $txt ;=0A= }=0A= =0A= sub MY::dist_test =0A= {=0A= my $self =3D shift ;=0A= =0A= my $txt =3D $self -> MM::dist_test (@_) ;=0A= $txt =3D~ s/-I\$\(PERL_ARCHLIB\) -I\$\(PERL_LIB\)// ;=0A= $txt =3D~ s/\$\(PERL\)/\$\(PERLDT\)/ ;=0A= $txt =3D~ s/\$\(ABSPERLRUN\)/\$\(PERLDT\)/ ;=0A= =0A= $main::perlbinpath =3D $self -> {FULLPERL} ;=0A= =0A= return $txt ;=0A= }=0A= =0A= sub MY::dynamic =0A= {=0A= my $self =3D shift ;=0A= =0A= my $txt =3D $self -> MM::dynamic (@_) ;=0A= =0A= $txt .=3D "\tcd crypto && \$(MAKE) SSL_BASE=3D$sslbase\n" if = ($epc_enable) ;=0A= =0A= return $txt ;=0A= }=0A= =0A= sub MY::c_o=0A= {=0A= my $self =3D shift ;=0A= =0A= my $txt =3D $self -> MM::c_o (@_) ;=0A= my $opt =3D $win32?'Fo':'o ' ;=0A= =0A= $txt =3D~ s/\$\*/-$opt\$*\$(OBJ_EXT) \$*/g ;=0A= my @txt =3D split (/\n/, $txt) ;=0A= my $cpp =3D 0 ;=0A= foreach (@txt)=0A= {=0A= if (/\$\*\.cpp/)=0A= {=0A= s/\$\(CCCMD\)/\$(CPPCMD) \$(CPPFLAGS)/ ;=0A= }=0A= }=0A= $txt =3D join ("\n", @txt) ;=0A= =0A= return $txt ;=0A= }=0A= =0A= =0A= =0A= sub MY::cflags =0A= {=0A= my $self =3D shift ;=0A= =0A= my $txt =3D $self -> MM::cflags (@_) ;=0A= =0A= if ($mp2cfg)=0A= { # with Apache 2, make sure we have the same defines as = mod_perl=0A= $txt =3D~ s/-O\d//g if ($ccdebug =3D~ /-O\d/) ;=0A= $txt =3D~ s/CCFLAGS\s*=3D.*?\n/CCFLAGS =3D $ccdebug = $mp2cfg->{MODPERL_CCOPTS}\n/s ;=0A= }=0A= else=0A= {=0A= $txt =3D~ s/-O\d//g if ($ccdebug =3D~ /-O\d/) ;=0A= $txt =3D~ s/CCFLAGS\s*=3D/CCFLAGS =3D $ccdebug / ;=0A= }=0A= =0A= =0A= return $txt ;=0A= }=0A= =0A= $MY::cccmd_seen =3D 0 ;=0A= sub MY::const_cccmd =0A= {=0A= my $self =3D shift ;=0A= =0A= my $txt =3D $self -> MM::const_cccmd (@_) ;=0A= return $txt if ($MY::cccmd_seen++) ;=0A= =0A= my $txt2 =3D $txt ;=0A= $txt2 =3D~ s/\$\(CC\)/\$(CPP)/ ;=0A= $txt2 =3D~ s/CCCMD/CPPCMD/ ;=0A= =0A= return "$txt\n\n$txt2" ;=0A= }=0A= =0A= =0A= =0A= sub MY::post_initialize=0A= {=0A= my $self =3D shift ;=0A= =0A= # move docs to the right place=0A= =0A= my $pm =3D $self -> {PM} ;=0A= my $k ;=0A= my $v ;=0A= while (($k, $v) =3D each (%$pm))=0A= {=0A= if (($k =3D~ /\.pod$/) && !($k =3D~ /^Embperl/) )=0A= {=0A= $v =3D~ s#^(.*/)(.*?)\.pod$#$1Embperl/$2.pod# ;=0A= $pm -> {$k} =3D $v ;=0A= }=0A= }=0A= =0A= my $man =3D $self -> {MAN3PODS} ;=0A= while (($k, $v) =3D each (%$man))=0A= {=0A= if ($v !~ /Embperl/)=0A= {=0A= $v =3D~ s,/([^/]+)$,/Embperl::$1, ;=0A= $man -> {$k} =3D $v ;=0A= }=0A= }=0A= =0A= foreach my $hash (qw(MAN3PODS PM))=0A= {=0A= foreach (keys %{$self->{$hash}})=0A= {=0A= delete $self->{$hash}{$_}=0A= if /^(INSTALL|NEWS|Changes)|\.pl$/ ;=0A= }=0A= }=0A= =0A= =0A= $self -> MM::post_initialize (@_) ;=0A= }=0A= =0A= =0A= sub MY::post_constants=0A= {=0A= my $self =3D shift ;=0A= =0A= =0A= my $txt =3D $self -> MM::post_constants (@_) ;=0A= =0A= $txt .=3D "\n# Change name of dynamic lib, in case we need two of = them (with and w/o Apache support)\nINST_DYNAMIC =3D = \$(INST_ARCHAUTODIR)\\\$(DLBASE).NoApache.\$(DLEXT)\n" if = ($EPNOAPACHELIB) ;=0A= =0A= return $txt ;=0A= =0A= }=0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= sub GetString=0A= {=0A= my ($prompt, $default) =3D @_ ;=0A= =0A= printf ("%s [%s]", $prompt, $default) ;=0A= chomp ($_ =3D ) ;=0A= s/\s+$//;=0A= if (!/^\s*$/)=0A= {return $_ ;}=0A= else=0A= {=0A= if ($_ eq "")=0A= {return $default ;}=0A= else=0A= { return "" ; }=0A= =0A= }=0A= }=0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= sub GetYesNo=0A= {=0A= my ($prompt, $default) =3D @_ ;=0A= my ($value) ;=0A= =0A= do=0A= {=0A= $value =3D lc (GetString ($prompt . "(y/n)", ($default?"y":"n"))) ;=0A= }=0A= until (($value cmp "j") =3D=3D 0 || ($value cmp "y") =3D=3D 0 || = ($value cmp "n" ) =3D=3D 0) ;=0A= =0A= return ($value cmp "n") !=3D 0 ;=0A= }=0A= =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= sub search_config=0A= =0A= {=0A= my ($key, $path) =3D @_ ;=0A= =0A= =0A= open CFGFH, $path or return undef ;=0A= =0A= while ()=0A= {=0A= return $1 if (/^$key\s*(?:=3D|\s)\s*(.*?)$/) ;=0A= }=0A= =0A= close CFGFH ;=0A= return undef ;=0A= }=0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= sub cnvpath=0A= =0A= {=0A= my $path =3D shift ;=0A= =0A= $path =3D~ s/\//\\/g if ($win32) ;=0A= =0A= return $path ;=0A= }=0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= sub cnvpath2unix=0A= =0A= {=0A= my $path =3D shift ;=0A= =0A= $path =3D~ s#\\#/#g if ($win32) ;=0A= =0A= return $path ;=0A= }=0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= sub start=0A= =0A= {=0A= my ($cmd) =3D @_ ;=0A= =0A= =0A= $cmd =3D~ s/\//\\/g if ($win32) ;=0A= =0A= =0A= open STFH, "$cmd|" or die "\nCannot start $cmd\nPlease make sure you = have build Apache and mod_perl before makeing Embperl\n" ;=0A= =0A= my @x =3D or die "\nCannot start $cmd\nPlease make sure you = have build Apache and mod_perl before makeing Embperl\n" ;=0A= =0A= close STFH ;=0A= return @x ;=0A= }=0A= =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= =0A= =0A= sub start_errcode=0A= =0A= {=0A= my ($cmd) =3D @_ ;=0A= =0A= =0A= $cmd =3D~ s/\//\\/g if ($win32) ;=0A= =0A= =0A= open STFH, "$cmd|" or return 1 ;=0A= =0A= my @x =3D ;=0A= =0A= #print "@x" ;=0A= =0A= my $code =3D close STFH ;=0A= #print "Code =3D $code ; ? =3D $?\n" ;=0A= =0A= return $? ;=0A= }=0A= =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= #=0A= # Check if required modules present=0A= #=0A= =0A= =0A= sub CheckModule=0A= =0A= {=0A= my ($mod, $text) =3D @_ ;=0A= =0A= eval "require $mod" ;=0A= if ($@)=0A= {=0A= print "$mod not installed on this system\n" ;=0A= print "$text\n" ;=0A= return undef ;=0A= }=0A= else=0A= {=0A= my $ver =3D ${"$mod\:\:VERSION"} ;=0A= print "Found $mod Version $ver\n" ;=0A= return $ver ;=0A= }=0A= }=0A= =0A= =0A= =0A= ## = -------------------------------------------------------------------------= ---=0A= #=0A= # Check if known config=0A= #=0A= =0A= =0A= $apache =3D 0 ;=0A= $b =3D 0 ;=0A= =0A= $optdebug =3D '' ;=0A= $ccdebug =3D '' ;=0A= $lddebug =3D '' ;=0A= $libs =3D '' ;=0A= $d =3D '' ;=0A= =0A= if ($ARGV[0] eq 'debug')=0A= {=0A= shift @ARGV;=0A= $optdebug =3D '-g -O0 -Wall -DEPDEBUG' ;=0A= if ($win32)=0A= {=0A= $ccdebug =3D '-Zi -W3 -DEPDEBUG' ;=0A= $lddebug =3D '-debug -map -profile' ;=0A= }=0A= else=0A= {=0A= $ccdebug =3D '-g -O0 -Wall -DEPDEBUG' ;=0A= $lddebug =3D '-g' ;=0A= }=0A= }=0A= =0A= if ($ARGV[0] eq 'dmalloc')=0A= {=0A= shift @ARGV;=0A= if ($win32)=0A= {=0A= }=0A= else=0A= {=0A= $libs .=3D '-L/usr/local/lib -ldmalloc' ;=0A= $d .=3D '-DDMALLOC' ;=0A= }=0A= }=0A= =0A= if (defined ($ARGV[0]) && ($ARGV[0] =3D~ /^\W/))=0A= {=0A= $apache =3D 2 ;=0A= $b =3D 1 ;=0A= $apache_src =3D shift @ARGV ;=0A= }=0A= elsif (defined ($ENV{APACHE_SRC}))=0A= {=0A= $apache =3D 2 ;=0A= $b =3D 1 ;=0A= $apache_src =3D $ENV{APACHE_SRC} ;=0A= $apache_src =3D '' if ($apache_src eq '-') ;=0A= }=0A= =0A= if (!$apache && $apache_src eq '')=0A= {=0A= # check for mod_perl 2.0=0A= eval 'use Apache2; use Apache::BuildConfig' ;=0A= =0A= if ($@ eq '')=0A= { =0A= $mp2cfg =3D Apache::BuildConfig -> new ;=0A= $apache_src =3D $mp2cfg -> {MP_AP_PREFIX} || $mp2cfg -> = {ap_includedir} ;=0A= print "Found mod_perl 2.0\n" ;=0A= }=0A= else=0A= {=0A= eval 'use Apache::MyConfig' ;=0A= =0A= if ($@ eq '')=0A= { =0A= $apache_src =3D $Apache::MyConfig::Setup{Apache_Src} ; =0A= }=0A= else=0A= {=0A= $apache_src =3D '' ;=0A= }=0A= }=0A= }=0A= elsif ($apache_src ne '' && -X "$apache_src/bin/httpd")=0A= {=0A= my @vers =3D start ("\"$apache_src/bin/httpd\" -v") ;=0A= =0A= if ($vers[0] =3D~ m#/2#)=0A= {=0A= # check for mod_perl 2.0=0A= eval 'use Apache2; use Apache::BuildConfig' ;=0A= =0A= if ($@ eq '')=0A= { =0A= $mp2cfg =3D Apache::BuildConfig -> new ;=0A= print "Found mod_perl 2.0\n" ;=0A= }=0A= }=0A= }=0A= =0A= =0A= eval 'do "test/conf/config.pl"' ;=0A= =0A= =0A= if (!$apache && $apache_src eq '')=0A= {=0A= $apache_src =3D $EPAPACHESRC ;=0A= $loadmodules =3D $EPMODPERL ;=0A= }=0A= =0A= $base =3D '..' ;=0A= $base =3D $ENV{'ProgramFiles'} if ($win32) ;=0A= =0A= =0A= $apache =3D GetYesNo ("Build with support for Apache mod_perl?", 'y') if = (!$apache) ;=0A= =0A= if ($apache && $apache_src ne '')=0A= {=0A= if ($apache_src =3D~ /^(.*?)\/$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= if ($apache_src =3D~ /^(.*?)\/main$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= if ($apache_src =3D~ /^(.*?)\/include$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= if (-e "$apache_src/httpd.h" || -e "$apache_src/main/httpd.h" || -e = "$apache_src/include/httpd.h")=0A= {=0A= $b =3D GetYesNo ("Use $apache_src as Apache source", 'y') if (!$b) ;=0A= }=0A= }=0A= =0A= while ($apache && !$b)=0A= {=0A= print "Searching for Apache sources...\n" ;=0A= foreach $src_dir ($base,=0A= "$base/src",=0A= <$base/apache*/src>,=0A= <$base\\apache*\\include>,=0A= <$base\\apache*\\apache*\\include>,=0A= <./src>)=0A= {=0A= print "Look at $src_dir\n" ;=0A= =0A= if (-e "$src_dir/httpd.h" || -e "$src_dir/main/httpd.h" || -e = "$src_dir/include/httpd.h")=0A= {=0A= $b =3D GetYesNo ("Use $src_dir as Apache source", 'y') ;=0A= if ($b)=0A= {=0A= $apache_src =3D $src_dir ;=0A= last ;=0A= }=0A= }=0A= } =0A= =0A= if ($apache_src =3D~ /^(.*?)\/$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= if ($apache_src =3D~ /^(.*?)\/main$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= if ($apache_src =3D~ /^(.*?)\/include$/)=0A= { $apache_src =3D $1 ; } =0A= =0A= =0A= if (!$b)=0A= {=0A= $base =3D GetString ("Apache source not found, enter path name or q = to quit", 'q') ;=0A= if ($base eq 'q')=0A= {=0A= $apache =3D 0 ;=0A= }=0A= else=0A= {=0A= $base =3D~ s/\//\\/g if ($win32) ;=0A= } =0A= }=0A= }=0A= =0A= if ($b && $apache && $apache_src ne '')=0A= {=0A= $apache_src =3D abs_path ($apache_src) ;=0A= =0A= print "Will use $apache_src for Apache Headers\n" ;=0A= =0A= #### look in which subdir the include files resides ####=0A= =0A= if (-e "$apache_src/httpd.h")=0A= {=0A= $inc_dir =3D $apache_src ;=0A= }=0A= elsif (-e "$apache_src/main/httpd.h")=0A= {=0A= $inc_dir =3D "$apache_src/main" ;=0A= }=0A= elsif (-e "$apache_src/include/httpd.h")=0A= {=0A= $inc_dir =3D "$apache_src/include" ;=0A= }=0A= elsif (-e "$ENV{APACHE_HDR}/httpd.h")=0A= {=0A= $inc_dir =3D "$ENV{APACHE_HDR}" ;=0A= }=0A= =0A= =0A= if ($win32)=0A= { =0A= $i =3D "-I. -I\"$inc_dir\" -I\"$apache_src/regex\" = -I\"$apache_src/os/win32\"" ;=0A= =0A= foreach (=0A= "$apache_src/libexec",=0A= "$apache_src/../libexec",=0A= "$apache_src/CoreD",=0A= "$apache_src/CoreR",=0A= "$apache_src/Debug",=0A= "$apache_src/Release",=0A= $EPHTTPDDLL)=0A= {=0A= if (-e "$_/ApacheCore.lib")=0A= {=0A= $EPHTTPDDLL =3D $_ ;=0A= $o =3D " \"$_/ApacheCore.lib\"" ;=0A= last ;=0A= }=0A= }=0A= =0A= if (!$o)=0A= {=0A= my $oo ;=0A= while (1)=0A= {=0A= $oo =3D GetString ("ApacheCore.lib not found, please = enter path", $o) ;=0A= $oo .=3D '/ApacheCore.lib' if ($oo !~ /\.lib$/i) ;=0A= if (-e $oo)=0A= {=0A= $oo =3D~ s#\\#/#g ;=0A= $oo =3D~ s#//#/#g ;=0A= $EPHTTPDDLL =3D $1 if ($o =3D~ /^(.*)\//) ;=0A= $o =3D " \"$oo\"" ;=0A= last ;=0A= }=0A= }=0A= }=0A= =0A= }=0A= else=0A= {=0A= $i =3D "-I$inc_dir -I$apache_src/regex -I$apache_src/os/unix" ; =0A= $o =3D '' ;=0A= }=0A= =0A= if ($mp2cfg && !-f "$inc_dir/apr.h")=0A= {=0A= $i .=3D " -I$mp2cfg->{apr_includedir}" ;=0A= }=0A= =0A= $d .=3D ' -DAPACHE' ;=0A= $d .=3D ' -DAPACHE2' if ($mp2cfg) ;=0A= $EPNOAPACHELIB =3D 0 ;=0A= }=0A= else=0A= {=0A= $apache =3D 0 ;=0A= if ($win32 && ($EPAPACHESRC || $EPNOAPACHELIB) && -f = 'blib/arch/auto/Embperl/Embperl.dll')=0A= {=0A= print "\nYou have already build Embperl with support for Apache = mod_perl\n" ;=0A= $EPNOAPACHELIB =3D GetYesNo ("Do you want to build a separate = dynamic library for use without Apache?", 'y') ;=0A= }=0A= =0A= =0A= print "Will build without mod_perl support\n" ;=0A= $i =3D '' ;=0A= $o =3D '' ;=0A= }=0A= =0A= =0A= if ($win32 && $apache)=0A= { # borrowed from mod_perl=0A= local *DEFH;=0A= open DEFH, ">dirent.h" || die "can't write dirent.h $!";=0A= print DEFH <) || $> ;=0A= $EPGROUP =3D getgrgid($)) || $) + 0 ;=0A= if ($EPUSER eq 'root')=0A= {=0A= my $nobody =3D (getpwnam('nobody'))[0] ;=0A= $EPUSER =3D $nobody if $nobody ;=0A= }=0A= =0A= if ($EPUSER eq 'root')=0A= {=0A= print "Cannot run test httpd as User $EPUSER\n" ;=0A= $EPUSER =3D GetString ("User to run httpd", 'nobody') ;=0A= $EPGROUP =3D GetString ("Group to run httpd", $EPGROUP) ;=0A= }=0A= =0A= $EPHTTPD =3D "$apache_src/httpd" ;=0A= $EPHTTPD =3D $ENV{EPHTTPD} if (defined ($ENV{EPHTTPD})) ;=0A= $EPHTTPD =3D "$apache_src/httpsd" if (!-e $EPHTTPD && -e = "$apache_src/httpsd") ;=0A= $EPHTTPD =3D "$apache_src/bin/httpd" if (!-e $EPHTTPD && -e = "$apache_src/bin/httpd") ;=0A= =0A= if (!-e $EPHTTPD)=0A= {=0A= $EPHTTPD =3D GetString ("Enter path and file to start as = httpd", "$EPHTTPD") ;=0A= }=0A= =0A= $EPMODPERL=3D"" ;=0A= }=0A= else=0A= {=0A= if (!$EPHTTPD || !-e $EPHTTPD)=0A= {=0A= $EPHTTPD =3D "$EPHTTPDDLL/Apache.exe" ;=0A= $EPHTTPD =3D~ s#core([rd])/Apache.exe#Apache$1/Apache.exe#i ;=0A= $EPHTTPD =3D~ s#libexec/Apache.exe#Apache.exe#i ;=0A= }=0A= $EPUSER =3D 'www' ; # dummy value=0A= $EPGROUP =3D 'www' ;=0A= if (!-e $EPHTTPD)=0A= {=0A= $EPHTTPD =3D GetString ("Enter path and file to start as = Apache.exe", "$EPHTTPD") ;=0A= }=0A= $EPHTTPDPATH =3D $EPHTTPD ;=0A= $EPHTTPDPATH =3D~ s/Apache.exe//i ;=0A= }=0A= =0A= =0A= ### check the apache version ###=0A= =0A= $EPENVPATH =3D = ";$Config{bin};$EPHTTPDDLL;$EPHTTPDPATH;$EPHTTPDDLL/../os/win32/release;$= EPHTTPDDLL/../os/win32/debug" ;=0A= $ENV{PATH} .=3D $EPENVPATH if ($win32) ;=0A= =0A= @EPAPACHEVERSION =3D start ("\"$EPHTTPD\" -v") ;=0A= @modules =3D start ("\"$EPHTTPD\" -l") ;=0A= =0A= chomp ($EPAPACHEVERSION[0]) ;=0A= print "Apache Version $EPAPACHEVERSION[0]\n" ;=0A= =0A= $EPSTRONGHOLD =3D ($EPAPACHEVERSION[0] =3D~ /stronghold/i) ;=0A= $EPAPACHE_SSL =3D grep (/apache_ssl.c/, @modules) ;=0A= $EPMOD_SSL =3D !$EPSTRONGHOLD && grep (/mod_ssl.c/, @modules) ;=0A= =0A= $EPBINDIR =3D dirname ($EPHTTPD) ; =0A= $EPMODPERL =3D '' ;=0A= =0A= $addmodpath =3D $mp2cfg?$mp2cfg -> {MODPERL_AP_LIBEXECDIR}:'' ;=0A= while (($mod, $opt) =3D each %neededmodules)=0A= {=0A= if (!grep (/$mod/, @modules))=0A= { # module not linked staticly=0A= $paths =3D $win32?$opt->{win32path}:$opt->{path} ;=0A= $modfile =3D $win32?$opt->{win32file}:$opt->{file}[0] ;=0A= $modfiletext =3D ($win32?$opt->{win32filetext}:$opt->{filetext}) || = $modfile ;=0A= $found =3D 2 ;=0A= searchmod:=0A= while ($found =3D=3D 2)=0A= {=0A= $found =3D 0 ;=0A= if ($addmodpath)=0A= {=0A= foreach $modfile (@{$opt->{file}})=0A= {=0A= $path =3D cnvpath ("$addmodpath/$modfile") ;=0A= #print "path =3D $_ -> $path\n" ;=0A= if (-f $path)=0A= { ## module fould=0A= $EPMODPERL .=3D "\r\nLoadModule ". ($mp2cfg?($opt->{name2} || = $opt->{name}):$opt->{name}) . " \"$path\"" ;=0A= print " + Load dynamic module $mod\n ($path)\n" ;=0A= $found =3D 1 ;=0A= last searchmod ;=0A= }=0A= }=0A= }=0A= foreach (@$paths)=0A= {=0A= $path =3D cnvpath (eval "\"$_\"") ;=0A= #print "path =3D $_ -> $path\n" ;=0A= if (-f $path)=0A= { ## module fould=0A= $EPMODPERL .=3D "\r\nLoadModule $opt->{name} \"$path\"" ;=0A= print " + Load dynamic module $mod\n ($path)\n" ;=0A= $found =3D 1 ;=0A= last ;=0A= }=0A= }=0A= if (!$found && $loadmodules)=0A= { =0A= if ($loadmodules =3D~ /LoadModule $opt->{name} = \"(.*?)\"$/)=0A= {=0A= $path =3D $1 ;=0A= if (-f $path)=0A= { ## module fould=0A= $EPMODPERL .=3D "\r\nLoadModule $opt->{name} \"$path\"" ;=0A= print " + Load dynamic module $mod\n ($path)\n" ;=0A= $found =3D 1 ;=0A= last ;=0A= }=0A= }=0A= } =0A= =0A= if (!$found)=0A= {=0A= my $w32msg =3D '' ;=0A= $w32msg =3D "\nPlease enter full path including the drive letter!! = " if ($win32) ;=0A= $addmodpath =3D GetString ("Library for $mod not found, please = enter path to $modfiletext $w32msg", "") ;=0A= $found =3D 2 ;=0A= }=0A= } =0A= }=0A= }=0A= =0A= =0A= =0A= =0A= $use_dso =3D 0 ;=0A= if (!$win32 && ($EPMODPERL =3D~ /perl_module/))=0A= {=0A= print " + mod_perl was build with USE_DSO\n" ;=0A= $use_dso =3D 1 ;=0A= }=0A= =0A= if ($mp2cfg)=0A= {=0A= require Apache::Build ;=0A= $dynlib->{'OTHERLDFLAGS'} =3D Apache::Build->new->otherldflags ;=0A= }=0A= else=0A= {=0A= require Apache::src;=0A= $dynlib->{'OTHERLDFLAGS'} =3D Apache::src->new->otherldflags if = (defined (&Apache::src::otherldflags)) ;=0A= }=0A= =0A= if ($EPSTRONGHOLD) =0A= {=0A= $i .=3D " -I$apache_src/../ssl/include" ;=0A= $d .=3D " -DSTRONGHOLD" ;=0A= print " + found Stronghold\n" ;=0A= }=0A= elsif ($EPAPACHE_SSL)=0A= {=0A= $d .=3D " -DEPAPACHE_SSL" ;=0A= print " + found Apache SSL\n" ;=0A= }=0A= elsif ($EPMOD_SSL)=0A= {=0A= $sslbase =3D search_config ('SSL_BASE', = "$apache_src/Configuration.apaci") ;=0A= $sslbase =3D search_config ('SSL_BASE', = "$apache_src/Configuration") if (!$sslbase) ;=0A= print " + found mod_ssl\n" ;=0A= $EPSSLDISABLE =3D $mp2cfg?0:!start_errcode ("\"$EPHTTPD\" -t -f = $EPPATH/test/conf/ssldisable.conf") ;=0A= }=0A= =0A= =0A= =0A= if ($EPSTRONGHOLD)=0A= {=0A= my $conf =3D "$apache_src/../conf/httpd.conf";=0A= if(-e $conf) =0A= {=0A= open FH, $conf;=0A= while()=0A= {=0A= if(/^StrongholdKey/)=0A= {=0A= chomp ;=0A= $EPSTRONGHOLDKEY =3D $_;=0A= last;=0A= }=0A= }=0A= close FH;=0A= }=0A= }=0A= else=0A= {=0A= $EPSTRONGHOLDKEY =3D '' ;=0A= }=0A= =0A= $epc_enable =3D search_config ('\s*#define\s+EPC_ENABLE', = "crypto/epcrypto_config.h") ;=0A= if ($epc_enable)=0A= {=0A= $sslbase =3D search_config ('SSL_BASE', = "$apache_src/Configuration.apaci") if (!$sslbase) ;=0A= $sslbase =3D search_config ('SSL_BASE', = "$apache_src/Configuration") if (!$sslbase) ;=0A= $sslbase =3D '/usr/local/ssl' if (!$sslbase) ;=0A= $libs .=3D " -L$sslbase/lib -lcrypto" ;=0A= $o .=3D ' crypto/epcrypto$(OBJ_EXT) ' ;=0A= print "Enable crypted sourcefiles\n" ;=0A= }=0A= =0A= if ($sslbase) =0A= {=0A= $i .=3D " -I$sslbase/include" =0A= }=0A= =0A= print "Test start $EPHTTPD\n" ;=0A= print "Test httpd will run as user $EPUSER and group $EPGROUP\n" if = (!$win32) ;=0A= print "Test httpd will listen on port $EPPORT\n" ;=0A= print "Test will use $EPSTRONGHOLDKEY\n" if($EPSTRONGHOLDKEY) ;=0A= =0A= =0A= ### check for required modules ###=0A= =0A= if (($MPVer =3D CheckModule ("mod_perl", "-> Cannot build for = mod_perl without mod_perl installed!!")))=0A= {=0A= if ($win32 && $MPVer lt "1.12")=0A= {=0A= print "-> Please upgrade to an higher version of mod_perl on = Win32\n" ;=0A= }=0A= if ($use_dso && $MPVer lt "1.22")=0A= {=0A= print "-> You MUST upgrade to mod_perl 1.22 or higher when = mod_perl is build with USE_DSO!!\n" ;=0A= $EPSTARTUP =3D'startup_dso.pl' ;=0A= }=0A= if ($aix && $MPVer lt "1.22")=0A= {=0A= print "-> You MUST upgrade to mod_perl 1.22 or higher to use = Embperl on AIX!!\n" ;=0A= $EPSTARTUP =3D'startup_dso.pl' ;=0A= }=0A= }=0A= =0A= if (CheckModule ("LWP::UserAgent", "-> Cannot test mod_perl and CGI = mode"))=0A= {=0A= CheckModule ("HTML::HeadParser", "-> Is required by = LWP::UserAgent");=0A= }=0A= =0A= $SessVer =3D CheckModule ("Apache::Session", "-> Disable tests for = persistent data storage") || '' ;=0A= =0A= if ($SessVer && !($SessVer >=3D 1.00))=0A= {=0A= if ($SessVer && !($SessVer =3D~ /0\.17/))=0A= {=0A= print "-> Embperl works only with Apache::Session 1.00 and = higher\n" ;=0A= print "-> Disable tests for persistent data storage\n" ;=0A= $SessVer =3D '0' ;=0A= }=0A= else=0A= {=0A= print "-> Embperl does not support Apache::Session 0.17.x = anymore.\n" ;=0A= print "-> Please upgrade to 1.50 or higher.\n" ;=0A= print "-> Disable tests for persistent data storage.\n" ;=0A= $SessVer =3D '0' ;=0A= }=0A= }=0A= =0A= $SessXVer =3D CheckModule ("Apache::SessionX", "-> Disable tests for = persistent data storage") || '' if ($SessVer) ;=0A= $SessVer ||=3D 0 ;=0A= =0A= if (($FSVer =3D CheckModule ("File::Spec", "-> Required for = EmbperlObject, make test will fail whithout File::Spec")) < 0.8)=0A= {=0A= print "-> EmbperlObject requires File::Spec 0.8 or higher, found = $FSVer, please upgrade!\n" ;=0A= }=0A= =0A= CheckModule ("CGI", "-> File Upload will not work without CGI.pm = installed") ;=0A= =0A= ### write out test configuration file ###=0A= =0A= open FH, ">$EPPATH/test/conf/config.pl" or die "Cannot open = $EPPATH/test/conf/config.pl" ;=0A= print FH "# This file is automaticly generated by Makefile.PL, do = not edit\n" ;=0A= print FH "\$EPPATH=3D'" . cnvpath($EPPATH) . "' ;\n" ;=0A= print FH "\$EPUSER=3D'$EPUSER' ;\n" ;=0A= print FH "\$EPGROUP=3D'$EPGROUP' ;\n" ;=0A= print FH "\$EPPORT=3D$EPPORT ;\n" ;=0A= print FH "\$EPHTTPD=3D'" . cnvpath($EPHTTPD) . "' ;\n" ;=0A= print FH "\$EPHTTPDDLL=3D'" . cnvpath($EPHTTPDDLL) . "' ;\n" ;=0A= print FH "\$EPWIN32=3D'$win32' ;\n" ;=0A= print FH "\$EPAPACHESRC=3D'" . cnvpath($apache_src) . "' ;\n" ;=0A= print FH "\$EPAPACHE_SSL=3D'" . $EPAPACHE_SSL . "' ;\n" ;=0A= print FH "\$EPSTRONGHOLD=3D'$EPSTRONGHOLD' ;\n" ;=0A= print FH "\$EPSSLDISABLE=3D'$EPSSLDISABLE' ;\n" ;=0A= print FH "\$EPSTRONGHOLDKEY=3D'$EPSTRONGHOLDKEY' ;\n" ;=0A= print FH "\$EPMODPERL=3D'" . cnvpath2unix($EPMODPERL) . "';\n" ;=0A= print FH "\$EPSTARTUP=3D'" . cnvpath($EPSTARTUP) . "';\n" ;=0A= print FH "\$EPAPACHEVERSION=3D'$EPAPACHEVERSION[0]';\n" ;=0A= print FH "\$EPSESSIONVERSION=3D'$SessVer';\n" ;=0A= print FH "\$EPSESSIONXVERSION=3D'$SessXVer';\n" ;=0A= print FH "\$EP2=3D'$EP2';\n" ;=0A= print FH "\$MP2=3D'". ($mp2cfg?'1':'0') . "';\n" ;=0A= print FH "\$EPMODPERLVERSION=3D'$MPVer';\n" ;=0A= print FH "\$EPC_ENABLE=3D'$epc_enable';\n" ;=0A= print FH "\$EPNOAPACHELIB=3D'$EPNOAPACHELIB';\n" ;=0A= if ($win32)=0A= {=0A= print FH "\$EPNULL=3D'nul';\n" ;=0A= }=0A= else=0A= {=0A= print FH "\$EPNULL=3D'/dev/null';\n" ;=0A= }=0A= =0A= =0A= =0A= }=0A= else=0A= {=0A= ### check for required modules ###=0A= =0A= $SessVer =3D CheckModule ("Apache::Session", "-> Disable tests for = persistent data storage") || '' ;=0A= =0A= if ($SessVer && $SessVer lt "0.17")=0A= {=0A= print "-> Please upgrade to Apache::Session 0.17 or higher\n" ;=0A= print "-> Disable tests for persistent data storage\n" ;=0A= $SessVer =3D 0 ;=0A= }=0A= =0A= $SessXVer =3D CheckModule ("Apache::SessionX", "-> Disable tests for = persistent data storage") || '' if ($SessVer) ;=0A= $SessVer ||=3D 0 ;=0A= =0A= ### write out test configuration file ###=0A= =0A= open FH, ">$EPPATH/test/conf/config.pl" or die "Cannot open = $EPPATH/test/conf/config.pl" ;=0A= print FH "# This file is automaticly generated by Makefile.PL, do = not edit\n" ;=0A= print FH "\$EPPATH=3D'$EPPATH' ; \n" ;=0A= print FH "\$EPENVPATH=3D'$EPENVPATH' ; \n" ;=0A= print FH "\$EPHTTPD=3D'' ;\n" ;=0A= print FH "\$EPWIN32=3D'$win32' ;\n" ;=0A= print FH "\$EPSESSIONVERSION=3D'$SessVer';\n" ;=0A= print FH "\$EPSESSIONXVERSION=3D'$SessXVer';\n" ;=0A= print FH "\$EPSSLDISABLE=3D'$EPSSLDISABLE' ;\n" ;=0A= print FH "\$EP2=3D'$EP2';\n" ;=0A= print FH "\$EPNOAPACHELIB=3D'$EPNOAPACHELIB';\n" ;=0A= print FH "\$EPC_ENABLE=3D'$epc_enable';\n" ;=0A= print FH "\$EPHTTPD=3D'" . cnvpath($EPHTTPD) . "' ;\n" ;=0A= print FH "\$EPHTTPDDLL=3D'" . cnvpath($EPHTTPDDLL) . "' ;\n" ;=0A= print FH "\$EPWIN32=3D'$win32' ;\n" ;=0A= print FH "\$EPAPACHESRC=3D'" . cnvpath($EPAPACHESRC) . "' ;\n" ;=0A= print FH "\$EPMODPERL=3D'" . cnvpath2unix($loadmodules) . "';\n" ;=0A= }=0A= =0A= # $d .=3D ' -DPERL_IS_5_6 ' if $] >=3D 5.006;=0A= =0A= if ($win32)=0A= { =0A= # check for inclusion of malloc.h and signal.h=0A= if ($Config{usemultiplicity})=0A= {=0A= $d .=3D ' -D_INC_MALLOC -D_INC_SIGNAL ';=0A= }=0A= =0A= # Check for winsock2api=0A= =0A= my $os_h =3D "$inc_dir/os.h" ;=0A= $os_h =3D "$inc_dir/../os/win32/os.h" if (!-e $os_h) ;=0A= =0A= if (open FH2, $os_h )=0A= {=0A= my @conf =3D ;=0A= close FH2 ;=0A= =0A= if (grep (/winsock2\.h/, @conf))=0A= {=0A= $d .=3D ' -D_WINSOCK2API_ -D_MSWSOCK_ ' ;=0A= }=0A= elsif (open FH2, "$inc_dir/ap_config.h")=0A= {=0A= @conf =3D ;=0A= close FH2 ;=0A= =0A= if (grep (/winsock2\.h/, @conf))=0A= {=0A= $d .=3D ' -D_WINSOCK2API_ ' ;=0A= }=0A= }=0A= }=0A= =0A= $d .=3D ' -D_WINDOWS ';=0A= $d .=3D ' -DMULTIPLICITY' if ($Config{usemultiplicity}) ;=0A= =0A= }=0A= =0A= $d .=3D ' -DEP2' if ($EP2) ;=0A= =0A= $dynlib->{'OTHERLDFLAGS'} .=3D " $lddebug" ;=0A= =0A= # =0A= # See if we need to link to any other libraries=0A= #=0A= =0A= my $makemacros =3D {} ;=0A= if ($EP2)=0A= {=0A= opendir DH, "driver" or die "Cannot open directory driver ($!)" ;=0A= my @files =3D readdir DH ;=0A= closedir DH ;=0A= my @makefiles =3D grep (/\.MAKEPL$/, @files) ;=0A= =0A= foreach my $makepl (@makefiles)=0A= {=0A= #print "Exec driver/$makepl\n" ;=0A= my $result =3D do "driver/$makepl" ;=0A= if ($@)=0A= {=0A= print $@ ;=0A= next ;=0A= }=0A= if (ref $result)=0A= {=0A= #while (my ($k, $v) =3D each %$result)=0A= # {=0A= # print "$k =3D $v\n" ;=0A= # }=0A= $libs .=3D ' ' . $result->{libs} ;=0A= $i .=3D ' ' . $result->{cflags} ;=0A= $d .=3D ' ' . $result->{defines} ;=0A= $o .=3D ' ' . $result->{objects} ;=0A= $makemacros->{CPP} =3D $result->{cpp} if ($result->{cpp}) ;=0A= $makemacros->{CPPFLAGS} =3D $result->{cppflags} if = ($result->{cppflags}) ;=0A= if ($result->{save})=0A= {=0A= while (($k, $v) =3D each (%{$result->{save}}))=0A= {=0A= print FH "$k=3D'" . $v . "';\n" ;=0A= }=0A= } =0A= }=0A= }=0A= =0A= }=0A= =0A= =0A= close FH ;=0A= =0A= $i .=3D " -I$EPPATH/xs" ;=0A= =0A= if ($mp2cfg && $mp2cfg->{'MP_INCLUDE_DIR'})=0A= {=0A= my @inc =3D split (/\s+/, $mp2cfg->{'MP_INCLUDE_DIR'}) ;=0A= $i .=3D ' -I' . join (' -I', @inc) if (@inc) ;=0A= }=0A= =0A= =0A= %MMARGS =3D (=0A= 'LIBS' =3D> [$libs || ''], =0A= 'DEFINE' =3D> "$d \$(DEFS)", =0A= 'INC' =3D> "-I$EPPATH $i", =0A= 'VERSION' =3D> undef,=0A= 'VERSION_FROM' =3D> "$EPPATH/Embperl.pm",=0A= $optdebug?('OPTIMIZE' =3D> $ccdebug):(),=0A= ) ;=0A= =0A= =0A= =0A= open FH, ">xs/mmargs.pl" or die "Cannot open xs/mmargs.pl ($!).\n=0A= -------------------------------------------------------------------------= -=0A= If you done a CVS checkout you need to create the sources first by = running=0A= xsbuilder/source_scan.pl and xsbuilder/xs_generate.pl.=0A= -------------------------------------------------------------------------= -=0A= \n" ;=0A= print FH Data::Dumper -> Dump ([\%MMARGS], ['MMARGS']) ;=0A= close FH ;=0A= =0A= =0A= my $sublibs .=3D ' ' . =0A= join ('$(OBJ_EXT) ', qw{=0A= xs/Embperl/App/App=0A= xs/Embperl/App/Config/Config=0A= xs/Embperl/Component/Component=0A= xs/Embperl/Component/Config/Config=0A= xs/Embperl/Component/Param/Param=0A= xs/Embperl/Component/Output/Output=0A= xs/Embperl/Req/Req=0A= xs/Embperl/Req/Config/Config=0A= xs/Embperl/Req/Param/Param=0A= xs/Embperl/Thread/Thread=0A= xs/Embperl/Syntax/Syntax=0A= }) . '$(OBJ_EXT)';=0A= =0A= $sublibs =3D~ s/\//\\/g if ($win32) ;=0A= $o .=3D $sublibs ;=0A= =0A= WriteMakefile(=0A= 'NAME' =3D> 'Embperl',=0A= 'VERSION_FROM' =3D> 'Embperl.pm', # finds $VERSION=0A= 'OBJECT' =3D> 'Embperl$(OBJ_EXT) epmain$(OBJ_EXT) = epio$(OBJ_EXT) epchar$(OBJ_EXT) eputil$(OBJ_EXT) epeval$(OBJ_EXT) ' . =0A= ($EP2?'epmem$(OBJ_EXT) epinit$(OBJ_EXT) = epcgiinit$(OBJ_EXT) epcmd2$(OBJ_EXT) epparse$(OBJ_EXT) epdom$(OBJ_EXT) = epcomp$(OBJ_EXT) epcache$(OBJ_EXT) epprovider$(OBJ_EXT) = ':'epcmd$(OBJ_EXT) ') . =0A= ($apache?'mod_embperl$(OBJ_EXT) ':' ') .=0A= ($mp2cfg?'epapfilter$(OBJ_EXT) ':' ') .=0A= $o ,=0A= 'LIBS' =3D> [$libs || ''], =0A= 'DEFINE' =3D> "$d \$(DEFS)", =0A= 'INC' =3D> $i, =0A= 'EXE_FILES' =3D> [ 'embpexec.pl', 'embpmsgid.pl' ],=0A= 'clean' =3D> { FILES =3D> 'dirent.h test/conf/httpd.conf = test/conf/httpd.stop.conf test/conf/httpd.min.conf test/tmp/* Embperl.c = $(OBJECT)' },=0A= 'realclean' =3D> { FILES =3D> 'embpmsgid.pl embpexec.pl = embpexec.bat embpcgi.pl embpcgi.test.pl embpcgi.bat epocgi.pl epocgi.bat = epocgi.test.pl embpfastcgi.pl embpfastcgi.test.pl test/conf/config.pl = xs/mmargs.pl' },=0A= 'dist' =3D> { COMPRESS =3D> 'gzip', SUFFIX =3D> 'gz'},=0A= 'dynamic_lib' =3D> $dynlib,=0A= 'PREREQ_PM' =3D> { 'File::Spec' =3D> 0.8 },=0A= 'ABSTRACT' =3D> 'Embed Perl code in HTML documents',=0A= 'AUTHOR' =3D> 'Gerald Richter ',=0A= 'macro' =3D> $makemacros,=0A= $EP2?('depend' =3D> { 'Embperl.c' =3D> 'Embperl.xs DOM.xs = Cmd.xs Syntax.xs Old.xs' }):(),=0A= );=0A= =0A= =0A= =0A= #=0A= # Change path to perl binary=0A= #=0A= =0A= @bins =3D ('embpexec.pl','embpexec.bat', =0A= 'embpcgi.pl', 'embpcgi.test.pl', 'embpcgi.bat',=0A= 'embpfastcgi.pl', 'embpfastcgi.test.pl','embpmsgid.pl',=0A= 'epocgi.pl', 'epocgi.test.pl', 'epocgi.bat') ;=0A= =0A= =0A= die "Missing path to perl binary" if (!$perlbinpath) ;=0A= =0A= =0A= foreach $f (@bins)=0A= {=0A= open IN, "<$f.templ" or die "Cannot open $f.templ" ;=0A= open OUT, ">$f" or die "Cannot open $f" ;=0A= my $l =3D 1 ;=0A= while ()=0A= {=0A= if ($l++ < 10)=0A= {=0A= #if ($win32)=0A= # {=0A= # s/^\#\!.*?perl.*?\s(.*?)/#!perl $1/ ;=0A= # }=0A= #else=0A= # {=0A= s/^\#\!.*?perl.*?\s(.*?)/#!$perlbinpath $1/ ;=0A= # }=0A= s/^.*?perl.*?\s-x/$perlbinpath -x/ ;=0A= }=0A= print OUT $_ ;=0A= }=0A= close IN ;=0A= close OUT ;=0A= chmod 0755, $f or die "Cannot set executable $f" ;=0A= }=0A= =0A= unlink ('Embperl.c') ;=0A= =0A= ------=_NextPart_000_0040_01C52874.1C4B9540 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org ------=_NextPart_000_0040_01C52874.1C4B9540--