Stas Bekman wrote:
> Rodent of Unusual Size wrote:
> 
>> the options are correct, but the module isn't being created properly.
> 
> coolio, so now you know what the problem is ;)

actually, the options *aren't* correct for AIX and apache 1.3.
and in dealing with that, i found another set of '/' path
concatenation assumptions.  here's a patch that seems to get
this working for apache 1.3 on aix.

thanks to bill stoddard for pointing out the weird and not-so-wonderful
link options needed for aix.

note the

    my $makefile = "$mod->{dir}/Makefile";

path concatenation assumption.  i fixed that in the new sub i added
for aix, but left the original (and any others) alone..
-- 
#ken    P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"
Index: Apache-Test/lib/Apache/TestConfigC.pm
===================================================================
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v
retrieving revision 1.24
diff -u -r1.24 TestConfigC.pm
--- Apache-Test/lib/Apache/TestConfigC.pm       8 Jan 2004 17:15:37 -0000       
1.24
+++ Apache-Test/lib/Apache/TestConfigC.pm       2 Mar 2004 13:28:00 -0000
@@ -175,6 +175,48 @@
     close $fh or die "close $makefile: $!";
 }
 
+sub cmodules_write_makefile_aix {
+    my($self, $mod) = @_;
+
+    my $dversion = $self->server->dversion;
+    my $name = $mod->{name};
+    my $makefile = catfile($mod->{dir}, 'Makefile');
+    my $apxsflags = '';
+
+    if ($dversion eq '-DAPACHE1') {
+        $apxsflags = "-Wl,-bE:$name.exp";
+        my $expfile = catfile($mod->{dir}, "$name.exp");
+        if (! -f $expfile) {
+            my $fh = Symbol::gensym();
+            $name =~ /^mod_(\w+)(?:\.c)?$/;
+            my $sym = $1 . '_module';
+            open $fh, ">$expfile" or die "open $expfile: $!";
+            print $fh "$sym\n";
+            close $fh;
+        }
+    }
+    debug "writing $makefile";
+
+    my $lib = $self->cmodules_build_so($name);
+
+    my $fh = Symbol::gensym();
+    open $fh, ">$makefile" or die "open $makefile: $!";
+
+    print $fh <<EOF;
+APXS=$self->{APXS}
+APXSFLAGS=$apxsflags
+all: $lib
+
+$lib: $name.c
+       \$(APXS) $dversion -I$self->{cmodules_dir} \$(APXSFLAGS) -c $name.c
+
+clean:
+       -rm -rf $name.o $name.lo $name.slo $name.la .libs
+EOF
+
+    close $fh or die "close $makefile: $!";
+}
+
 sub cmodules_write_makefile_MSWin32 {
     my($self, $mod) = @_;
 

Reply via email to