Running "configure" by Boris Fomitchev

### Configuring STLport for new compiler with UNIX shell

Note: this document describes the procedure ot tuning STLport for new compiler, not the one that is already supported. If your compiler is listed as supported, this is absolutely unnecessary.

STLport comes with "configure" shell script to help in the initial step to tune the library for a new compiler. It sets up stlconf.h configuration header with proper flags depending on features of the compiler and user-defined options. Recommended way to create new configuration is to run "configure" in "config/new_compiler" directory and create stl_yourcompiler.h in "config" directory based on switches defined by "configure" in stlconf.h. Do not expect STLport to be configured just by running "configure".

Here is an example how to specify the parameters to "configure" (for Bourne-like shells):
host> cd STLport/config
host> CXX=CC CXXFLAGS="-xwe -noex" ./configure --enable-malloc

This will set up workarounds necessary for "CC" compiler as well as specify malloc-based allocator as the default one.
Run "configure --help" to see list of options available. For most reliable results, you should specify CXXFLAGS to contain the option turning warnings into errors. "configure" tries to scan warnings, but that not always works. After testing your compiler features and setting options specified, "configure" creates stlconf.h file using config/stlconf.h as input. Macro __AUTO_CONFIGURED indicates that the package has been configured. If it is not set (before you run configure), stlconf.h includes stlcomp.h header to set up conservative configuration and recognize the compiler version. config/stlconf.h can be safely copied to stlconf.h to restore unconfigured status-quo.

### Configuring STLport on other platforms

The above may also work on other systems with UNIX-like toolsets on them.
For example, the cygwin32 suite for Windows 95/NT runs "configure" just fine.
You can also change <stlcomp.h> for your system manually.
Please consider contributing your changes back to the STLport project!

### "configure" synopsys (Bourne shells):

> [environment] ./configure [user-defined options]

### "configure" synopsys (C-shells):

> env [environment] ./configure [user-defined options]

"configure" script runs series of tests to determine detailed characteristics of your compiler.

In [environment] , you may specify the following parameters

CXX=<compiler_name>, default is c++

CXXFLAGS=<cxx compiler flags you will most likely use> .
That may be needed to set up some features correctly. That is, if you plan to use exception handling, and your compiler doesn't enable them by default, specify the option enabling EH there.
It is also helpful to specify an option turning warnings into errors here to get most reliable configuration ( For example, warnings could be like that : "Warning: namespaces are mostly broken in this release", and they're indeed broken. ).

In case you are not able to run configure, you might have to know internal STLport macros describing compiler features/bugs Please refer to the Configuration Manual for the values.

### Modifying the configuration engine

Don't edit the "configure" script directly, use config/configure.in source + GNU autoconf instead.

| Table of Contents
| Copyright 2001 by STLport