autoconf and erlang

Hal Snyder <>
Wed May 12 16:35:51 CEST 2004

We are using autoconf to build all our Erlang apps these days.
It helps with the following things:

a. portability (we need to run on several platforms)

b. selection of development vs. production environments when building

c. integrates well with packaging system (pkgsrc) which helps config &
   release management

This sort of relates to EPAN idea and recent publicity thread, if a
consistent build setup can be developed.

Here's one simple offering. To use, put it into otp.m4 or such in
$PREFIX/share/aclocal. In, include the line
AX_WITH_ERL_RUN_TOP. It will look around for an Erlang run-time
distribution but allow you to override its best guess by specifying a
value e.g. sh configure --with-erl-run-top=/u1/lib/erlang.

dnl @synopsis AX_WITH_ERL_RUN_TOP()
## Locates an installed Erlang run-time tree, placing the result in the precious
## variable $ERL_RUN_TOP. Accepts a present $ERL_RUN_TOP, then --with-erl-top.
## Example:
  AC_MSG_CHECKING([for --with-erl-run-top])
    AC_HELP_STRING([--with-erl-run-top],[Erlang run-time, e.g. /usr/pkg/lib/erlang]),
     if test -d "$ERL_RUN_TOP"; then
       AC_MSG_ERROR([cannot find ERL_RUN_TOP])

More information about the erlang-questions mailing list