The current (1.3) apxs will not handle C++ files, even though the commands
are the same as .c compiles.
Attached is a patch to allow .cpp mod's to compile.
(Not sure who should handle checking it and commiting it.)
--
Later ...
Rich Roth --- On-the-Net
Direct: PO Box 550, Greenfield, MA 01302
Voice: 413-773-5270 cel: 413-222-5376
Email: [EMAIL PROTECTED] Url: http://east.on-the-net.com
Tools: Global database for Apache: http://www.apache-tools.org
===================================================================
RCS file: src/support/RCS/apxs.pl,v
retrieving revision 1.1
diff -u -r1.1 src/support/apxs.pl
--- src/support/apxs.pl 2001/04/30 17:31:24 1.1
+++ src/support/apxs.pl 2001/04/30 17:37:39
@@ -324,7 +324,7 @@
my @objs = ();
my $f;
foreach $f (@args) {
- if ($f =~ m|\.c$|) {
+ if ($f =~ m!\.c$|\.cpp$!) {
push(@srcs, $f);
}
else {
@@ -369,6 +369,7 @@
foreach $s (@srcs) {
my $o = $s;
$o =~ s|\.c$|.o|;
+ $o =~ s|\.cpp$|.o|;
$o =~ s|^.*/||;
push(@cmds, "$CFG_CC $cflags -I$CFG_INCLUDEDIR $opt -c $s");
unshift(@objs, $o);
@@ -437,16 +438,19 @@
$name = '';
my $base = $f;
$base =~ s|\.[^.]+$||;
- if (-f "$base.c") {
- open(FP, "<$base.c");
- my $content = join('', <FP>);
- close(FP);
- if ($content =~
m|.*module\s+(?:MODULE_VAR_EXPORT\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) {
- $name = "$1";
- $filename = "$base.c";
- $filename =~ s|^[^/]+/||;
- }
- }
+ my $suffix;
+ for $suffix ('c', 'cpp') {
+ if (-f "$base.$suffix") {
+ open(FP, "<$base.$suffix");
+ my $content = join('', <FP>);
+ close(FP);
+ if ($content =~
+m|.*module\s+(?:MODULE_VAR_EXPORT\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) {
+ $name = "$1";
+ $filename = "$base.$suffix";
+ $filename =~ s|^[^/]+/||;
+ }
+ }
+ }
if ($name eq '') {
if ($base =~ m|.*mod_([a-zA-Z0-9_]+)\..+|) {
$name = "$1";