(autoconf.info)Erlang Libraries


Prev: Posix Variants Up: Existing Tests

5.13 Erlang Libraries
=====================

The following macros check for an installation of Erlang/OTP, and for
the presence of certain Erlang libraries.  All those macros require the
configuration of an Erlang interpreter and an Erlang compiler (*note
Erlang Compiler and Interpreter::).

 -- Macro: AC_ERLANG_SUBST_ROOT_DIR
     Set the output variable `ERLANG_ROOT_DIR' to the path to the base
     directory in which Erlang/OTP is installed (as returned by Erlang's
     `code:root_dir/0' function).  The result of this test is cached if
     caching is enabled when running `configure'.

 -- Macro: AC_ERLANG_SUBST_LIB_DIR
     Set the output variable `ERLANG_LIB_DIR' to the path of the library
     directory of Erlang/OTP (as returned by Erlang's `code:lib_dir/0'
     function), which subdirectories each contain an installed
     Erlang/OTP library.  The result of this test is cached if caching
     is enabled when running `configure'.

 -- Macro: AC_ERLANG_CHECK_LIB (LIBRARY, [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND])
     Test whether the Erlang/OTP library LIBRARY is installed by
     calling Erlang's `code:lib_dir/1' function.  The result of this
     test is cached if caching is enabled when running `configure'.
     ACTION-IF-FOUND is a list of shell commands to run if the library
     is installed; ACTION-IF-NOT-FOUND is a list of shell commands to
     run if it is not.  Additionally, if the library is installed, the
     output variable `ERLANG_LIB_DIR_LIBRARY' is set to the path to the
     library installation directory, and the output variable
     `ERLANG_LIB_VER_LIBRARY' is set to the version number that is part
     of the subdirectory name, if it is in the standard form
     (`LIBRARY-VERSION').  If the directory name does not have a
     version part, `ERLANG_LIB_VER_LIBRARY' is set to the empty string.
     If the library is not installed, `ERLANG_LIB_DIR_LIBRARY' and
     `ERLANG_LIB_VER_LIBRARY' are set to `"not found"'.  For example,
     to check if library `stdlib' is installed:

          AC_ERLANG_CHECK_LIB([stdlib],
            [echo "stdlib version \"$ERLANG_LIB_VER_stdlib\""
             echo "is installed in \"$ERLANG_LIB_DIR_stdlib\""],
            [AC_MSG_ERROR([stdlib was not found!])])

   In addition to the above macros, which test installed Erlang
libraries, the following macros determine the paths to the directories
into which newly built Erlang libraries are to be installed:

 -- Macro: AC_ERLANG_SUBST_INSTALL_LIB_DIR
     Set the `ERLANG_INSTALL_LIB_DIR' output variable to the directory
     into which every built Erlang library should be installed in a
     separate subdirectory.  If this variable is not set in the
     environment when `configure' runs, its default value is
     `$ERLANG_LIB_DIR', which value is set by the
     `AC_ERLANG_SUBST_LIB_DIR' macro.

 -- Macro: AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR (LIBRARY, VERSION)
     Set the `ERLANG_INSTALL_LIB_DIR_LIBRARY' output variable to the
     directory into which the built Erlang library LIBRARY version
     VERSION should be installed.  If this variable is not set in the
     environment when `configure' runs, its default value is
     `$ERLANG_INSTALL_LIB_DIR/LIBRARY-VERSION', the value of the
     `ERLANG_INSTALL_LIB_DIR' variable being set by the
     `AC_ERLANG_SUBST_INSTALL_LIB_DIR' macro.


automatically generated by info2www