From 274cfc6d7faa3c8bbeaac47fc48365128f01c5bb Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 28 Dec 2000 17:52:54 +0000 Subject: [PATCH] mywget renamed in helm_wget; autoconf used for helm_wget --- helm/interface/.cvsignore | 1 + helm/interface/Makefile.in | 6 +++--- helm/interface/configure.in | 8 +++++++- helm/interface/getter.ml | 4 ++-- helm/interface/{mywget => helm_wget.in} | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) rename helm/interface/{mywget => helm_wget.in} (96%) diff --git a/helm/interface/.cvsignore b/helm/interface/.cvsignore index d93fd19b1..b01badb8e 100644 --- a/helm/interface/.cvsignore +++ b/helm/interface/.cvsignore @@ -16,6 +16,7 @@ output2.ps Makefile configuration.ml +helm_wget configure config.log config.cache diff --git a/helm/interface/Makefile.in b/helm/interface/Makefile.in index 39328094c..b31b68e61 100644 --- a/helm/interface/Makefile.in +++ b/helm/interface/Makefile.in @@ -175,11 +175,11 @@ clean: mmlinterface.opt mmlinterface2 mmlinterface2.opt install: - cp mmlinterface mmlinterface.opt $(HELM_BIN_DIR) + cp mmlinterface mmlinterface.opt helm_wget $(HELM_BIN_DIR) distclean: - rm -f Makefile configuration.ml configure config.log config.cache \ - config.status + rm -f Makefile configuration.ml helm_wget configure config.log \ + config.cache config.status .PHONY: install distclean clean diff --git a/helm/interface/configure.in b/helm/interface/configure.in index 71fdf4a93..b73c9b2b4 100644 --- a/helm/interface/configure.in +++ b/helm/interface/configure.in @@ -35,8 +35,14 @@ if test "$RES" != "Asked" ; then fi AC_CACHE_SAVE +AC_PATH_PROG(PERL_BINARY,perl,no) +if test $PERL_BINARY = no ; then + AC_MSG_ERROR(Could not find perl) +fi + AC_SUBST(OCAML_ROOT) AC_SUBST(HELM_BIN_DIR) AC_SUBST(HELM_DEFAULT_CONFIGURATION_DIR) +AC_SUBST(PERL_BINARY) -AC_OUTPUT([Makefile configuration.ml]) +AC_OUTPUT([Makefile configuration.ml helm_wget]) diff --git a/helm/interface/getter.ml b/helm/interface/getter.ml index d3da5a579..a72db448b 100644 --- a/helm/interface/getter.ml +++ b/helm/interface/getter.ml @@ -20,7 +20,7 @@ module MapOfStrings = Map.Make(OrderedStrings);; let read_index url = let module C = Configuration in - if Sys.command ("./mywget " ^ C.tmpdir ^ " " ^ url ^ "/\"" ^ + if Sys.command ("helm_wget " ^ C.tmpdir ^ " " ^ url ^ "/\"" ^ C.indexname ^ "\"") <> 0 then raise (ErrorGetting url) ; @@ -108,7 +108,7 @@ let get_file uri = begin let url = url_of_uri uri in (*CSC: use -q for quiet mode *) - if Sys.command ("./mywget " ^ dir ^ " \"" ^ url ^"\"") <> 0 + if Sys.command ("helm_wget " ^ dir ^ " \"" ^ url ^"\"") <> 0 then raise (ErrorGetting url) ; end ; diff --git a/helm/interface/mywget b/helm/interface/helm_wget.in similarity index 96% rename from helm/interface/mywget rename to helm/interface/helm_wget.in index c6f3205b7..b0d29df47 100755 --- a/helm/interface/mywget +++ b/helm/interface/helm_wget.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL_BINARY@ if ($#ARGV != 1) { print STDERR "Usage: mywget prefix URL\n"; -- 2.39.2