diff -ur --new-file mod_caml-1.3.6.orig/Makefile mod_caml-1.3.6/Makefile --- mod_caml-1.3.6.orig/Makefile 2005-02-02 03:56:17.000000000 -0500 +++ mod_caml-1.3.6/Makefile 2005-07-31 19:21:26.000000000 -0400 @@ -69,9 +69,13 @@ 500mod_caml.info: 500mod_caml.info.in Makefile.config sed -e 's,@APACHELIBDIR@,$(APACHELIBDIR),g' < $< > $@ +apxswrapper: apxswrapper.in + sed -e "s|\@APXS\@|$(APXS)|" $< | \ + sed -e "s|\@APACHELIBDIR\@|$(APACHELIBDIR)|" > $@ + chmod +x $@ -mod_caml.so: mod_caml_c.o apache_c.o wrappers.o $(ALL_CMOS) - $(OCAMLC) -linkall -custom $(OCAMLCFLAGS) $(ALL_CMAS) $^ -o $@ \ +mod_caml.so: mod_caml_c.o apache_c.o wrappers.o $(ALL_CMOS) | apxswrapper + $(OCAMLC) -cc "./apxswrapper" -linkall -custom $(OCAMLCFLAGS) $(ALL_CMAS) $^ -o $@ \ -cclib "$(CFLAGS) $(LDFLAGS_SHLIB) $(OCAMLLIBS)" example-handlers: registry.cmo examples/simple-handlers/print_trans.cmo \ @@ -168,6 +172,7 @@ done rm -f mod_caml_config.ml config.h META rm -rf .libs + rm -f apxswrapper distclean: rm -rf .depend html/ diff -ur --new-file mod_caml-1.3.6.orig/Makefile.config mod_caml-1.3.6/Makefile.config --- mod_caml-1.3.6.orig/Makefile.config 2005-03-31 08:53:52.000000000 -0500 +++ mod_caml-1.3.6/Makefile.config 2005-07-31 14:42:10.000000000 -0400 @@ -72,20 +73,6 @@ APACHECONFDIR := $(shell $(APXS) -q SYSCONFDIR) #APACHECONFDIR := /etc/apache -# CC and CFLAGS -# C compiler and flags. -# The defaults should be OK for Apache 1.3. -# On my version of Apache 2.0, apxs prints out empty values for CFLAGS, -# CFLAGS_SHLIB, and so on. Instead I need to use the undocumented -# EXTRA_CFLAGS, EXTRA_CPPFLAGS, and so on. I have no idea if this is -# a problem with Apache 2 in general. If you make this work on Apache 2, -# please let me know. - -CC := $(shell $(APXS) -q CC) -CFLAGS := -I$(APACHEINCDIR) $(shell $(APXS) -q CFLAGS) \ - $(shell $(APXS) -q CFLAGS_SHLIB) -LDFLAGS_SHLIB := $(shell $(APXS) -q LDFLAGS_SHLIB) - # OCAMLC, OCAMLOPT, OCAMLDOC # The location of the OCaml compiler and tools. # The defaults should be OK. @@ -158,3 +145,17 @@ #MAILER_PATH := /usr/lib/sendmail MAILER_ARGS := -t -i + +# CC and CFLAGS +# C compiler and flags. +# The defaults should be OK for Apache 1.3. +# On my version of Apache 2.0, apxs prints out empty values for CFLAGS, +# CFLAGS_SHLIB, and so on. Instead I need to use the undocumented +# EXTRA_CFLAGS, EXTRA_CPPFLAGS, and so on. I have no idea if this is +# a problem with Apache 2 in general. If you make this work on Apache 2, +# please let me know. + +CC := $(shell $(APXS) -q CC) +CFLAGS := -I$(APACHEINCDIR) -I$(OCAMLINCDIR) $(shell $(APXS) -q CFLAGS) \ + $(shell $(APXS) -q CFLAGS_SHLIB) +LDFLAGS_SHLIB := $(shell $(APXS) -q LDFLAGS_SHLIB) diff -ur --new-file mod_caml-1.3.6.orig/apxswrapper.in mod_caml-1.3.6/apxswrapper.in --- mod_caml-1.3.6.orig/apxswrapper.in 1969-12-31 19:00:00.000000000 -0500 +++ mod_caml-1.3.6/apxswrapper.in 2005-07-31 19:23:13.000000000 -0400 @@ -0,0 +1,2 @@ +#!/bin/sh +@APXS@ -S "LIBEXECDIR=@APACHELIBDIR@" -c $@ && mv .libs/mod_caml.so .