From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id ADC54BB84 for ; Wed, 2 Aug 2006 14:28:17 +0200 (CEST) Received: from [128.93.8.195] (alceste.inria.fr [128.93.8.195]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k72CSHiW003987 for ; Wed, 2 Aug 2006 14:28:17 +0200 Message-ID: <44D09A61.2060100@inria.fr> Date: Wed, 02 Aug 2006 14:28:17 +0200 From: Guillaume Rousse User-Agent: Thunderbird 1.5.0.4 (X11/20060618) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocaml support in autotools References: <44CE2C74.4070607@inria.fr> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44D09A61.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; guillaume:01 guillaume:01 ocaml:01 hendrik:01 tews:01 ocaml:01 autoconf:01 activedvi:01 autoconf:01 compiler:01 tews:01 viewcvs:01 reuse:01 ocamlc:01 compiler:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hendrik Tews wrote: > Guillaume Rousse writes: > > I'd like to have ocaml support in autotools (autoconf + automake), to > avoid heavy code duplication between several projects (at least > ocmalimages and activedvi). > > I would very much like to see this. Please go ahead. I did some > autoconf hacking for the CCSL compiler, see the files aclocal.ml > and configure.ac in > http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/viewcvs.cgi/Ccslc/ > Feel free to reuse that code. I had a quick look, but I'm not sure of the interest of a specific ocamlbin parameter, whereas you may as well just use PATH: AC_PATH_PROG(CAMLC, ocamlc) if test -z "$CAMLC"; then AC_MSG_ERROR([objective-caml compiler not found, check your PATH]) fi Standard macros, such as AC_PROG_CC, also relies on default PATH, and don't provide additional options for supplying program specific one. > The main problem with autoconf from my point of view (at least in > 2.57, the latest version I looked at) is that it provides a lot > of stuff, which is only relevant for C/C++ projects and which you > cannot easily disable. For instance the configure options > --includedir. Further, there is no way to add an additional > configure option. I have therefore overridden the internal macros > _AC_INIT_PARSE_ARGS and _AC_INIT_HELP in a private aclocal.m4. > However, now I have to adopt my changes to every new autoconf > version. Idially, there should be a simple way to disable each of > the standard configure options and to add new ones. You can't disable existing ones. However, it don't see anything C/C++ specific apart environment variable among them, and they don't really hurt anyway. For new ones, you have AC_ARG_WITH and AC_ARG_ENABLE, fur subtle semantic differences. -- Guillaume Rousse Projet Estime, INRIA Domaine de Voluceau Rocquencourt - B.P. 105 78153 Le Chesnay Cedex - France