Hi,

I have tried: apxs -c -o mod_jk.so *.c, but the result was not the one I
except...

I think that this command should compile all c source files and build a dynamic
library named mod_jk.so.
But apxs does the following: For each c file of the directory it creates a
dynamic library (named mod_jk.so) using the object made compiling the c file.

Find enclosed the patch I have used to fix apxs, check it (carefully: I am not a
PERL expert) and commit it.

Cheers

Jean-frederic
Index: apxs.in
===================================================================
RCS file: /home/cvs/apache/httpd-2.0/support/apxs.in,v
retrieving revision 1.17
diff -u -r1.17 apxs.in
--- apxs.in     2001/02/16 04:26:53     1.17
+++ apxs.in     2001/04/27 15:13:25
@@ -350,11 +350,12 @@
             $dso_file =~ s|\.[^.]+$|.la|;
         }
         else {
-            $dso_file = "mod_unknown.so";
+            $dso_file = "mod_unknown.la";
         }
     }
     else {
         $dso_file = $opt_o;
+        $dso_file =~ s|\.so$|.la|;
     }
 
     #   create compilation commands
@@ -372,17 +373,18 @@
     }
     my $cflags = "$CFG_CFLAGS";
     my $s;
+    my $mlo;
     foreach $s (@srcs) {
         my $slo = $s;
         $slo =~ s|\.c$|.slo|;
         my $lo = $s;
         $lo =~ s|\.c$|.lo|;
-        my $la = $s;
-        $la =~ s|\.c$|.la|;
+        $mlo .= " ";
+        $mlo .= $lo;
         push(@cmds, "libtool --silent --mode=compile $CFG_CC $cflags 
-I$CFG_INCLUDEDIR $opt -c $s && touch $slo");
-        push(@cmds, "libtool --silent --mode=link $CFG_CC $cflags -o $la -rpath 
$CFG_LIBEXECDIR -module -avoid-version $lo");
 
     }
+    push(@cmds, "libtool --silent --mode=link $CFG_CC $cflags -o $dso_file -rpath 
+$CFG_LIBEXECDIR -module -avoid-version $mlo");
 
     #   execute the commands
     &execute_cmds(@cmds);

Reply via email to