Products Support Documentation Download
Using "configure"

Introduction

If you have an RDM source package, please consult UNIX, Linux, or OS X Source Package Build before continuing here.

On Linux, Unix, and OS X after you have installed RDM as described in UNIX, Linux, or OS X Installation you now need to configure a build directory for the examples and tutorials.

Optionally, if you are doing a hosted build for Linux or OS X and want to build the examples and tutorials using CMake (A Cross-Platform Build System) instead of the GNU build system, please consult CMake Build System.

A cross compile of RDM using a Unix development host also requires configure. Even cross compiles using project files requires configure. However, such configures requires additional options passed on to configure. Please read on for details.

As explained in the following sections most users will run the configure script in its own newly created sub-directory. The configure script is crafted using the GNU Build system and can be run on any UNIX system. The configure script itself does not rely on any GNU Auto Tools to be installed. Everything needed is included in the install. GNU Auto Tools will be needed only if you edit any of the files that are input to the GNU Build System. Please consult README-autoreconf.txt for details.

Setting up an Environment

You may already have a working development environment that will work with RDM, in which case you can skip this section. If not, please continue.

For some UNIX systems, you will need to set up an environment for the compiler tool chain, and select the compiler and compiler options.

The exact environment we used is documented in an environment script located in its own target sub-directory of the install. Depending on the platform for the object package you installed, you will have one or two environment scripts like this:

target/lnx-x86_64/env.sh
target/arm-unknown-linux-gnueabi/env.sh

For a host development platform, you will have one such script. For a cross compile using the GNU build system there will be two such scripts. One script for the host development platform and one for the cross compiled environment. The scripts contain the exact environment we used for configuring RDM. Make sure that what you use is compatible with this.

The environment is also documented in the release notes under:

Release Notes -> UNIX/Linux/OSX Platforms

These are typical environment variables you may want to set:

Env Variable Description
CC The C compiler to use
CXX The C++ compiler to use
OBJC The Objective-C compiler to use
CPPFLAGS The C and C++ preprocessor defines
CFLAGS The C compiler flags
CXXFLAGS The C++ compiler flags
OBJCFLAGS The Objective-C compiler flags
LDFLAGS The linker flags
LIBS The libraries to link with
PATH The executable search path.

These environment variables should be set before you run configure as described below. Make sure you also export them. The configure script will capture these except for the PATH environment variable. Later, when you run make, you do not need to have them set except for the PATH environment variable.

This makes it relatively easy to have more than one build environment and access these build environments using one shell. You can set up one environment for debugging, another one with optimization options set, and maybe even one or more for a cross compile. Some systems may require additional environment variables not captured by the configure script.

If you received our product as an object package, the installer prompted you during installation:

Do you want to compile and run examples [no]?

If you answered "yes," it compiled and ran examples at the end of the installation process.

If you answered "no" to the above question, the examples were not compiled or run during installation. You can compile and run the examples separately as follows (this assume you used the default directory during install):

$ /opt/Raima/rdm-14.1/compile-and-run-examples.sh

The script will print out all the commands it runs. First, it will set up the environment. Then it will create a build directory, change the current working directory to it, run custom configure scripts followed by make, and lastly run all the examples.

Running configure

After you have set up the environment as explained in previous section, it is time to create a build directory and run configure.

Running configure for the host development platform

$ mkdir mybuild
$ cd mybuild
$ /opt/Raima/rdm-14.1/target/.../configure

where ... is the actual target you are compiling for. As explained in previous section there are one or two target configure scripts.

If you are doing a cross compile using project files, please also run configure for the native build using the option listed in /opt/Raima/rdm-14.1/target/.../configure.option where '...' is the target directory for the cross compile. This will set up the project files for the actual cross compiled target.

Running configure for a cross compile using the GNU Build System

Running configure for a cross compile using the GNU Build System can be done in the exact same way as described for the host development platform above except that you will be using the custom configure script located in the target directory for the cross compile instead of the custom configure script for the host development platform.

Running configure for a cross compile using project files

Doing a cross compile using project files requires a configure for various reasons:

  • RDM contains generated source files and the project files do not have any custom rules built into them to produce any of them. These generated source files need to be produced by a hosted build and we therefore need to configure a hosted build for this. FYI: A generated source file is a source file produced during the build that is output from an RDM compile time tool.
  • The project files need to reference both source files located in the install and generated source files located in the build directory and the exact location needs to be set directly into the project files.
  • Some project files need absolute paths instead of relative paths.
  • To comply with standards, we never alter the install directory after the products have been installed. This assumes the build directory is configured outside the install directory.

This type of project file build requires a configure of the build directory for both a hosted compile and a cross compile. The hosted compile will rely on the GNU build system as described above while the cross compile will rely on a set of project files. The configure script needs one extra option to instantiate both as described in the following subsections.

INTEGRITY project files

To configure for a cross compile using Multi project files targeting INTEGRITY run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-integrity-project-files

where ... is the development host target.

QNX project files

To configure for a cross compile using Workbench targeting QNX run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-qnx-project-files

where ... is the development host target.

VxWorks 6.x kernel modules project files

To configure for a cross compile using Workbench targeting VxWorks 6.x kernel modules run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-vxworks-project-files

where ... is the development host target.

VxWorks 6.x RTP project files

To configure for a cross compile using Workbench targeting VxWorks 6.x RTP run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-vxworks-rtp-project-files

where ... is the development host target.

VxWorks 7 kernel modules project files

To configure for a cross compile using Workbench targeting VxWorks 7 kernel modules run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-vxworks7-project-files

where ... is the development host target.

VxWorks 7 RTP project files

To configure for a cross compile using Workbench targeting VxWorks 7 RTP run configure as follows:

   $ /opt/Raima/rdm-14.1/target/.../configure \
      --enable-vxworks7-rtp-project-files

where ... is the development host target.

Next Step

When RDM has been configured, the next step is to do a build in the build directory using make as described in Using "make".

This is also the next step for a cross compile.

Additional Help

Run configure with –help for additional help:

$ ../configure --help

Configure has a lot of options and the description in this document is quite brief. Please check the on-line documentation for configure for more details here:

https://www.gnu.org/software/autoconf/