Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] autoconf and caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-06 (10:28)
From: Yann_Régis-Gianas <yann@l...>
Subject: Re: [Caml-list] autoconf and caml
On Fri, Sep 06, 2002 at 01:12:31PM +0300, Kenneth Oksanen wrote:
> I could use m4 or camlp4 or whatever, if GNU autoconf and assorted
> auto* -tools would produce them.
> People seem to have missed the actual problem I have posed: what is
> the most convenient and hassle-free mechanism for transporting
> information produced by running ./configure to O'Caml source code?
> Such features include directory prefixes, auxiliary program paths,
> various constants, features {en,dis}abled with --enable-X and alike.
> I'm *NOT* trying to use the preprocessor for any weird syntactic
> abstractions or anything of that kind.

	What about using camlp4 to transform config.h file into a
valid Objective Caml module ? I'm using the autotools as a simple user
but config.h is a sequence of #define, is'nt it ? So, we can transform these macros into values declaration. For example:


/* The ocaml compiler */
#define OCAMLC "ocamlc"

/* The ocaml includes path */
#define OCAMLINCPATH "/usr/lib/ocaml/"


(* The ocaml compiler *)
let ocamlc = "ocamlc"

(* The ocaml includes path *)
let ocamlincpath = "/usr/lib/ocaml"

	Perhaps, I did not understand your problem but I think that
autoconf is not the hardest autotool to bind to ocaml. For my part, I
am currently studying the integration of ocaml in Automake. It is a
real problem because of a lot of exotic features of ocaml development
system like extensions, byte/native code mode, camlp4 ...

Yann Régis-Gianas.
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: