[DOC] --with-opt-dir options and CONFIGURE_ARGS

This commit is contained in:
Nobuyoshi Nakada 2024-11-12 11:09:30 +09:00
parent 8d4ba9d443
commit a7d510808d
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-11-12 02:40:32 +00:00

View File

@ -28,10 +28,20 @@
* [rustc] - 1.58.0 or later, if you wish to build * [rustc] - 1.58.0 or later, if you wish to build
[YJIT](rdoc-ref:RubyVM::YJIT). [YJIT](rdoc-ref:RubyVM::YJIT).
If you installed the libraries needed for extensions (openssl, readline, If you want to link the libraries (e.g., gmp) installed into other than
libyaml, zlib) into other than the OS default place, typically using the OS default place, typically using Homebrew on macOS, pass the
Homebrew on macOS, add `--with-EXTLIB-dir` options to `CONFIGURE_ARGS` `--with-opt-dir` (or `--with-gmp-dir` for gmp) option to `configure`.
environment variable.
``` shell
configure --with-opt-dir=$(brew --prefix gmp):$(brew --prefix jemalloc)
```
As for the libraries needed for particular extensions only and not for
Ruby (openssl, readline, libyaml, zlib), you can add `--with-EXTLIB-dir`
options to the command line or to `CONFIGURE_ARGS` environment variable.
The command line options will be embedded in `rbconfig.rb`, while the
latter environment variable is not embedded and is only used when
building the extension libraries.
``` shell ``` shell
export CONFIGURE_ARGS="" export CONFIGURE_ARGS=""