Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Previous: 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 (see 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. For example, to check if library stdlib is installed:

          AC_ERLANG_CHECK_LIB([stdlib],
            [echo "stdlib 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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire