Browse thread
ocaml support in autotools
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-08-02 (12:28) |
From: | Guillaume Rousse <Guillaume.Rousse@i...> |
Subject: | Re: [Caml-list] ocaml support in autotools |
Hendrik Tews wrote: > Guillaume Rousse <Guillaume.Rousse@inria.fr> 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