# mod_caml configuration -*- Makefile -*- # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # $Id: Makefile.config,v 1.53 2005/03/31 13:53:52 rwmj Exp $ # PACKAGE and VERSION PACKAGE := mod_caml VERSION := 1.3.6 # APACHE_MAJOR # For Apache 1.3, set this to 1 # For Apache 2.x, set this to 2 APACHE_MAJOR := 2 #APACHE_MAJOR := 2 # APXS # For Apache 1.3, you need to use apxs or /full/path/to/apxs if it's not on # the default $PATH. # For Apache 2.x, you need to use apxs (apxs2 on Debian) or /full/path/to/apxs # if it's not on the default $PATH. APXS := apxs2 #APXS := /usr/local/apache/bin/apxs #APXS := apxs2 #APXS := /usr/local/apache/bin/apxs2 # MODCAMLLIBDIR # This is where we're going to install the default mod_caml handlers # such as registry.cmo, and the example CGI scripts and example templates. MODCAMLLIBDIR := /usr/share/mod_caml #MODCAMLLIBDIR := /usr/local/share/mod_caml # APACHELIBDIR # This is where we're going to install mod_caml.so. # The default should be OK. APACHELIBDIR := $(shell $(APXS) -q LIBEXECDIR) #APACHELIBDIR := /usr/lib/apache/1.3 #APACHELIBDIR := /usr/lib/apache2/modules #APACHELIBDIR := $(shell pwd) #APACHELIBDIR := /usr/local/apache/libexec #APACHELIBDIR := /usr/lib/mod_caml #APACHELIBDIR := /usr/local/lib/mod_caml # APACHEINCDIR # Location of the Apache includes. # The default should be OK. APACHEINCDIR := $(shell $(APXS) -q INCLUDEDIR) #APACHEINCDIR := /usr/include/apache-1.3 # APACHECONFDIR # Apache configuration directory. # The default should be OK. APACHECONFDIR := $(shell $(APXS) -q SYSCONFDIR) #APACHECONFDIR := /etc/apache # OCAMLC, OCAMLOPT, OCAMLDOC # The location of the OCaml compiler and tools. # The defaults should be OK. OCAMLC := ocamlc OCAMLOPT := ocamlopt OCAMLDOC := ocamldoc # OCAMLLIBDIR # The location of OCaml's library files. # The default should be OK. OCAMLLIBDIR := $(shell $(OCAMLC) -where) # PCRELIBDIR # The location of OCaml's PCRE installation. # The default should be OK. PCRELIBDIR := $(shell ocamlfind query pcre) #PCRELIBDIR := $(OCAMLLIBDIR)/pcre # OCAMLLIBS # The linker option to link with libcamlrun.a. Usually this # library requires other libraries (eg. libtermcap.a). The # default should be OK, but you may need to remove -ltermcap. OCAMLLIBS := -lcamlrun -ltermcap -lunix -lstr # OCAMLAPACHEDIR # This is where apache.mli, apache.cmi and other library files get # installed. If you want to run the program without installing it, # set this to $(shell pwd) (ie. the current directory). Otherwise it # should be set to $(OCAMLLIBDIR)/apache and you should specify # ocamlc -I +apache when compiling programs. #OCAMLAPACHEDIR := $(shell pwd) OCAMLAPACHEDIR := $(OCAMLLIBDIR)/apache # OCAMLINCDIR # Set this to the directory which contains include files for the # current version of OCaml. (Actually this directory should contain # a subdirectory called "caml"). # The default should be OK. OCAMLINCDIR := $(OCAMLLIBDIR) #OCAMLINCDIR := /usr/include #OCAMLINCDIR := /usr/include/ocaml/3.08 # DOCDIR # This is where we will install the documentation. DOCDIR = /usr/share/doc/$(PACKAGE)-$(VERSION) # HAVE_POSTGRES # Tests whether you have (the OCaml module) Postgres installed. If so, then # some extra example scripts will be built. HAVE_POSTGRES := $(shell ocamlfind query postgres >/dev/null 2>&1 && echo 1) #HAVE_POSTGRES := 1 # INSTALL # The "install" program. INSTALL := install #INSTALL := /usr/ucb/install # Default mailer program and args (if using Cgi.Sendmail extension). MAILER_PATH := /usr/sbin/sendmail #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. #$(shell $(APXS) -q CFLAGS) CC := $(shell $(APXS) -q CC) CFLAGS := -I$(APACHEINCDIR) -I$(OCAMLINCDIR) \ $(shell $(APXS) -q CFLAGS_SHLIB) #LDFLAGS_SHLIB := $(shell $(APXS) -q LDFLAGS_SHLIB) -L/usr/lib -lapr-0 -lgdbm -laprutil-0 LDFLAGS_SHLIB := $(shell $(APXS) -q EXTRA_LIBS) -L/usr/local/apache2/lib -lapr-0 -lgdbm -laprutil-0 -lxml -lexpat -ldb