Later to the party, but this seems to be the correct way of doing this.
From the config
script help:
$ ./config -h
Usage: config [options]
-d Add a debug- prefix to machine choice.
-t Test mode, do not run the Configure perl script.
-h This help.
Any other text will be passed to the Configure perl script.
See INSTALL for instructions.
So the config
script forwards "unexpected" options to the Configure
script. Well, lets see what the Configure
script has to say about that:
$ ./Configure --help
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
See the [:flags]
part at the end of that long line? There is also a comment inside the file:
# -<xxx> +<xxx> compiler options are passed through
It's not that obvious since it does not follow well known standards but the answer is: just append the options to the end of the config
command line.
As a long time has passed since you posted the question, I must add:
- it may not work for the version of OpenSSL you are working with (mine is OpenSSL 1.0);
- I felt compelled to post this answer since none of the previous answers solved my problem and it took me a little while to figure out that solution.