Commit 8f7e326
committed
Check a OpenSSL library directory existence.
Add a logic to check a OpenSSL library directory existence on the given
`--with-openssl-dir=<dir>` option.
OpenSSL creates the library directory to the `/path/to/openssl_dir/lib64`
as a default, when it is built from the source as follow.
OpenSSL
```
$ ./Configure \
--prefix=/path/to/openssl
$ make
$ make install
```
In the case of the following command, the `dir_config("openssl")` returns
`["/path/to/openssl/include", "/path/to/openssl/lib"]`. And this causes the
Ruby OpenSSL binding is unintentionally built with the system OpenSSL's library
directory, because the `/path/to/openssl/lib` doesn't exist. The logic to check
the OpenSSL library directory's existence is to avoid building in this case.
ruby/openssl
```
$ bundle exec rake compile -- \
--with-openssl-dir=/path/to/openssl
```
In the case of the following command, the `dir_config("openssl")` returns
`["/path/to/openssl/include",
"/path/to/openssl/lib64:/path/to/openssl/lib64:/path/to/openssl/lib"]`.
The returned library directory string is a set of the directories with the path
separator ":".
```
$ bundle exec rake compile -- \
--with-openssl-dir=/path/to/openssl \
--with-openssl-lib=/path/to/openssl/lib64
```1 parent 037c181 commit 8f7e326
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| |||
0 commit comments