deps: add Makefile to generate opensslconf.h
authorShigeki Ohtsu <ohtsu@iij.ad.jp>
Thu, 9 Apr 2015 08:49:27 +0000 (17:49 +0900)
committerShigeki Ohtsu <ohtsu@iij.ad.jp>
Fri, 10 Apr 2015 00:53:56 +0000 (09:53 +0900)
commit7d14aa0222ef22ecabf010f9aeb094ddecf60a1f
treef6d876cfdbdf0efad0e4b8a55d2101c174f98a39
parent29a33014617902328b295f46c8417f321f57f67f
deps: add Makefile to generate opensslconf.h

This Makefile executes ../openssl/Configure {target} and copy
generated `../openssl/crypto/opensslconf.h` into
`archs/{target}/opensslconf.h`. with the target list that is defined
in ARCS. Several files are copied for backup and cleared so as not to
change the files in `../openssl`.

This also applies four fixes as below by using perl script so as to
meet iojs build requirements.

- all architectures
Remove define of OPENSSL_CPUID_OBJ because it is defined in
openssl.gypi so as to avoid build error with --openssl-no-asm

- VC-WIN32 and VC-WIN64A
OPENSSL_NO_DYNAMIC_ENGINE is needed for building static
library. OPENSSL_NO_CAPIENG is needed to avoid build errors on
Win. See the comments in `deps/openssl/openssl/engines/e_capi.c` for
detail.

- linux-x32
This fix was made by comparing define values of opensslconf.h which
was generated `Configure linux-x32' in openssl-1.0.2a

- darwin64-x86_64-cc
The current openssl release does not use RC4 asm since it explicitly
specified as `$asm=~s/rc4\-[^:]+//;` in
https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584
But iojs has used RC4 asm on MacOS for long time. Fix type of RC4_INT
into `unsigned int` in opensslconf.h of darwin64-x86_64-cc to work on
the RC4 asm.

PR-URL: https://github.com/iojs/io.js/pull/1377
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
deps/openssl/config/Makefile [new file with mode: 0644]