From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id A88D8BB84 for ; Mon, 26 Jan 2009 22:40:50 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4BAH+8fUlQW+UCe2dsb2JhbACTfgEBFiIEtFyFSw X-IronPort-AV: E=Sophos;i="4.37,327,1231110000"; d="scan'208";a="20194478" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 26 Jan 2009 22:40:50 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LRZCL-0000ls-Tm for caml-list@inria.fr; Mon, 26 Jan 2009 21:40:49 +0000 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jan 2009 21:40:49 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jan 2009 21:40:49 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Conditional compilation wrt OCaml version? Date: Mon, 26 Jan 2009 21:40:40 +0000 (UTC) Message-ID: References: <1233005104.20843.25.camel@Blefuscu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre0.9.9-102 (Linux) Sender: news X-Spam: no; 0.00; le-gall:01 compilation:01 ocaml:01 ens-lyon:01 compilation:01 ocaml:01 camlp:01 cpp:01 autoconf:01 hackery:01 wrote:01 suggestion:03 readme:03 readme:03 conditional:04 On 26-01-2009, David Rajchenbach-Teller wrote: > Dear list, > > Working on Batteries, we're faced with a few places where we'd like to > perform conditional compilation depending on the version of OCaml being > used. We could probably do this with Camlp4, cpp, Autoconf hackery, etc. > -- but first, we need to decide on which of these options we'll adopt. > > Any suggestion? > There is optcomp: https://forge.ocamlcore.org/projects/optcomp/ http://darcs.ocamlcore.org/repos/optcomp/optcomp/README The example in README should talk to you directly. Regards, Sylvain Le Gall