From: Maxence Guesdon <maxence.guesdon@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] question: "autoconfiguration" of Ocaml code (checking for libraries)
Date: Wed, 29 Jan 2003 22:54:38 +0100 [thread overview]
Message-ID: <20030129225438.67089ae8.maxence.guesdon@inria.fr> (raw)
In-Reply-To: <15928.13894.193615.945673@hector.lesours>
>
> I was seeking for something simpler. I'm not very fond of m4 macros
> (even if I did hack several years ago such stuff).
>
> In my opinion, autoconf was suited for the problem of configuring C
> code for lots of Unix variants. This is not what I need (in particular
> Ocaml has a unique implementation).
You could create a script to launch the ocaml toplevel on a configuration script written in OCaml, like (without caring about the shell syntax) :
if `ocaml my_conf_script.ml` then
echo Type make to compile
else
echo Damn, the configure script failed !
Then your my_conf_script.ml file could be something like :
let config () =
let version = Sys.ocaml_version in
if float_of_string version < 3.06 then
(
prerr_endline "Your ocaml is too old !" ;
exit 1
)
else
(
Printf.printf "Using OCaml version %s is ok" version ;
print_newline ()
);
;
(* other tests using Sys.command for example *)
let _ = config ()
If you change your mind and want to use autoconf, you can find configure.in examples on the caml humps.
Hope this helps,
--
Maxence Guesdon
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2003-01-29 21:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-29 19:58 Basile STARYNKEVITCH
2003-01-29 20:04 ` Will Benton
2003-01-29 20:15 ` Basile STARYNKEVITCH
2003-01-29 20:22 ` Will Benton
2003-01-29 21:54 ` Maxence Guesdon [this message]
2003-01-30 10:45 ` Jean-Christophe Filliatre
2003-01-30 13:59 ` Damien Doligez
2003-01-29 21:43 ` Gerd Stolpmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030129225438.67089ae8.maxence.guesdon@inria.fr \
--to=maxence.guesdon@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox