From: Stefano Zacchiroli Date: Fri, 16 Apr 2004 08:43:20 +0000 (+0000) Subject: - addead autoconf-iguration. Actually it only set the default runtime X-Git-Tag: dead_dir_walking~55 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=000234a18dd37e780907043e0d7405029078b0a7 - addead autoconf-iguration. Actually it only set the default runtime configuration file --- diff --git a/helm/http_getter/.cvsignore b/helm/http_getter/.cvsignore index a144df60b..111b760aa 100644 --- a/helm/http_getter/.cvsignore +++ b/helm/http_getter/.cvsignore @@ -7,3 +7,8 @@ *.o http_getter http_getter.opt +autom4te.cache +buildTimeOpts.ml +config.log +config.status +configure diff --git a/helm/http_getter/Makefile b/helm/http_getter/Makefile index bf0c96ac8..94668953e 100644 --- a/helm/http_getter/Makefile +++ b/helm/http_getter/Makefile @@ -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 index 000000000..b4865ac3e --- /dev/null +++ b/helm/http_getter/buildTimeOpts.ml.in @@ -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 index 000000000..36efda576 --- /dev/null +++ b/helm/http_getter/configure.ac @@ -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 +]) + diff --git a/helm/http_getter/main.ml b/helm/http_getter/main.ml index 6a3ec6a0d..6501afdaf 100644 --- a/helm/http_getter/main.ml +++ b/helm/http_getter/main.ml @@ -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";