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: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] autoconf and caml
> I'm writing a piece of software using O'Caml and GNU autoconf (among
> others).  In C the results of running `./configure' are conveniently
> accessed with `#include "config.h"'.  My current solution is to
> preprocess also the O'Caml code, but this requires some clumsy hacks
> in Makefiles etc.  Is there a better way?  If not, then I'ld suggest
> some flag in O'Caml which would run the source files through cpp.

The -pp flag to ocamlc and ocamlopt lets you do this easily:

  ocamlc -pp /lib/cpp ...

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: