Embedthis Appweb 3.4.0
Home >Source Code> Configure Program

Quick Nav

See Also

The Configure Program

The configure program is used to tailor the software's configuration to suit your needs. It is the master configuration tool and it will create the "buildConfig.*" configuration files.

There are three such files:

The relevant file is included by make files, shell scripts and by C source files to control the build process. They have however, basically the same contents — just in different formats. You should NOT edit these files as it is very easy to introduce inconsistencies between the files that can be very difficult to diagnose.

You may run configure with no options to accept the factory defaults — this is a good starting point. The configure program will begin with the default settings supplied in the "build/standard.default" file. Then it will apply the various options specified on the command line. You can edit the "standard.default" file to modify the factory defaults to suit your requirements.

Running Configure

To run the configure program, type:

./configure

or supply options, for example:

./configure --type=RELEASE --enable-all --shared

The --enable-all switch will enable all possible features that your system can support. The --disable-all switch will disable all possible features while still retaining a working configuration. To fully control your configuration, it is useful to use one of these two switches as your first configure option switch. Then either disable or enable options after that.

Common Configure Options

The tables below describe the configure options and the variables defined in the "buildConfig.*" configuration files. The defaults below are the defaults in the supplied binary distribution.

Installation Directory Options

Option Description
--prefix Set the installation directory path for the primary product distribution files.
--bindir=PATH Set the installation directory path for the product binaries.
--docdir=PATH Set the installation directory path for the product manual documentation.
--incdir=PATH Set the installation directory path for the include header files.
--libdir=PATH Set the installation directory path for the libraries.
--libexecdir=PATH Set the installation directory path for the shared libraries. This is similar to --libdir but will also change the modules directory. Provided for compatibility with autoconf, but using --libdir and --moddir is prefereable.
--localstatedir=PATH Set the directory for modifyable files. This affects the location of web content. Provided for compatibility with autoconf, but using --webdir is prefereable.
--logdir=PATH Set the directory for log files.
--mandir=PATH The the installation directory path for the man pages.
--moddir=PATH The the installation directory path for the module files.
--srcdir=PATH Set the installation directory path for source code.

You can selectively modify installation directories by setting the appropriate configure location option. For example:

./configure --prefix=/home/myDir

System Build Types

Option Description
--build=cpu-vendor-os Configure for building on the system specified by "cpu-vendor-os". This value is guessed by default.
--host=cpu-vendor-os Cross-compile to run the product on the system specified by "cpu-vendor-os". This value is set by default to the value selected for the build host (see above).
--device=DEVICE Set the device or emulator. Used in Windows CE to specify the desired device target.

Basic Configure Options

Option Description
--buildNumber=NUMBER Set the build number part of the version (the last digit of a version number, e.g. 1.0.0-X).
--defaults=FILE Set the file name of the defaults master file. Just supply the bare filename without the .defaults extension.
--help Display the usage help.
--cygwin Use the cygwin compiler in preference if a Microsoft Visual Studio compiler is also installed. Currently not supported.
--name=NAME Set the full product multi-word product name (BLD_NAME define).
--product=NAME Set the one word (no spaces) name of the product (BLD_PRODUCT).
--quiet, -q, --silent Run quietly.
--setVersion Set the version number of the product.
--type=BUILD Set the build type (DEBUG | RELEASE)

Feature Options

Option Default Description
--disable-FEATURE Do not include the FEATURE. This is the general form to enable the features described below.
--enable-FEATURE Include the FEATURE. This is the general form to enable the features described below.
--disable-all Exclude all possible features for this platform. Follow this with specific enable-FEATURE options.
--enable-all Include all possible features for this platform. Follow this with specific disable-FEATURE options.
--enable-access-log Enabled Include support for request access log files.
--enable-angel Enabled Build with Angel monitoring process. Not required on MAC OS X as it provides this restart monitoring capability via the launchd process.
--enable-assert Enabled Build with debug assert checking on.
--enable-auth Enabled Include support for authentication.
--enable-auth-file Enabled Include support for the file-based backend.
--enable-auth-pam Enabled Include support for Unix PAM-based authentication backend.
--enable-auto-compile Enabled Include the ability to auto-compile modified scripts in the web serve.
--enable-chunk Enabled Include the chunk filter to manage HTTP chunked transfer encoded responses.
--enable-cmd Enabled Build with the ability to run external commands. Necessary if CGI is required.
--enable-config-parse Enabled Include ability to configure Appweb via configuration files..
--enable-complete-cross Enabled Build everything for the target host system.
--enable-complete-native Enabled Build everything for the build system.
--enable-cross-compiler Enabled Build the compiler when cross-compiling for the target host.
--enable-db Enabled Include database support.
--enable-digest-auth Enabled Include support for HTTP digest authentication.
--enable-dir Enabled Include the directory listing handler.
--enable-doc Enabled Build the documentation.
--enable-e4x Enabled Include E4X XML support.
--enable-egi Enabled Include the EGI handler.
--enable-file Enabled Include the static file content handler.
--enable-floating-point Enabled Build with floating point support.
--enable-http-client Enabled Include HTTP client-side support.
--enable-log Enabled Build with the MPR trace log facility. Use the "--log" switch to enable at run-time.
--enable-multi-thread Enabled Build multi-threaded. Use --disable-multi-thread to build single-threaded.
--enable-range Enabled Include the range filter to handle HTTP ranged requests.
--enable-regex Enabled Include support for regular expressions.
--enable-rom-fs Disabled Build with the ability to load web pages from a compiled web page store in ROM.
--enable-send Enabled Include the optimized send file handler.
--enable-test Enabled Build all unit tests
--enable-upload Enabled Include the file upload handler.
--enable-xml Enabled Include XML parser support. Required if using E4X.
--shared Enabled Build a shared library and program using shared libraries. Use either --shared or --static but not both.
--static Disable Build a static library and program. Use either --shared or --static but not both.
--tune=MODE size Tune the build to optimize for "size", "speed". You can also select "balanced" for a balance between speed and size.

Optional Packages

Option Default Description
--with-COMPONENT=dir Specify if a COMPONENT should be included in the build.
--without-COMPONENT Do not include the COMPONENT in the build.

Environment Variables

These environment variables can be passed into configure to alter its behavior. These are most typically used when cross compiling.

Variable Description
ANT Builder for Java programs.
AR Path to the archiver program to use to archive libraries for the target system.
BREW Brew SDK directory.
CC Path to the C/C++ compiler to use to compile for the target system.
CFLAGS Compiler flags
BUILD_AR Path to the archiver program to use for building bootstrap tools on the local system.
BUILD_CC Path to the C/C++ compiler to use for building bootstrap tools on the local system.

BUILD_LD

Linker to use for native / local linking on the build system.
BUILD_MAKE Path to the make program to use for building bootstrap tools on the local system.
BUILD_MT Windows manifest command.
DOXYGEN Doxygen documentation generation tool.
IFLAGS Preprocessor and include flags. E.g. -Idir to specify a non-standard directory for include headers.
JAVAC Java SDK directory.
JDK Java SDK directory.
JAR Java archive tool.
LD Path to the linker program to link objects for the target system.
LDFLAGS Linker flags. E.g. -Ldir to specify a non-standard directory for libraries.
MAKE The make program tool
MT The windows manifest tool.
RANLIB Path to the ranlib program to use if required.

Example Use

configure --type=DEBUG --enable-multi-thread --shared --with-openssl=/usr/src/openssl

Configuration Variables

The configure program will define the following variables (among others) in the relevant "buildConfig.*" configuration files.

Variable Typical Value Description
BLD_BIN_PREFIX /usr/bin Default location for any product binaries.
BLD_BUILD_CPU_ARCH MPR_CPU_IX86 Build system CPU architecture. Possible values defined in include/mprOs.h.
BLD_BUILD_CPU 6586 Build system CPU. Possible values defined in tools/config.sub. Used in the --build switch
BLD_BUILD_OS WIN Build system operating system. Used in cross-development.
BLD_BUILD_CC cc (cl on windows) C compiler to use when building bootstrap tools that are used in the build process.
BLD_COMPANY "Embedthis" Name of the company distributing the product. You may change this.
BLD_DEBUG 1 Set to 1 if BLD_TYPE is set to DEBUG.
BLD_DOC_PREFIX /usr/share/appweb-1.1.2 Default product documentation and samples installation prefix.
BLD_HOST_AR ar (lib on windows) Archiver / library program for target host.
BLD_HOST_CFLAGS "" The value of the CFLAGS environment variable when configure was run. Used for compiling programs for the target host.
BLD_HOST_CC cc (cl on windows) C compiler for compiling programs for the target host.
BLD_HOST_CPU_ARCH MPR_CPU_IX86 Target host CPU architecture. Possible values defined in include/mprOs.h.
BLD_HOST_CPU i586 Target host CPU. Possible values defined in tools/config.sub. Used in the --host switch.
BLD_HOST_OS LINUX Target operating system.
BLD_HOST_UNIX 1 Set to TRUE if the target O/S is UNIX-like.
BLD_INC_PREFIX /usr/include/appweb Default product header location.
BLD_HOST_IFLAGS "" The value of the IFLAGS environment variable when configure was run.
BLD_HOST_LD ld (link on windows) Linker program.
BLD_HOST_LDFLAGS "" The value of the LDFLAGS environment variable when configure was run.
BLD_LIB_PREFIX /usr/lib Default product shared library location.
BLD_NAME "Embedthis PRODUCT_NAME" Multiword name of the product.
BLD_NUMBER 1 Build version number. This is the fourth digit of a version number.
BLD_PREFIX /usr/lib/appweb Default installation directory prefix.
BLD_PRODUCT appweb One word name of the product.
BLD_HOST_RANLIB ranlib Program to rebuild library symbol tables for the target host.
BLD_SRC_PREFIX /usr/src/appweb-1.1.2 Default product documentation and samples installation prefix.
BLD_TYPE DEBUG Build type. Set to RELEASE or DEBUG.
BLD_VERSION 1.1.2 Version number of the format Major.Minor.Patch
BLD_FEATURE_NAME 0 or 1 Enable or disable the feature by NAME.
BLD_FEATURE_NAME 0 or 1 Enable the building of the module by NAME.

© Embedthis Software LLC, 2003-2012. All rights reserved. Embedthis, Ejscript and Appweb are trademarks of Embedthis Software LLC.