2.2Building and Installing Erlang/OTP
• --with-ssl-lib-subdir=RELATIVE_PATH - Specify extra OpenSSL lib sub-directory to search in
(relative to base directory).
• --with-ssl-rpath=yes|no|PATHS - Runtime library path for OpenSSL. Default is yes, which equates
to a number of standard locations. If no, then no runtime library paths will be used. Anything else should be a
comma or colon separated list of paths.
• --with-libatomic_ops=PATH - Use the libatomic_ops library for atomic memory accesses. If
configure should inform you about no native atomic implementation available, you typically want to try
using the libatomic_ops library. It can be downloaded from https://github.com/ivmai/libatomic_ops/.
• --disable-smp-require-native-atomics - By default configure will fail if an SMP runtime
system is about to be built, and no implementation for native atomic memory accesses can be found. If
this happens, you are encouraged to find a native atomic implementation that can be used, e.g., using
libatomic_ops, but by passing --disable-smp-require-native-atomics you can build using a
fallback implementation based on mutexes or spinlocks. Performance of the SMP runtime system will however
suffer immensely without an implementation for native atomic memory accesses.
• --enable-static-{nifs,drivers} - To allow usage of nifs and drivers on OSs that do not
support dynamic linking of libraries it is possible to statically link nifs and drivers with the main Erlang
VM binary. This is done by passing a comma separated list to the archives that you want to statically link.
e.g. --enable-static-nifs=/home/$USER/my_nif.a. The path has to be absolute and the
name of the archive has to be the same as the module, i.e. my_nif in the example above. This is also true
for drivers, but then it is the driver name that has to be the same as the filename. You also have to define
STATIC_ERLANG_{NIF,DRIVER} when compiling the .o files for the nif/driver. If your nif/driver depends
on some other dynamic library, you now have to link that to the Erlang VM binary. This is easily achieved by
passing LIBS=-llibname to configure.
• --without-$app - By default all applications in Erlang/OTP will be included in a release. If this is not
wanted it is possible to specify that Erlang/OTP should be compiled without one or more applications, i.e. --
without-wx. There is no automatic dependency handling between applications. If you disable an application
that another application depends on, you also have to disable the dependant application.
• --enable-gettimeofday-as-os-system-time - Force usage of gettimeofday() for OS system
time.
• --enable-prefer-elapsed-monotonic-time-during-suspend - Prefer an OS monotonic time
source with elapsed time during suspend.
• --disable-prefer-elapsed-monotonic-time-during-suspend - Do not prefer an OS
monotonic time source with elapsed time during suspend.
• --with-clock-resolution=high|low - Try to find clock sources for OS system time, and OS
monotonic time with higher or lower resolution than chosen by default. Note that both alternatives may have a
negative impact on the performance and scalability compared to the default clock sources chosen.
• --disable-saved-compile-time - Disable saving of compile date and time in the emulator binary.
If you or your system has special requirements please read the Makefile for additional configuration information.
Important Variables Inspected by configure
Compiler and Linker
• CC - C compiler.
• CFLAGS - C compiler flags. Defaults to "-g -O2". If you set it, these will be removed.
• STATIC_CFLAGS - Static C compiler flags.
• CFLAG_RUNTIME_LIBRARY_PATH - This flag should set runtime library search path for the shared libraries.
Note that this actually is a linker flag, but it needs to be passed via the compiler.
• CPP - C pre-processor.
• CPPFLAGS - C pre-processor flags.
18 | Ericsson AB. All Rights Reserved.: Erlang/OTP System Documentation