... | ... | @@ -150,32 +150,18 @@ The above will install the library in the standard directories, and usually the |
|
|
Deviations from the standard directories will require that we inform the `configure` script in specific ways. This is done via configuration options or environment variables passed to the script. The most important ones are listed below:
|
|
|
|
|
|
### Options to the `configure` script
|
|
|
`--prefix=DIR`
|
|
|
: This sets the general installation prefix. If left unspecified, this defaults to `DIR=/usr/local`. Note that this is used to install only peripheral parts of the library, such as README and pkgconfig files. The location of the module itself is specified with the following option.
|
|
|
|
|
|
`--with-python-module-path=DIR`
|
|
|
: This sets the location where the Python module will be installed. If left unspecified, this will be automatically determined using the Python interpreter. The default values may be something like `DIR=/usr/lib/python3.6/site-packages`, but this varies between OSs, virtualenvs, etc.
|
|
|
|
|
|
`--with-boost-<libname>=NAME`
|
|
|
: The Boost libraries are installed with different names across OSs. The `configure` script tries to guess the names using common patterns, but this can fail. With this option, the user can specify the correct name (either the entire library name or just a suffix). For example, if the boost-python library is name `libboost-python-mt-gcc6-py36-foobar`, this can be passed to `configure` as `--with-boost-python=-mt-gcc6-py36-foobar`.
|
|
|
* `--prefix=DIR`: This sets the general installation prefix. If left unspecified, this defaults to `DIR=/usr/local`. Note that this is used to install only peripheral parts of the library, such as README and pkgconfig files. The location of the module itself is specified with the following option.
|
|
|
* `--with-python-module-path=DIR`: This sets the location where the Python module will be installed. If left unspecified, this will be automatically determined using the Python interpreter. The default values may be something like `DIR=/usr/lib/python3.6/site-packages`, but this varies between OSs, virtualenvs, etc.
|
|
|
* `--with-boost-<libname>=NAME`: The Boost libraries are installed with different names across OSs. The `configure` script tries to guess the names using common patterns, but this can fail. With this option, the user can specify the correct name (either the entire library name or just a suffix). For example, if the boost-python library is name `libboost-python-mt-gcc6-py36-foobar`, this can be passed to `configure` as `--with-boost-python=-mt-gcc6-py36-foobar`.
|
|
|
|
|
|
### Environment variables
|
|
|
The configure script will consult some shell environment variables that will affect its configuration.
|
|
|
|
|
|
`CXX`
|
|
|
: If defined, this variable should point to C++ compiler that should be used.
|
|
|
|
|
|
`PYTHON`
|
|
|
: If defined, this variable should point to the Python interpreter being used.
|
|
|
|
|
|
`CPPFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the C++ preprocessor (e.g. include flags of the form `-I/some/path`)
|
|
|
|
|
|
`CXXFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the C++ compiler (e.g. debugging and optimization options, `-O0 -g`)
|
|
|
|
|
|
`LDFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the shared object linker (e.g. paths to search for libraries, `-L/some/path`)
|
|
|
* `CXX`: If defined, this variable should point to C++ compiler that should be used.
|
|
|
* `PYTHON`: If defined, this variable should point to the Python interpreter being used.
|
|
|
* `CPPFLAGS`: If defined, this variable will be used to pass extra flags to the C++ preprocessor (e.g. include flags of the form `-I/some/path`)
|
|
|
* `CXXFLAGS` : If defined, this variable will be used to pass extra flags to the C++ compiler (e.g. debugging and optimization options, `-O0 -g`)
|
|
|
* `LDFLAGS`: If defined, this variable will be used to pass extra flags to the shared object linker (e.g. paths to search for libraries, `-L/some/path`)
|
|
|
|
|
|
Below are some examples of using the above to achieve some common installation goals.
|
|
|
|
... | ... | |