]> matita.cs.unibo.it Git - helm.git/commitdiff
- addead autoconf-iguration. Actually it only set the default runtime
authorStefano Zacchiroli <zack@upsilon.cc>
Fri, 16 Apr 2004 08:43:20 +0000 (08:43 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Fri, 16 Apr 2004 08:43:20 +0000 (08:43 +0000)
  configuration file

helm/http_getter/.cvsignore
helm/http_getter/Makefile
helm/http_getter/buildTimeOpts.ml.in [new file with mode: 0644]
helm/http_getter/configure.ac [new file with mode: 0644]
helm/http_getter/main.ml

index a144df60b02b5b6c63dc88859c09f99a2a4b16d4..111b760aa67d35125360d9a1bb284f7ee61e0279 100644 (file)
@@ -7,3 +7,8 @@
 *.o
 http_getter
 http_getter.opt
+autom4te.cache
+buildTimeOpts.ml
+config.log
+config.status
+configure
index bf0c96ac863b6f95b77dcaf8880a880b102e7688..94668953e0f2a0391884ffc7ccacf371c6f39b09 100644 (file)
@@ -2,7 +2,7 @@ VERSION = 0.3.0
 NAME = http_getter
 
 REQUIRES = helm-getter helm-logger helm-registry
-COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
+COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o -thread
 OCAMLFIND = ocamlfind
 OCAMLC = $(OCAMLFIND) ocamlc -g $(COMMONOPTS)
 OCAMLOPT = $(OCAMLFIND) opt $(COMMONOPTS)
@@ -12,12 +12,18 @@ byte: $(NAME)
 opt: $(NAME).opt
 world: byte opt
 
-$(NAME): main.ml
-       $(OCAMLC) -linkpkg -thread -o $@ $^
-$(NAME).opt: main.ml
-       $(OCAMLOPT) -linkpkg -thread -o $@ $^
+$(NAME): buildTimeOpts.cmo main.ml
+       $(OCAMLC) -linkpkg -o $@ $^
+$(NAME).opt: buildTimeOpts.cmx main.ml
+       $(OCAMLOPT) -linkpkg -o $@ $^
+
+%.cmo: %.ml
+       $(OCAMLC) -c $<
+%.cmx: %.ml
+       $(OCAMLOPT) -c $<
 
 distclean: clean
+       rm -f buildTimeOpts.ml
 clean:
        rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
 
diff --git a/helm/http_getter/buildTimeOpts.ml.in b/helm/http_getter/buildTimeOpts.ml.in
new file mode 100644 (file)
index 0000000..b4865ac
--- /dev/null
@@ -0,0 +1,3 @@
+
+let conffile = "@GETTER_CONF_FILE@";;
+
diff --git a/helm/http_getter/configure.ac b/helm/http_getter/configure.ac
new file mode 100644 (file)
index 0000000..36efda5
--- /dev/null
@@ -0,0 +1,13 @@
+AC_INIT(main.ml)
+
+AC_ARG_WITH(conffile,
+             AS_HELP_STRING([--with-conffile=fname],
+                            [set default run time configuration file (default is /etc/http_getter.conf.xml]),
+             [GETTER_CONF_FILE=$withval], [GETTER_CONF_FILE=/etc/http_getter.conf.xml])
+
+AC_SUBST(GETTER_CONF_FILE)
+
+AC_OUTPUT([
+  buildTimeOpts.ml
+])
+
index 6a3ec6a0d2c2aec9f83b4efeb62003a3961c3d34..6501afdafb61799a08642c16df98667a1d4eae5c 100644 (file)
@@ -34,8 +34,7 @@ open Http_getter_types
 
   (* constants *)
 
-(* let configuration_file = "/projects/helm/etc/http_getter.conf.xml" *)
-let configuration_file = "http_getter.conf.xml"
+let configuration_file = BuildTimeOpts.conffile
 
 let common_headers = [
   "Cache-Control", "no-cache";